This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR ld/14105: Always create PLT eh_frame


On Mon, May 21, 2012 at 2:45 AM, Alan Modra <amodra@gmail.com> wrote:
> On Sun, May 13, 2012 at 02:36:51PM -0700, H.J. Lu wrote:
>> 2012-05-13 ?H.J. Lu ?<hongjiu.lu@intel.com>
>>
>> ? ? ? PR ld/14105
>> ? ? ? * elf32-i386.c (elf_i386_create_dynamic_sections): Always
>> ? ? ? create PLT eh_frame section with SEC_LINKER_CREATED.
>> ? ? ? * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
>>
>> ? ? ? * elflink.c (not_this_section): New.
>> ? ? ? (bfd_elf_discard_info): Also handle PLT eh_frame created by
>> ? ? ? linker.
>
> The elflink.c changes should not be necessary. ?Please see how
> elf32-ppc.c handles this. ?Search for glink_eh_frame.

I have a follow-up patch for

http://sourceware.org/bugzilla/show_bug.cgi?id=13909

[hjl@gnu-6 ld]$ rm -f dummy.s
[hjl@gnu-6 ld]$ touch dummy.s
[hjl@gnu-6 ld]$ ../gas/as-new -o dummy.o dummy.s
[hjl@gnu-6 ld]$ ./ld-new -shared dummy.o
[hjl@gnu-6 ld]$ file a.out
a.out: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1
(SYSV), dynamically linked, not stripped
[hjl@gnu-6 ld]$ readelf -S a.out
There are 10 section headers, starting at offset 0x1dc:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .hash             HASH            00000094 000094 000028 04   A  2   0  4
  [ 2] .dynsym           DYNSYM          000000bc 0000bc 000050 10   A  3   2  4
  [ 3] .dynstr           STRTAB          0000010c 00010c 000019 00   A  0   0  1
  [ 4] .eh_frame         PROGBITS        00000128 000128 000000 00   A  0   0  4
  [ 5] .dynamic          DYNAMIC         00010128 000128 000058 08  WA  3   0  4
  [ 6] .got              PROGBITS        00010180 000180 000010 04 WAX  0   0  4
  [ 7] .shstrtab         STRTAB          00000000 000190 000049 00      0   0  1
  [ 8] .symtab           SYMTAB          00000000 00036c 0000c0 10      9   9  4
  [ 9] .strtab           STRTAB          00000000 00042c 000038 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)
[hjl@gnu-6 ld]$

My patch, which depends on elflink.c change, won't generate .eh_frame section
when there is no input .eh_frame section.  How should we solve this?

Thanks.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]