diff options
author | Alan Modra <amodra@gmail.com> | 2001-07-23 13:03:40 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-07-23 13:03:40 +0000 |
commit | ac62c3468da474862067776e9cda6fb291aa53cf (patch) | |
tree | 6d2417c71e130ce8bd652b102de524254cd5a360 /gas/write.c | |
parent | 677537c186644c0b7ad48edcb759ea29d6c4f80e (diff) | |
download | gdb-ac62c3468da474862067776e9cda6fb291aa53cf.zip gdb-ac62c3468da474862067776e9cda6fb291aa53cf.tar.gz gdb-ac62c3468da474862067776e9cda6fb291aa53cf.tar.bz2 |
* symbols.c (S_GET_VALUE): Don't treat O_constant and local
symbols specially. Always resolve, adding fr_address to value.
* write.c (write_object_file): Don't add fr_address to sym values.
(relax_frag): Likewise.
(relax_segment): Likewise.
* config/obj-ieee.c (do_symbols): Likewise.
* config/tc-cris.c (md_convert_frag): Likewise.
* config/tc-fr30.c (md_convert_frag): Likewise.
* config/tc-i386.c (md_convert_frag): Likewise.
* config/tc-m32r.c (md_convert_frag): Likewise.
* config/tc-m68hc11.c (md_convert_frag): Likewise.
* config/tc-mcore.c (md_convert_frag): Likewise.
* config/tc-mips.c (mips16_extended_frag): Likewise.
* config/tc-ns32k.c (md_convert_frag): Likewise.
* config/tc-m68k.c (md_convert_frag_1): Likewise.
(BRANCHBWL, BRABSJUNC, BRABSJCOND, BRANCHBW, FBRANCH, DBCCLBR,
DBCCABSJ, PCREL1632, PCINDEX, ABSTOPCREL): Decrement.
(md_relax_table): Remove first four entries. Format.
(md_estimate_size_before_relax): Remove old_fix. Don't bother
setting fr_var. Simplify byte branch checks.
Diffstat (limited to 'gas/write.c')
-rw-r--r-- | gas/write.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/gas/write.c b/gas/write.c index 4e1e06a..41edcb3 100644 --- a/gas/write.c +++ b/gas/write.c @@ -1750,9 +1750,6 @@ write_object_file () /* Patch the jump table. */ /* This is the offset from ??? to table_ptr+0. */ to_addr = table_addr - S_GET_VALUE (lie->sub); -#ifdef BFD_ASSEMBLER - to_addr -= symbol_get_frag (lie->sub)->fr_address; -#endif #ifdef TC_CHECK_ADJUSTED_BROKEN_DOT_WORD TC_CHECK_ADJUSTED_BROKEN_DOT_WORD (to_addr, lie); #endif @@ -1769,9 +1766,6 @@ write_object_file () /* This is a long jump from table_ptr+0 to the final target. */ from_addr = table_addr; to_addr = S_GET_VALUE (lie->add) + lie->addnum; -#ifdef BFD_ASSEMBLER - to_addr += symbol_get_frag (lie->add)->fr_address; -#endif md_create_long_jump (table_ptr, from_addr, to_addr, lie->dispfrag, lie->add); table_ptr += md_long_jump_size; @@ -2115,7 +2109,7 @@ relax_frag (segment, fragP, stretch) #endif know (!(S_GET_SEGMENT (symbolP) == absolute_section) || sym_frag == &zero_address_frag); - target += S_GET_VALUE (symbolP) + sym_frag->fr_address; + target += S_GET_VALUE (symbolP); /* If frag has yet to be reached on this pass, assume it will move by STRETCH just as we did. @@ -2356,11 +2350,9 @@ relax_segment (segment_frag_root, segment) if (lie->added) continue; - offset = (symbol_get_frag (lie->add)->fr_address - + S_GET_VALUE (lie->add) + offset = (S_GET_VALUE (lie->add) + lie->addnum - - (symbol_get_frag (lie->sub)->fr_address - + S_GET_VALUE (lie->sub))); + - S_GET_VALUE (lie->sub)); if (offset <= -32768 || offset >= 32767) { if (flag_warn_displacement) @@ -2436,9 +2428,8 @@ relax_segment (segment_frag_root, segment) know (!(S_GET_SEGMENT (symbolP) == SEG_ABSOLUTE) || (symbolP->sy_frag == &zero_address_frag)); #endif - target += (S_GET_VALUE (symbolP) - + symbol_get_frag (symbolP)->fr_address); - } /* if we have a symbol */ + target += S_GET_VALUE (symbolP); + } know (fragP->fr_next); after = fragP->fr_next->fr_address; |