bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MIPS HI16 relocation problem with split addresses


From: Mark Rustad
Subject: MIPS HI16 relocation problem with split addresses
Date: Tue, 3 Jun 2003 12:04:28 -0500

Folks,

I have found a MIPS HI16 relocation problem with binutils-2.13.1. The problem shows up when combining objects as follows:

address@hidden 553$ mips-ld -r -o xxx.o fails.o
mips-ld: final link failed: Bad value

I tracked this down to a function that ends with an lui instruction, thereby having a R_MIPS_HI16 relocation. It appears that code in bfd/elfxx-mips.c expects that there must be a matching LO16 relocation following the HI16, but in this case, the matching LO16 comes before the HI16.

I have attached a somewhat stripped-down assembly source that demonstrates the problem. For now, I can work around this issue by passing -mno-split-addresses to GCC to avoid generating sequences like this.

Attachment: fails.s
Description: Binary data



--
Mark Rustad           voice: 612-385-3371  email: address@hidden
BRECIS Communications   fax: 952-933-7942

reply via email to

[Prev in Thread] Current Thread [Next in Thread]