bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/17366] New: gold can't handle a crt1.o with an .eh_frame


From: rafael.espindola at gmail dot com
Subject: [Bug gold/17366] New: gold can't handle a crt1.o with an .eh_frame
Date: Tue, 09 Sep 2014 23:02:49 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=17366

            Bug ID: 17366
           Summary: gold can't handle a crt1.o with an .eh_frame
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at google dot com
          Reporter: rafael.espindola at gmail dot com
                CC: ian at airs dot com

I noticed that gold's exception_static_test test was failing on my machine
(fedora 20 x86_64).

The link line is


gcctestdir/ld --build-id --no-add-needed --hash-style=gnu -m elf_x86_64 -static
-o exception_static_test
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64/crt1.o
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64/crti.o
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/crtbeginT.o -Lgcctestdir
-L/usr/lib/gcc/x86_64-redhat-linux/4.8.3
-L/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64 -L/lib/../lib64
-L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../..
exception_test_main.o exception_test_1.o exception_test_2.o -ldl -lz -lstdc++
-lm --start-group -lgcc -lgcc_eh -lc --end-group
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/crtend.o
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64/crtn.o

To see the problem run:
 readelf -aW exception_static_test  | grep -i eh_frame

On my system the output is

  [16] .eh_frame         PROGBITS        00000000004b60d8 0b60d8 00f5ec 00   A 
0   0  8
   00     .note.ABI-tag .note.gnu.build-id .rela.plt .init .plt .text
__libc_freeres_fn __libc_thread_freeres_fn .fini .rodata .gcc_except_table
.stapsdt.base __libc_subfreeres __libc_atexit __libc_thread_subfreeres
.eh_frame 
     2: 00000000004c56c0     0 OBJECT  LOCAL  DEFAULT   16 __EH_FRAME_BEGIN__

note how __EH_FRAME_BEGIN__ points to the *end* of .eh_frame.

with bfd ld I get

 [15] .eh_frame         PROGBITS        00000000004b5d08 0b5d08 00f524 00   A 
0   0  8
   00     .note.ABI-tag .note.gnu.build-id .rela.plt .init .plt .text
__libc_freeres_fn __libc_thread_freeres_fn .fini .rodata .stapsdt.base
__libc_subfreeres __libc_atexit __libc_thread_subfreeres .eh_frame
.gcc_except_table 
   261: 00000000004b5d38     0 OBJECT  LOCAL  DEFAULT   15 __EH_FRAME_BEGIN__


The difference of 0x30 from the start is accounted by the .eh_frame of  crt1.o:

$ readelf -SW /lib64/crt1.o | grep .eh_frame
  [ 5] .eh_frame         PROGBITS        0000000000000000 000090 000030 00   A 
0   0  8

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]