Skip to content
Commit 5f627cc2 authored by Daniel Bertalan's avatar Daniel Bertalan Committed by Nico Weber
Browse files

[lld-macho] Fix symbol name returned from InputSection::getLocation

This commit fixes the issue that getLocation always printed the name of
the first symbol in the section.

For clarity, upper_bound is used instead of a linear search for finding
the closest symbol name. Note that this change does not affect
performance: this function is only called when printing errors and
`symbols` typically contains a single symbol because of
.subsections_via_symbols.

Differential Revision: https://reviews.llvm.org/D127670
parent c39b76ae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment