Skip to contentSkip to conversation

HI16 / LO16 relocations.

DISCUSSION Ralf Baechle 1 participant 2 messages Aug 3, 1999 1 message not in the archive MIPS

lore
Share & tools
lore
#0 lore raw

Mark, for now I'm just posting this in the hope it may ring a bell. It seems like HI16 / LO16 relocation pairs are not handled correctly This may result in ``la $reg, symbol'' ending up after the final link as ``la $reg, symbol + 0x10000''.

I'll try to come up with a resonably small example tomorrow; right now I've just discovered this problem and can only show the problem in the diffs of disassembler listings between the two builds of a Linux kernel with binutils 2.8.1 and cvs-binutils.

Ralf

#2 lore raw
In reply to a message not in the archive
Quoted 7 lines · Mark Mitchell

As soon as you get a test-case, I'll take a look at this. It's fine even it's big, as long as you can point at the exact place that goes wrong; I'd really like to get this work behind me, and get everything back to a more stable state. 've compiled *millions* of lines of code on IRIX6 with the new linker without a problem; obviously the relocation patterns are very different from the N32/N64 ABI to the older ABIs.

I think the core differences are probably that I tried to compile non-pic code and code which tries to use GNU extensions. I intend to recompile the entire Linux distribution with this new linker which probably will trigger a few more bugs according to my past experience. Finally the Linux/MIPS64 kernel will exercise non-PIC 64-bit code - hopefully without triggering any new bugs ...

Ralf