This is an archive of the discontinued LLVM Phabricator instance.

[LLD][ELF][AArch64] Guard --fix-cortex-a53-843419 against --just-syms
ClosedPublic

Authored by peter.smith on Sep 13 2018, 7:58 AM.

Details

Summary

If --just-syms is used the mapping symbols from the ELF file will be absolute symbols with no section. The code to process mapping symbols in --fix-cortex-a53-843419 assumes that these symbols have a defining section so a crash will result when --just-syms is used. The simple fix is to not
process the symbol when it doesn't have a section (there is no section to search for errata).

I'm a little surprised that --just-syms imports local symbols, as they are in theory not accessible from other objects.

Fixes PR37971 (https://bugs.llvm.org/show_bug.cgi?id=37971)

Diff Detail

Repository
rL LLVM

Event Timeline

peter.smith created this revision.Sep 13 2018, 7:58 AM
ruiu accepted this revision.Sep 13 2018, 8:12 AM

LGTM

This revision is now accepted and ready to land.Sep 13 2018, 8:12 AM
ruiu added a comment.Sep 13 2018, 8:14 AM

As to importing local symbols, I think we don't do anything special for --just-symbols. When you pass an object file as an argument for --just-symbols, we ignore section contents, but all symbols are handled normally.

This revision was automatically updated to reflect the committed changes.