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/10337: strip breaks statically linked binaries with .rela.plt section


On Sat, Jun 27, 2009 at 08:57:20AM -0700, H.J. Lu wrote:
> 2. We use
> 
> hdr->sh_link != elf_onesymtab (abfd)
> 
> to check if sh_link points to the main symbol table. But SHN_UNDEF
> will never be the main symbol table.
> 
> This patch fixes it with a testcase. I will check it in as an obvious
> fix.

I think this change is wrong.  If you treat relocation sections as
normal sections then you lose all the special BFD processing of
relocs.  For example, objcopy --adjust-vma on an executable will not
modify reloc addresses for you.  How hard is it to support reloc
sections with no associated symbol table?

-- 
Alan Modra
Australia Development Lab, IBM


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