diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-07-08 02:57:50 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-07-08 02:57:50 +0000 |
commit | 76fb6d2f2ff4cbb926a29aec7f2f623ae5dcd0d8 (patch) | |
tree | 030c099ed5ea2e1e711656f4c6b5aa7e6875738a /gas/config | |
parent | 4049609622e9f1c52c6f1a95b32aff84aba29aec (diff) | |
download | gdb-76fb6d2f2ff4cbb926a29aec7f2f623ae5dcd0d8.zip gdb-76fb6d2f2ff4cbb926a29aec7f2f623ae5dcd0d8.tar.gz gdb-76fb6d2f2ff4cbb926a29aec7f2f623ae5dcd0d8.tar.bz2 |
* config/tc-i386.c (tc_i386_fix_adjustable): Change ifndef
OBJ_AOUT to ifdef OBJ_ELF.
(md_apply_fix3): When mangling 32 bit PC relative reloc for
BFD_ASSEMBLER, handle one ELF case for COFF as well, and add a PE
case.
* write.c (fixup_segment): Change special case for i386-coff to
not apply for i386-pe.
* config/obj-coff.c (coff_adjust_section_syms): Only count fixups
which were not done.
(coff_frob_file_after_relocs): Rename from coff_frob_file.
(coff_format_ops): Initialize frob_file_after_relocs field rather
than frob_file field.
* config/obj-coff.h (coff_frob_file): Don't declare.
(coff_frob_file_after_relocs): Declare.
(obj_frob_file): Don't define.
(obj_frob_file_after_relocs): Define.
* configure.in: Set bfd_gas to yes for i386-*-cygwin32.
* configure: Rebuild.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-i386.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index a1e83c5..db88f6c 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -802,7 +802,7 @@ int tc_i386_fix_adjustable(fixP) fixS * fixP; { -#ifndef OBJ_AOUT +#ifdef OBJ_ELF /* Prevent all adjustments to global symbols. */ if (S_IS_EXTERN (fixP->fx_addsy)) return 0; @@ -2705,7 +2705,8 @@ md_apply_fix3 (fixP, valp, seg) if (fixP->fx_r_type == BFD_RELOC_32_PCREL && fixP->fx_addsy) { #ifndef OBJ_AOUT - if (OUTPUT_FLAVOR == bfd_target_elf_flavour) + if (OUTPUT_FLAVOR == bfd_target_elf_flavour + || OUTPUT_FLAVOR == bfd_target_coff_flavour) value += fixP->fx_where + fixP->fx_frag->fr_address; #endif #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) @@ -2720,6 +2721,12 @@ md_apply_fix3 (fixP, valp, seg) value += fixP->fx_where + fixP->fx_frag->fr_address; } #endif +#if defined (OBJ_COFF) && defined (TE_PE) + /* For some reason, the PE format does not store a section + address offset for a PC relative symbol. */ + if (S_GET_SEGMENT (fixP->fx_addsy) != seg) + value += md_pcrel_from (fixP); +#endif } /* Fix a few things - the dynamic linker expects certain values here, |