[patch] elf32-arm.c: Fix shared library creation on arm-none-symbianelf.
Alan Modra
amodra@bigpond.net.au
Tue Jul 26 13:17:00 GMT 2005
More information about the Binutils mailing list
Tue Jul 26 13:17:00 GMT 2005
- Previous message (by thread): [patch] elf32-arm.c: Fix shared library creation on arm-none-symbianelf.
- Next message (by thread): [m32c] new relocs, pointer bugfix.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Jul 25, 2005 at 01:17:02PM -0700, Kazu Hirata wrote: > Hi, > > Attached is a patch to fix shared library creation on > arm-none-symbianelf. > > Consider a simple object file that comes from: > > .comm g,4,4 > > When I try to create a shared library with this object file, I get: > > ./ld-new: a.out: could not find output section .got for input section .got > ./ld-new: final link failed: Nonrepresentable section on output > > The problem is that the linker wants to output _GLOBAL_OFFSET_SYMBOL_ > to the .got section, but before that happens, > elf32_arm_size_dynamic_sections prunes the .got section by adding > SEC_EXCLUDE to the .got section's flags. > > The patch fixes the problem by keeping the .got section even if it's > empty. > > Tested by building i686-pc-linux-gnu X arm-none-symbianelf. I have a > strong feeling that I am papering over a real bug elsewhere, but I > don't know where to go from here. You see this on symbianelf because the got header is defined to be zero size. /* There is no .got section for BPABI objects, and hence no header. */ #undef elf_backend_got_header_size #define elf_backend_got_header_size 0 However, that comment makes me think you shouldn't have a _GLOBAL_OFFSET_TABLE_ symbol either. If the comment is correct, then perhaps you need #define elf_backend_want_got_sym 0 -- Alan Modra IBM OzLabs - Linux Technology Centre
- Previous message (by thread): [patch] elf32-arm.c: Fix shared library creation on arm-none-symbianelf.
- Next message (by thread): [m32c] new relocs, pointer bugfix.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list