This section stores 32-bit TEXT segment offsets of initializer
functions, and is used instead of mod_init_func when chained fixups
are enabled.
Storing the offsets lets us avoid needing to fix up the initializers.
Paths
| Differential D132947
[lld-macho] Support synthesizing __TEXT,__init_offsets ClosedPublic Authored by BertalanD on Aug 30 2022, 8:05 AM.
Details
Summary This section stores 32-bit TEXT segment offsets of initializer Storing the offsets lets us avoid needing to fix up the initializers.
Diff Detail
Event TimelineBertalanD added a child revision: D132560: [lld-macho] Add initial support for chained fixups.Aug 30 2022, 8:11 AM Comment Actions Looks great!
This revision is now accepted and ready to land.Aug 30 2022, 8:35 AM BertalanD added inline comments.
Comment Actions Addressed review comments. I'm going to wait with landing this until tomorrow in case someone wants to make some suggestions.
This revision was landed with ongoing or failed builds.Aug 31 2022, 1:22 AM Closed by commit rG389e0a81a15c: [lld-macho] Support synthesizing __TEXT,__init_offsets (authored by BertalanD). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 456890 lld/MachO/Config.h
lld/MachO/Driver.cpp
lld/MachO/InputSection.h
lld/MachO/MarkLive.cpp
lld/MachO/Options.td
lld/MachO/OutputSegment.cpp
lld/MachO/Symbols.h
lld/MachO/SyntheticSections.h
lld/MachO/SyntheticSections.cpp
lld/MachO/Writer.cpp
lld/test/MachO/init-offsets.s
llvm/include/llvm/BinaryFormat/MachO.h
llvm/lib/MC/MCSectionMachO.cpp
llvm/tools/llvm-objdump/MachODump.cpp
|
Looks like ld64 also adds the arg to -init (we don't implement this flag yet, but should probably have a FIXME somewhere to add it to initOffsets once we do?)