Page MenuHomePhabricator

[LLD][ELF] - Report a location for symbols from the linker script when reporting an error.
ClosedPublic

Authored by grimar on Dec 6 2018, 2:55 AM.

Details

Summary

When we report an error for symbols defined in the linker script,
we do not report the location properly.

For example:

ld.lld: error: relocation R_AARCH64_CALL26 cannot refer to absolute symbol: aliasto__text
>>> defined in <internal>
>>> referenced by rtoabs.o:(.text+0x4)

Previously I suggested introducing a synthetic file that would allow avoiding having
zero (nullptr) files and reporting the "<internal>" location. That approach was not accepted,
this patch implements a local, straightforward, less intrusive solution.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar created this revision.Dec 6 2018, 2:55 AM
grimar edited the summary of this revision. (Show Details)Dec 6 2018, 3:07 AM
ruiu accepted this revision.Dec 18 2018, 3:02 PM

LGTM

This revision is now accepted and ready to land.Dec 18 2018, 3:02 PM
This revision was automatically updated to reflect the committed changes.