diff options
author | Tom Tromey <tromey@adacore.com> | 2023-01-13 09:17:27 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-02-08 08:20:12 -0700 |
commit | 5abbfa982215a5bcd2bf2c0b92cbb005464dc927 (patch) | |
tree | 05b3c8db1334df004607495ec65bee99f05433b5 | |
parent | d401e7bf04c0949dcc5e3d83143b75efc19d5f1e (diff) | |
download | binutils-5abbfa982215a5bcd2bf2c0b92cbb005464dc927.zip binutils-5abbfa982215a5bcd2bf2c0b92cbb005464dc927.tar.gz binutils-5abbfa982215a5bcd2bf2c0b92cbb005464dc927.tar.bz2 |
Set section index when setting a symbol's block
When a symbol's block is set, the block has the runtime section offset
applied. So, it seems to me that the symbol implicitly is in the same
section as the block. Therefore, this patch sets the symbol's section
index at this same spot.
-rw-r--r-- | gdb/buildsym.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c index d82c767..8dbb327 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -245,6 +245,7 @@ buildsym_compunit::finish_block_internal struct type *ftype = symbol->type (); struct mdict_iterator miter; symbol->set_value_block (block); + symbol->set_section_index (SECT_OFF_TEXT (m_objfile)); block->set_function (symbol); if (ftype->num_fields () <= 0) |