diff options
author | Christopher Faylor <me+cygwin@cgf.cx> | 2004-07-03 16:07:51 +0000 |
---|---|---|
committer | Christopher Faylor <me+cygwin@cgf.cx> | 2004-07-03 16:07:51 +0000 |
commit | c87db184a7dd1e5542b807ae6d29db02b8ea0f5e (patch) | |
tree | 7b731760ae09b88e4dcdc976bc50a97c2d8478d5 /gas/config/tc-i386.c | |
parent | 3b91255ea0fa465d5c79abc774e6c7aec13ca513 (diff) | |
download | gdb-c87db184a7dd1e5542b807ae6d29db02b8ea0f5e.zip gdb-c87db184a7dd1e5542b807ae6d29db02b8ea0f5e.tar.gz gdb-c87db184a7dd1e5542b807ae6d29db02b8ea0f5e.tar.bz2 |
2004-07-04 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
* bfd/cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
externals properly.
* src/gas/config/obj-coff.c (obj_coff_weak): New .weak syntax for PE weak
externals.
* binutils/doc/binutils.texi (nm): Clarify weak symbol description.
* gas/config/tc-i386.c (tc_gen_reloc): Use addend for weak symbols in TE_PE.
* gas/doc/as.texinfo (Weak): Document PE weak symbols.
* ld/ld.texinfo (WIN32): Document PE weak symbols.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r-- | gas/config/tc-i386.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 823435f..cc95843 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -5280,6 +5280,12 @@ tc_gen_reloc (section, fixp) *rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); rel->address = fixp->fx_frag->fr_address + fixp->fx_where; + +#ifdef TE_PE + if (S_IS_WEAK (fixp->fx_addsy)) + rel->addend = rel->address - (*rel->sym_ptr_ptr)->value + 4; + else +#endif if (!use_rela_relocations) { /* HACK: Since i386 ELF uses Rel instead of Rela, encode the |