diff options
author | Alan Modra <amodra@gmail.com> | 2000-09-18 12:36:03 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2000-09-18 12:36:03 +0000 |
commit | 9e75421134a05366b5d987f1b6921d7afcf9325d (patch) | |
tree | 5b1a9307de5f4cf72a7990eab2d217c6788dc689 /gas/config/tc-hppa.c | |
parent | 25f7275229d72c4a5449a1dbb49c3a3de2a92536 (diff) | |
download | gdb-9e75421134a05366b5d987f1b6921d7afcf9325d.zip gdb-9e75421134a05366b5d987f1b6921d7afcf9325d.tar.gz gdb-9e75421134a05366b5d987f1b6921d7afcf9325d.tar.bz2 |
* config/tc-hppa.h (TC_FORCE_RELOCATION_SECTION): For ELF, allow
subtraction of two syms without emitting a relocation.
* config/tc-hppa.c (hppa_force_relocation): Force relocations for
global or weak symbols.
Diffstat (limited to 'gas/config/tc-hppa.c')
-rw-r--r-- | gas/config/tc-hppa.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c index c78d913..dcaae9b 100644 --- a/gas/config/tc-hppa.c +++ b/gas/config/tc-hppa.c @@ -8416,9 +8416,15 @@ hppa_force_relocation (fixp) return 1; #endif + /* Ensure we emit a relocation for global symbols so that dynamic + linking works. */ + if (fixp->fx_addsy && (S_IS_EXTERNAL (fixp->fx_addsy) + || S_IS_WEAK (fixp->fx_addsy))) + return 1; + /* It is necessary to force PC-relative calls/jumps to have a relocation entry if they're going to need either a argument relocation or long - call stub. FIXME. Can't we need the same for absolute calls? */ + call stub. */ if (fixp->fx_pcrel && fixp->fx_addsy && (arg_reloc_stub_needed (symbol_arg_reloc_info (fixp->fx_addsy), hppa_fixp->fx_arg_reloc))) |