This is the mail archive of the binutils@sources.redhat.com 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]

Re: Fix relocation bug


Bo Thorsen <bo@suse.de> writes:

|> This bugfix feels wrong, so I would like some feedback on why it is
|> necessary and perhaps a better way to fix it.
|> 
|> The problem was that R_X86_64_PC32 relocations were calculated
|> wrong. Replacing the bfd_elf_generic_reloc with zeros in the howto table
|> solved it, but it is probably not correct to do this for all entries.

This looks wrong.  Have you tried setting partial_inplace to false for all
entries?  Since x86-64 uses RELA relocations, this should not be set, see
the comment in reloc.c:

.          All relocations for all ELF USE_RELA targets should set this field
.          to FALSE (values of TRUE should be looked on with suspicion).

Andreas.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg


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