diff options
author | Tom Tromey <tom@tromey.com> | 2023-02-26 10:29:22 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-03-08 12:11:49 -0700 |
commit | 100e3935319c862235239d06e963f8b807624d90 (patch) | |
tree | 404bfcf0c9305d56feb9ab89e1dc7d507f3911f9 /gdb/buildsym.c | |
parent | 5992fb8541f1c108681468bb48640f0c7dec1709 (diff) | |
download | binutils-100e3935319c862235239d06e963f8b807624d90.zip binutils-100e3935319c862235239d06e963f8b807624d90.tar.gz binutils-100e3935319c862235239d06e963f8b807624d90.tar.bz2 |
Remove OBJF_REORDERED
OBJF_REORDERED is set for nearly every object format. And, despite
the ominous warnings here and there, it does not seem very expensive.
This patch removes the flag entirely.
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/buildsym.c')
-rw-r--r-- | gdb/buildsym.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c index dbc8172..712ca4b 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -789,10 +789,9 @@ buildsym_compunit::end_compunit_symtab_get_static_block (CORE_ADDR end_addr, } } - /* Reordered executables may have out of order pending blocks; if - OBJF_REORDERED is true, then sort the pending blocks. */ - - if ((m_objfile->flags & OBJF_REORDERED) && m_pending_blocks) + /* Executables may have out of order pending blocks; sort the + pending blocks. */ + if (m_pending_blocks != nullptr) { struct pending_block *pb; @@ -903,15 +902,14 @@ buildsym_compunit::end_compunit_symtab_with_blockvector return (ln1.pc < ln2.pc); }; - /* Like the pending blocks, the line table may be scrambled in - reordered executables. Sort it if OBJF_REORDERED is true. It - is important to preserve the order of lines at the same - address, as this maintains the inline function caller/callee + /* Like the pending blocks, the line table may be scrambled + in reordered executables. Sort it. It is important to + preserve the order of lines at the same address, as this + maintains the inline function caller/callee relationships, this is why std::stable_sort is used. */ - if (m_objfile->flags & OBJF_REORDERED) - std::stable_sort (subfile->line_vector_entries.begin (), - subfile->line_vector_entries.end (), - lte_is_less_than); + std::stable_sort (subfile->line_vector_entries.begin (), + subfile->line_vector_entries.end (), + lte_is_less_than); } /* Allocate a symbol table if necessary. */ |