Test case which displays problem found in libstdc++-v3 effort
Alan Modra
alan@linuxcare.com.au
Mon Jun 19 21:03:00 GMT 2000
On 19 Jun 2000, Jason Merrill wrote:
> >>>>> Alan Modra <alan@linuxcare.com.au> writes:
>
> > It's a linker script bug. The linker needs to be told to keep the
> > .eh_frame contents. Lack of any reference to symbols defined in a
> > section normally causes --gc-sections to discard the section.
>
> I would think that the reference to __EH_FRAME_BEGIN__ from
> __do_global_ctors would satisfy the linker. Why doesn't it?
Because there doesn't seem to be any such reference. __main.o doesn't
have much in it on i586-linux. Everything is #ifdef'd out due to
HAS_INIT_SECTION and OBJECT_FORMAT_ELF being defined.
objdump --headers __main.o
__main.o: file format elf32-i386
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000000 00000000 00000000 00000034 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000000 00000000 00000000 00000034 2**2
CONTENTS, ALLOC, LOAD, DATA
2 .bss 00000000 00000000 00000000 00000034 2**2
ALLOC
3 .note 00000014 00000000 00000000 00000034 2**0
CONTENTS, READONLY
4 .stab 00000ee8 00000000 00000000 00000048 2**2
CONTENTS, RELOC, READONLY, DEBUGGING
5 .stabstr 00002f51 00000000 00000000 00000f30 2**0
CONTENTS, READONLY, DEBUGGING
6 .comment 00000029 00000000 00000000 00003e81 2**0
CONTENTS, READONLY
--
Linuxcare. Support for the Revolution.
More information about the Binutils
mailing list