This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Binutils 2.28 on PowerPC: dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: binutils at sourceware dot org
- Date: Thu, 1 Jun 2017 12:07:54 +0200 (CEST)
- Subject: Binutils 2.28 on PowerPC: dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA
- Authentication-results: sourceware.org; auth=none
Hello,
I get the following errors using Binutils 2.28 on PowerPC for a bootloader program that is supposed to load an application image:
powerpc-rtems4.12-ld -o capture.ralf bootloader.o --just-symbols=capture.exe -b binary rtems.gz -T ppcboot.lds
bootloader.o: In function `start':
head.S:140:(.text+0x8a): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA
head.S:141:(.text+0x8e): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
head.S:157:(.text+0xb2): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA
head.S:159:(.text+0xba): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
bootloader.o: In function `moved':
head.S:182:(.text+0xf2): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
head.S:229:(.text+0x152): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA
head.S:230:(.text+0x156): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
head.S:257:(.text+0x16e): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA
head.S:259:(.text+0x176): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA
head.S:261:(.text+0x17e): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
head.S:262:(.text+0x182): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
bootloader.o: In function `reloc':
head.S:316:(.text+0x1de): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
head.S:330:(.text+0x206): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
bootloader.o: In function `exit':
misc.c:68:(.text.exit+0x28): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
bootloader.o: In function `zfree':
misc.c:101:(.text.zfree+0x14): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
bootloader.o: In function `zalloc':
misc.c:91:(.text.zalloc+0x2c): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:94:(.text.zalloc+0x58): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
bootloader.o: In function `hang':
misc.c:78:(.text.hang+0x44): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:83:(.text.hang+0x6c): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
bootloader.o: In function `gunzip':
misc.c:141:(.text.gunzip+0xf4): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:150:(.text.gunzip+0x124): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:156:(.text.gunzip+0x144): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:121:(.text.gunzip+0x194): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:152:(.text.gunzip+0x1a0): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:143:(.text.gunzip+0x1ac): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:135:(.text.gunzip+0x1b8): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
bootloader.o: In function `decompress_kernel':
misc.c:171:(.text.decompress_kernel+0x50): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
This error is not present on the Git master of Binutils. A Git bisect revealed this:
3ce512885ba76da53fae84cd1a555bc721fdd25e is the first bad commit
commit 3ce512885ba76da53fae84cd1a555bc721fdd25e
Author: Alan Modra <amodra@gmail.com>
Date: Wed Jul 20 10:33:14 2016 +0930
Mark some more powerpc relocs as not handled by generic linker
* elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_PLTREL32>): Put
ppc64_elf_unhandled_reloc for special_function.
* elf32-ppc.c (ppc_elf_howto_raw): Similarly for lots of relocs.
:040000 040000 14d4373b29d8869d265ad3cce13a3bf7c3c9b604 b3178f48ebaad5f02515811ad7bab72cd046716b M bfd
I am now a bit unsure if this is an error in Binutils or our use of Binutils. If it was an error, how was it fixed in the meantime?
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : [ http://lists.rtems.org/mailman/listinfo/devel | sebastian.huber at embedded-brains.de ] PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.