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] |
+ // This is a copy of the relocate_section() function in target-reloc.h, + // except with the additional calls to convert_host to fix up the + // extracted information. + // FIXME: There ought to be a better way to do this.
Yes, there ought to be a better way to do this. If your code is correct, then it looks like the problem is that you have a little-endian object but the reloc fields are written with big-endian data. The comment at the top of the file suggests that the symbol table is also written with big-endian data, in which case I think this code is insufficient.
Anyhow, if the reloc fields are consistenly written big-endian, then the right approach is not to call convert_host, but instead to change
+ typedef Reloc_types<elfcpp::SHT_RELA, 32, false>::Reloc Reltype;
to
+ typedef Reloc_types<elfcpp::SHT_RELA, 32, true>::Reloc Reltype;
That will cause the reloc code to fetch values big-endian rather than little-endian.
Cheers Nick
Attachment:
rx.gold.patch.2
Description: Unix manual page
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |