[PATCH] D52344: [Clang][CodeGen][ObjC]: Fix non-bridged CoreFoundation builds on ELF targets that use `-fconstant-cfstrings`.

Kristina Brooks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 21 16:48:29 PDT 2018


kristina marked 2 inline comments as done.
kristina added a comment.

Binary layout also looks sane (compiled with `-fPIC -faddrsig -Wl,--icf=safe`), just digging it through it in a dissasembler:

  [/q/src/clwn]$ llvm-readobj -elf-output-style=GNU -sections /q/org.llvm.caches/clownschool/clwn-sysroot/System/Library/Frameworks/CoreFoundation.framework/libCoreFoundation.so
  There are 36 section headers, starting at offset 0x3f57d8:
  
  Section Headers:
    [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
    [ 0]                   NULL            0000000000000000 000000 000000 00      0   0  0
    [ 1] .dynsym           DYNSYM          0000000000000200 000200 00fd08 18   A  5   1  8
    [ 2] .gnu.version      VERSYM          000000000000ff08 00ff08 001516 02   A  1   0  2
    [ 3] .gnu.version_r    VERNEED         0000000000011420 011420 0001a0 00   A  5   5  4
    [ 4] .gnu.hash         GNU_HASH        00000000000115c0 0115c0 003bf8 00   A  1   0  8
    [ 5] .dynstr           STRTAB          00000000000151b8 0151b8 011677 00   A  0   0  1
    [ 6] .rela.dyn         RELA            0000000000026830 026830 01f860 18   A  1   0  8
    [ 7] .rela.plt         RELA            0000000000046090 046090 006408 18   A  1   0  8
    [ 8] .rodata           PROGBITS        000000000004c4a0 04c4a0 00fdd0 00 AMS  0   0 32
    [ 9] .gcc_except_table PROGBITS        000000000005c270 05c270 0000cc 00   A  0   0  4
    [10] .eh_frame_hdr     PROGBITS        000000000005c33c 05c33c 005934 00   A  0   0  4
    [11] .eh_frame         PROGBITS        0000000000061c70 061c70 017fac 00   A  0   0  8
    [12] .text             PROGBITS        000000000007a000 07a000 228e1f 00  AX  0   0 16
    [13] .init             PROGBITS        00000000002a2e20 2a2e20 00001a 00  AX  0   0  4
    [14] .fini             PROGBITS        00000000002a2e3c 2a2e3c 000009 00  AX  0   0  4
    [15] .plt              PROGBITS        00000000002a2e50 2a2e50 0042c0 00  AX  0   0 16
    [16] .data             PROGBITS        00000000002a8000 2a8000 001580 00  WA  0   0 16
    [17] .tm_clone_table   PROGBITS        00000000002a9580 2a9580 000000 00  WA  0   0  8
    [18] cfstring          PROGBITS        00000000002a9580 2a9580 007740 00  WA  0   0  8
    [19] .got.plt          PROGBITS        00000000002b0cc0 2b0cc0 002170 00  WA  0   0  8
    [20] .fini_array       FINI_ARRAY      00000000002b3000 2b3000 000008 00  WA  0   0  8
    [21] .init_array       INIT_ARRAY      00000000002b3008 2b3008 000010 00  WA  0   0  8
    [22] .data.rel.ro      PROGBITS        00000000002b3020 2b3020 007a18 00  WA  0   0 16
    [23] .dynamic          DYNAMIC         00000000002baa38 2baa38 000200 10  WA  5   0  8
    [24] .got              PROGBITS        00000000002bac38 2bac38 000718 00  WA  0   0  8
    [25] .bss              NOBITS          00000000002bc000 2bb350 0050a8 00  WA  0   0 16
    [26] .comment          PROGBITS        0000000000000000 2bb350 0002b3 01  MS  0   0  1
    [27] .debug_str        PROGBITS        0000000000000000 2bb603 00b6a0 01  MS  0   0  1
    [28] .debug_abbrev     PROGBITS        0000000000000000 2c6ca3 00162d 00      0   0  1
    [29] .debug_info       PROGBITS        0000000000000000 2c82d0 0261bc 00      0   0  1
    [30] .debug_macinfo    PROGBITS        0000000000000000 2ee48c 000053 00      0   0  1
    [31] .debug_line       PROGBITS        0000000000000000 2ee4df 0cb0f5 00      0   0  1
    [32] .debug_ranges     PROGBITS        0000000000000000 3b95d4 000030 00      0   0  1
    [33] .symtab           SYMTAB          0000000000000000 3b9608 01d370 18     35 2288  8
    [34] .shstrtab         STRTAB          0000000000000000 3d6978 000165 00      0   0  1
    [35] .strtab           STRTAB          0000000000000000 3d6add 01ecf4 00      0   0  1


Repository:
  rC Clang

https://reviews.llvm.org/D52344





More information about the cfe-commits mailing list