From 703153b5668996e80932ab4cde7972694a3c6d11 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sat, 11 Sep 1999 14:41:11 +0000 Subject: [PATCH] 1999-09-11 Donn Terry * syms.c (BSF_DEBUGGING_RELOC): Define. * coffgen.c (fixup_symbol_value): Relocate a symbol which has BSF_DEBUGGING_RELOC set. * bfd-in2.h: Rebuild. --- bfd/ChangeLog | 7 +++++++ bfd/bfd-in2.h | 7 ++++++- bfd/coffgen.c | 3 ++- bfd/syms.c | 7 ++++++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index aa16f61b75f..143fbc00a98 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +1999-09-11 Donn Terry + + * syms.c (BSF_DEBUGGING_RELOC): Define. + * coffgen.c (fixup_symbol_value): Relocate a symbol which has + BSF_DEBUGGING_RELOC set. + * bfd-in2.h: Rebuild. + 1999-09-10 Ian Lance Taylor * ecoff.c (bfd_debug_section): Update initialization for new diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index ec82e0c3256..b53329c5304 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -2303,7 +2303,7 @@ typedef struct symbol_cache_entry <> */ /* The symbol is a debugging record. The value has an arbitary - meaning. */ + meaning, unless BSF_DEBUGGING_RELOC is also set. */ #define BSF_DEBUGGING 0x08 /* The symbol denotes a function entry point. Used in ELF, @@ -2361,6 +2361,11 @@ typedef struct symbol_cache_entry others someday. */ #define BSF_OBJECT 0x10000 + /* This symbol is a debugging symbol. The value is the offset + into the section of the data. BSF_DEBUGGING should be set + as well. */ +#define BSF_DEBUGGING_RELOC 0x20000 + flagword flags; /* A pointer to the section to which this symbol is diff --git a/bfd/coffgen.c b/bfd/coffgen.c index feb57a35fc0..f090f103db4 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -585,7 +585,8 @@ fixup_symbol_value (abfd, coff_symbol_ptr, syment) syment->n_scnum = N_UNDEF; syment->n_value = coff_symbol_ptr->symbol.value; } - else if (coff_symbol_ptr->symbol.flags & BSF_DEBUGGING) + else if ((coff_symbol_ptr->symbol.flags & BSF_DEBUGGING) != 0 + && (coff_symbol_ptr->symbol.flags & BSF_DEBUGGING_RELOC) == 0) { syment->n_value = coff_symbol_ptr->symbol.value; } diff --git a/bfd/syms.c b/bfd/syms.c index 86dc66cbffc..676f067c2a3 100644 --- a/bfd/syms.c +++ b/bfd/syms.c @@ -227,7 +227,7 @@ CODE_FRAGMENT . <> *} . . {* The symbol is a debugging record. The value has an arbitary -. meaning. *} +. meaning, unless BSF_DEBUGGING_RELOC is also set. *} .#define BSF_DEBUGGING 0x08 . . {* The symbol denotes a function entry point. Used in ELF, @@ -285,6 +285,11 @@ CODE_FRAGMENT . others someday. *} .#define BSF_OBJECT 0x10000 . +. {* This symbol is a debugging symbol. The value is the offset +. into the section of the data. BSF_DEBUGGING should be set +. as well. *} +.#define BSF_DEBUGGING_RELOC 0x20000 +. . flagword flags; . . {* A pointer to the section to which this symbol is -- 2.30.2