Subject: HI16 / LO16 relocations.

From: Ralf Baechle <[email-masked]>
Date: Wed, 4 Aug 1999 00:09:08 +0200

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

---

From: Ralf Baechle <[email-masked]>
Date: Wed, 4 Aug 1999 01:01:00 +0200

On Tue, Aug 03, 1999 at 03:42:36PM -0700, Mark Mitchell wrote:

> 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