They operate like Defined symbols but with no associated InputSection.
Note that ld64 seems to treat the weak definition flag like a no-op for
absolute symbols, so I have replicated that behavior.
Paths
| Differential D87909
[lld-macho] Support absolute symbols ClosedPublic Authored by int3 on Sep 18 2020, 8:38 AM.
Details
Summary They operate like Defined symbols but with no associated InputSection. Note that ld64 seems to treat the weak definition flag like a no-op for
Diff Detail
Event TimelineComment Actions LGTM
This revision is now accepted and ready to land.Sep 22 2020, 12:21 PM This revision was landed with ongoing or failed builds.Sep 25 2020, 11:29 AM Closed by commit rG62a3f0c9844b: [lld-macho] Support absolute symbols (authored by int3). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 294380 lld/MachO/ExportTrie.cpp
lld/MachO/InputFiles.h
lld/MachO/InputFiles.cpp
lld/MachO/SymbolTable.cpp
lld/MachO/Symbols.h
lld/MachO/Symbols.cpplld/MachO/SyntheticSections.cpp
lld/test/MachO/abs-symbols.s
lld/test/MachO/invalid/abs-duplicate.s
lld/test/MachO/invalid/dso-handle-duplicate.s
|
If you don't anticipate the logic here getting more complex, we could just do a one-liner (and potentially move it back to the header).