diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2003-05-23 16:16:00 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2003-05-23 16:16:00 +0000 |
commit | 182d43bc6e1189a59266098815d5793349497699 (patch) | |
tree | 85123d165fef1675c6583d07a7f500edf8492d4a | |
parent | e8f3fcdde6305c944da30d31b01a2bbf6d988e61 (diff) | |
download | gdb-182d43bc6e1189a59266098815d5793349497699.zip gdb-182d43bc6e1189a59266098815d5793349497699.tar.gz gdb-182d43bc6e1189a59266098815d5793349497699.tar.bz2 |
2003-05-23 Raoul Gough <RaoulGough@yahoo.co.uk>
Committed by Elena Zannoni <ezannoni@redhat.com>.
* coffread.c(coff_symtab_read): Do relocate static symbols from PE
files, don't relocate absolute symbols (and do use mst_abs).
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/coffread.c | 16 |
2 files changed, 19 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9d3656b..1cc7db1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2003-05-23 Raoul Gough <RaoulGough@yahoo.co.uk> + + Committed by Elena Zannoni <ezannoni@redhat.com>. + * coffread.c(coff_symtab_read): Do relocate static symbols from PE + files, don't relocate absolute symbols (and do use mst_abs). + 2003-05-23 Andrew Cagney <cagney@redhat.com> * objc-lang.c: Include "gdb_assert.h". diff --git a/gdb/coffread.c b/gdb/coffread.c index 6daf7b4..81def0a 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -869,7 +869,6 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms, print_address_symbolic work right without the (now gone) "set fast-symbolic-addr off" kludge. */ - /* FIXME: should use mst_abs, and not relocate, if absolute. */ enum minimal_symbol_type ms_type; int sec; @@ -891,12 +890,23 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms, || cs->c_sclass == C_THUMBEXT ? mst_bss : mst_file_bss; } + else if (cs->c_secnum == N_ABS) + { + /* Use the correct minimal symbol type (and don't + relocate) for absolute values. */ + ms_type = mst_abs; + sec = cs_to_section (cs, objfile); + tmpaddr = cs->c_value; + } else { sec = cs_to_section (cs, objfile); tmpaddr = cs->c_value; - if (cs->c_sclass == C_EXT || cs->c_sclass == C_THUMBEXTFUNC - || cs->c_sclass == C_THUMBEXT) + /* Statics in a PE file also get relocated */ + if (cs->c_sclass == C_EXT + || cs->c_sclass == C_THUMBEXTFUNC + || cs->c_sclass == C_THUMBEXT + || (pe_file && (cs->c_sclass == C_STAT))) tmpaddr += ANOFFSET (objfile->section_offsets, sec); if (sec == SECT_OFF_TEXT (objfile)) |