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: ELFPPC32 / final link failed: Bad value


Hi Simon,

One bugfix involved adjusting r_offset in the Elf32_Rela structs for
relocations involving half16 storage units, since the corresponding
Mach-O reloc types point to the whole instruction, not only the
affected 16 bits. But this means I'm generating "unaligned" r_offsets
in 4-byte aligned sections.

Could this be the cause ?

It most certainly could.


It sounds like Mach-O reloc is broken, since if the reloc is only supposed to change 16 bits, but the offset points to the start of a 32-bit word, how does the linker know which 16-bits to change ? Presumably there is some magic knowledge about the type of thing stored in the 32-bit word and so the correct 16-bits are supposed to be known to the linker.

Cheers
  Nick



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