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


Simon Vallet <linux-ppc@castalie.org> writes:

> On Fri, 19 Jan 2007 14:59:35 +0000
> Nick Clifton <nickc@redhat.com> wrote:
> 
> > 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 ?
> 
> This is the question : the Mach-O spec is not clear at all on
> this topic and does not describe byte arrangement into the storage
> units. The only thing that is clear is that those relocations have an
> r_type that handles 16 bits, and an r_length (length of the item to be
> relocated) indicating it is a 4-byte unit... looking at the actual
> instructions, it seems the relocated bits are always the lower ones

You can get away with that on a RISC chip where all the instructions
are aligned on a 32-bit boundary.

It is considerably more problematic on x86.

Ian


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