diff options
author | Ian Lance Taylor <ian@airs.com> | 1999-09-12 00:02:11 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1999-09-12 00:02:11 +0000 |
commit | 7d2b58d612d16936cbfe8f171e68a4f278bc9ac5 (patch) | |
tree | 90bd6af584018eeecd79843ee3752a2a2c483c14 /bfd | |
parent | 0717ebb78071ba63f55a5bbb40f27f74200a9a7f (diff) | |
download | gdb-7d2b58d612d16936cbfe8f171e68a4f278bc9ac5.zip gdb-7d2b58d612d16936cbfe8f171e68a4f278bc9ac5.tar.gz gdb-7d2b58d612d16936cbfe8f171e68a4f278bc9ac5.tar.bz2 |
1999-09-11 Donn Terry <donn@interix.com>
* libpei.h (_bfd_pe_bfd_get_symbol_info): Declare.
* peigen.c (_bfd_pe_bfd_get_symbol_info): New function.
* peicode.h (coff_get_symbol_info): Define.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/libpei.h | 4 | ||||
-rw-r--r-- | bfd/peicode.h | 2 | ||||
-rw-r--r-- | bfd/peigen.c | 15 |
4 files changed, 24 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6a295e1..ae92bce 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -7,6 +7,10 @@ 1999-09-11 Donn Terry <donn@interix.com> + * libpei.h (_bfd_pe_bfd_get_symbol_info): Declare. + * peigen.c (_bfd_pe_bfd_get_symbol_info): New function. + * peicode.h (coff_get_symbol_info): Define. + * config.bfd (i[3456]86-*-interix*): Set targ_cflags to -DSTRICT_PE_FORMAT. * coffcode.h (styp_to_sec_flags): Check STRICT_PE_FORMAT rather diff --git a/bfd/libpei.h b/bfd/libpei.h index 8af543a..942aa78 100644 --- a/bfd/libpei.h +++ b/bfd/libpei.h @@ -234,7 +234,9 @@ unsigned int _bfd_pei_swap_scnhdr_out PARAMS ((bfd *, PTR, PTR)); boolean _bfd_pe_print_private_bfd_data_common PARAMS ((bfd *, PTR)); -boolean _bfd_pe_bfd_copy_private_bfd_data_common PARAMS ((bfd*, bfd*)); +boolean _bfd_pe_bfd_copy_private_bfd_data_common PARAMS ((bfd *, bfd *)); + +void _bfd_pe_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *)); /* The following are needed only for ONE of pe or pei, but don't otherwise vary; peicode.h fixes up ifdefs but we provide the diff --git a/bfd/peicode.h b/bfd/peicode.h index aac50cf..605b1c0 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -347,3 +347,5 @@ pe_bfd_copy_private_bfd_data (ibfd, obfd) #define coff_bfd_copy_private_section_data \ _bfd_pe_bfd_copy_private_section_data + +#define coff_get_symbol_info _bfd_pe_get_symbol_info diff --git a/bfd/peigen.c b/bfd/peigen.c index f959e14..8d623bd 100644 --- a/bfd/peigen.c +++ b/bfd/peigen.c @@ -1808,3 +1808,18 @@ _bfd_pe_bfd_copy_private_section_data (ibfd, isec, obfd, osec) return true; } + +void +_bfd_pe_get_symbol_info (abfd, symbol, ret) + bfd *abfd; + asymbol *symbol; + symbol_info *ret; +{ + coff_get_symbol_info (abfd, symbol, ret); + + if (pe_data (abfd) != NULL + && ((symbol->flags & BSF_DEBUGGING) == 0 + || (symbol->flags & BSF_DEBUGGING_RELOC) != 0) + && ! bfd_is_abs_section (symbol->section)) + ret->value += pe_data (abfd)->pe_opthdr.ImageBase; +} |