From aff1a65ecb5cfcf1abfb23ea0e0f37f39e75683e Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 24 Jul 2015 16:44:27 +0100 Subject: Fix the evaluation of RL78 complex relocs, by making immediate values be computed relative to a new absolute symbol. gas * config/tc-rl78.c (rl78_abs_sym): New local variable. (md_begin): Initialise the new symbol. (OPIMM): Define the value to be relative to the new symbol and not the absolute section symbol. ld * emulparams/elf32rl78.sh (OTHER_SECTIONS): Provide a value for the _-rl78_abs__ symbol. tests * gas/all/struct.d: Allow for extra symbols in the output. * gas/macros/test1.d: Likewise. * gas/elf/elf.exp: Add an rl78 machine. * gas/elf/sections2e-rl78: New file. tests * binutils-all/localize-hidden-1.d: Allow for extra symbols in the output. * binutils-all/strip-11.d: Skip for the RL78. --- ld/ChangeLog | 5 +++++ ld/emulparams/elf32rl78.sh | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'ld') diff --git a/ld/ChangeLog b/ld/ChangeLog index 15137e2..6df6a86 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2015-07-24 Nick Clifton + + * emulparams/elf32rl78.sh (OTHER_SECTIONS): Provide a value for + the _-rl78_abs__ symbol. + 2015-07-20 Alan Modra * emulparams/criself.sh (INIT_ADDR, FINI_ADDR): Define. diff --git a/ld/emulparams/elf32rl78.sh b/ld/emulparams/elf32rl78.sh index e305aa1..7073efb 100644 --- a/ld/emulparams/elf32rl78.sh +++ b/ld/emulparams/elf32rl78.sh @@ -8,7 +8,7 @@ ENTRY=_start EMBEDDED=yes TEMPLATE_NAME=elf32 ELFSIZE=32 -EXTRA_EM_FILE=needrelax +# EXTRA_EM_FILE=needrelax MAXPAGESIZE=256 # This is like setting STACK_ADDR to 0xffedc, except that the setting can # be overridden, e.g. --defsym _stack=0x0f00, and that we put an extra @@ -21,6 +21,7 @@ test -z "$CREATE_SHLIB" && OTHER_SECTIONS=" .stack ${RELOCATING-0}${RELO ${RELOCATING+__stack = .;} *(.stack) LONG(0xdead) - }" + } + ${RELOCATING+PROVIDE (__rl78_abs__ = 0);}" # We do not need .stack for shared library. test -n "$CREATE_SHLIB" && OTHER_SECTIONS="" -- cgit v1.1