diff options
author | Ken Raeburn <raeburn@cygnus> | 1993-10-13 20:54:03 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@cygnus> | 1993-10-13 20:54:03 +0000 |
commit | 56f61233b248b00565e0c6977eaa52912864620d (patch) | |
tree | b8422459f6ebd1ea5e0637dae405aa93f2056e7b /gas/config/obj-coffbfd.c | |
parent | 98b5caadf30574caa6ba56a280972aa04decc488 (diff) | |
download | gdb-56f61233b248b00565e0c6977eaa52912864620d.zip gdb-56f61233b248b00565e0c6977eaa52912864620d.tar.gz gdb-56f61233b248b00565e0c6977eaa52912864620d.tar.bz2 |
* config/obj-coffbfd.c (fixup_segment) [DIFF_EXPR_OK]: If
sub_symbolP is in the current segment, convert to a PC-relative
fixup and discard the symbol.
(Copied from write.c.)
Diffstat (limited to 'gas/config/obj-coffbfd.c')
-rw-r--r-- | gas/config/obj-coffbfd.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gas/config/obj-coffbfd.c b/gas/config/obj-coffbfd.c index b73dbff..d031884 100644 --- a/gas/config/obj-coffbfd.c +++ b/gas/config/obj-coffbfd.c @@ -2497,6 +2497,19 @@ DEFUN (fixup_segment, (segP, this_segment_type), { add_number -= S_GET_VALUE (sub_symbolP); } +#ifdef DIFF_EXPR_OK + else if (!pcrel + && S_GET_SEGMENT (sub_symbolP) == this_segment_type) + { + /* Make it pc-relative. */ + add_number += (md_pcrel_from (fixP) + - S_GET_VALUE (sub_symbolP)); + pcrel = 1; + fixP->fx_pcrel = 1; + sub_symbolP = 0; + fixP->fx_subsy = 0; + } +#endif else { as_bad ("Can't emit reloc {- %s-seg symbol \"%s\"} @ file address %ld.", |