This adds NMAGIC/OMAGIC support to lld ELF.
Diff Detail
Event Timeline
include/lld/ReaderWriter/ELFTargetInfo.h | ||
---|---|---|
42 | Please add a prefix ("MAGIC_" or something) to enum constants. DEFAULT seems a bit confusing in particular. | |
lib/ReaderWriter/ELF/Chunk.h | ||
83 | In what situation it can be unknown? | |
lib/ReaderWriter/ELF/Reader.cpp | ||
109 | We need a better diagnostics here. | |
lib/ReaderWriter/ELF/SegmentChunks.h | ||
433 | This condition appears three times. Let's make it a separate function. |
lib/ReaderWriter/ELF/Reader.cpp | ||
---|---|---|
109 | Couldnt find a better error code. Once we have the diagnostics infrastructure, we should report this properly. |
Just curious, is there any real need for NMAGIC and OMAGIC? My understanding about them is they are used in old Unixes and designed to be compact on disk by overlapping segments in one page. I'm wondering what I'd use these formats for.
Its still a supported feature in the other linkers including gold, that are available. Some platforms use this to reduce the amount of virtual address space for a process by merging text/data together.
include/lld/ReaderWriter/ELFTargetInfo.h | ||
---|---|---|
49 | Ok. |
Please add a prefix ("MAGIC_" or something) to enum constants. DEFAULT seems a bit confusing in particular.