This is the mail archive of the 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]

[arm] Don't "adjust" EABI relocations

The patch below prevents the linker applying the 8-byte pc offset adjustment 
to relocations in new eabi objects. These can have an EI_OSABI of zero.

It's unclear which "old" toolchains get this wrong. Is this the now-dead 
arm-elf-oabi configuration? If so I'll just rip the whole thing out.

Tested cross to arm-none-{elf,eabi} and built --enable-targets=all.


2004-11-30  Paul Brook  <>

 * elf32-arm.c (elf32_arm_final_link_relocate): Don't adjust
 relocations in new EABI objects.
Index: elf32-arm.c
RCS file: /cvs/src/src/bfd/elf32-arm.c,v
retrieving revision 1.11
diff -u -p -r1.11 elf32-arm.c
--- elf32-arm.c	24 Nov 2004 14:44:42 -0000	1.11
+++ elf32-arm.c	30 Nov 2004 15:32:50 -0000
@@ -2545,7 +2545,9 @@ elf32_arm_final_link_relocate (reloc_how
 		  i_ehdrp = elf_elfheader (input_bfd);
-		  if (i_ehdrp->e_ident[EI_OSABI] == 0)
+		  if (i_ehdrp->e_ident[EI_OSABI] == 0
+		      && EF_ARM_EABI_VERSION (i_ehdrp->e_flags)
 		    value -= 8;

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