diff options
author | Alan Modra <amodra@gmail.com> | 2002-09-05 00:01:18 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-09-05 00:01:18 +0000 |
commit | a161fe53205dbc69d42f5a123b2b04346724b2de (patch) | |
tree | bb28dde4f0deee90db9e7a8247fb82dd2e4933fe /gas/config/tc-i386.c | |
parent | 8f8429869e9a245fe48b8c69bde2bffa3d6c7734 (diff) | |
download | gdb-a161fe53205dbc69d42f5a123b2b04346724b2de.zip gdb-a161fe53205dbc69d42f5a123b2b04346724b2de.tar.gz gdb-a161fe53205dbc69d42f5a123b2b04346724b2de.tar.bz2 |
gas reloc rewrite.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r-- | gas/config/tc-i386.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 59e19dd..e79ae77 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -1213,15 +1213,11 @@ tc_i386_fix_adjustable (fixP) if (OUTPUT_FLAVOR != bfd_target_elf_flavour) return 1; - /* Prevent all adjustments to global symbols, or else dynamic - linking will not work correctly. */ - if (S_IS_EXTERNAL (fixP->fx_addsy) - || S_IS_WEAK (fixP->fx_addsy) - /* Don't adjust pc-relative references to merge sections in 64-bit - mode. */ - || (use_rela_relocations - && (S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0 - && fixP->fx_pcrel)) + /* Don't adjust pc-relative references to merge sections in 64-bit + mode. */ + if (use_rela_relocations + && (S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0 + && fixP->fx_pcrel) return 0; /* adjust_reloc_syms doesn't know about the GOT. */ @@ -4597,7 +4593,7 @@ md_apply_fix3 (fixP, valP, seg) } } - if (fixP->fx_pcrel + if (fixP->fx_addsy != NULL && (fixP->fx_r_type == BFD_RELOC_32_PCREL || fixP->fx_r_type == BFD_RELOC_16_PCREL || fixP->fx_r_type == BFD_RELOC_8_PCREL) @@ -5113,6 +5109,17 @@ i386_validate_fix (fixp) } } +boolean +i386_force_relocation (fixp) + fixS *fixp; +{ + if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT + || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) + return 1; + + return S_FORCE_RELOC (fixp->fx_addsy); +} + arelent * tc_gen_reloc (section, fixp) asection *section ATTRIBUTE_UNUSED; |