Jakub Konka
9487007ffe
elf: port more linker tests
2023-10-16 19:33:05 +02:00
Jakub Konka
1efc0519ce
elf: make init/fini sorting deterministic
2023-10-16 19:33:05 +02:00
Jakub Konka
44f3085851
elf: refactor tests and disable currently impossible combinations
2023-10-16 19:33:05 +02:00
Jakub Konka
df656c4eef
elf: test exporting symbols in exes
2023-10-16 19:33:05 +02:00
Jakub Konka
f2ad71991a
elf: test --export-dynamic flag
2023-10-16 19:33:05 +02:00
Jakub Konka
20980b33e3
elf: test entry point
2023-10-16 19:33:05 +02:00
Jakub Konka
9861a9ea75
elf: test various copyrel edge cases
2023-10-16 19:33:05 +02:00
Jakub Konka
b6006df565
elf: refactor canonical PLT test
2023-10-16 19:33:05 +02:00
Jakub Konka
1772dbb503
elf: fix generating .plt.got indirection
2023-10-16 19:33:05 +02:00
Jakub Konka
06f3b385c4
elf: fix alignment of .eh_frame_hdr section
2023-10-16 19:33:05 +02:00
Jakub Konka
a748ca3725
elf: populate symtab with symbols coming from DSOs
2023-10-16 19:33:05 +02:00
Jakub Konka
c940735c4d
elf: port more linker tests
2023-10-16 19:33:05 +02:00
Jakub Konka
149dd82d54
elf: add --as-needed test
2023-10-16 19:33:05 +02:00
Jakub Konka
7ff9461b88
elf: test large alignment of funcs in exe
2023-10-16 19:33:05 +02:00
Jakub Konka
11bdfe1179
elf: test large alignment of funcs in DSO
2023-10-16 19:33:04 +02:00
Jakub Konka
031e12b963
elf: override default dynamic linker path with system\`s dl when appropriate
2023-10-16 19:33:04 +02:00
Jakub Konka
62c6c4a46d
elf: more DSO tests
2023-10-16 19:33:04 +02:00
Jakub Konka
2f497f9f05
elf: emit .got.plt when emitting .plt
2023-10-16 19:33:04 +02:00
Jakub Konka
e53fa93170
elf: test basic DSO generation and linking
2023-10-16 19:33:04 +02:00
Jakub Konka
ac03a35e82
elf: test common symbols in archives
2023-10-16 19:33:04 +02:00
Jakub Konka
cf2c8c0789
elf: test common symbols handling
2023-10-16 19:33:04 +02:00
Jakub Konka
def7190e84
elf: hook up common symbols handler
2023-10-16 19:33:04 +02:00
Jakub Konka
f4c1b1d9ad
elf: implement --verbose-link, and other fixes
2023-10-16 19:33:04 +02:00
Jakub Konka
4af5caa81f
elf: add missing generators for special dynamic sections
2023-10-16 19:33:04 +02:00
Jakub Konka
5fa90afb64
elf: fix synthetic section handling and actually parse DSOs
2023-10-16 19:33:04 +02:00
Jakub Konka
d1446565a1
elf: re-enable dynamic linking codepaths
2023-10-16 19:33:04 +02:00
Jakub Konka
04a8f217c6
elf: fix COMDAT deduping logic
2023-10-16 19:33:04 +02:00
Jakub Konka
9a80ac0429
elf: add garbage collection of sections
2023-10-16 19:33:04 +02:00
Jakub Konka
2ee221328f
elf: test garbage collection of sections
2023-10-16 19:33:04 +02:00
Jakub Konka
f1b9c365f2
elf: add incomplete handling of build-obj -fllvm -fno-lld
2023-10-16 19:33:04 +02:00
Jakub Konka
976d4f51cc
elf: add hello-world c++ link test
2023-10-16 19:33:04 +02:00
Jakub Konka
621ddc003a
elf: temporarily disable non-llvm linker tests
2023-10-16 19:33:04 +02:00
Jakub Konka
727d9431c8
elf: link hello-world in c++
2023-10-16 19:33:04 +02:00
Jakub Konka
d6cec5a586
elf: add more prepwork for linking c++ objects
2023-10-16 19:33:04 +02:00
Jakub Konka
66f34b15e8
elf: add symbols to .got section directly
2023-10-16 19:33:04 +02:00
Jakub Konka
2c2bc66ce1
elf: handle .eh_frame and non-alloc sections
2023-10-16 19:33:04 +02:00
Jakub Konka
9ccd94d560
elf: refactor object.shdrContents to never error out
2023-10-16 19:33:04 +02:00
Jakub Konka
53340544c6
elf: get hello-world with LLVM in Zig working
2023-10-16 19:33:04 +02:00
Jakub Konka
1b70ad622b
elf: port zld's allocation mechanism
2023-10-16 19:33:04 +02:00
Jakub Konka
860beda55f
elf: remove dirty from synthetic .got section
2023-10-16 19:33:04 +02:00
Jakub Konka
6faed6269f
elf: update section sizes accumulated from objects
2023-10-16 19:33:04 +02:00
Jakub Konka
14cff77d87
elf: create atom lists indexed by section index
2023-10-16 19:33:04 +02:00
Jakub Konka
540ef3e010
elf: sort sections by their rank to combine them by segment flags
...
Currently this ignores ZigModule, however, I believe we can make it
so that this is done excluding sections/segments emitted by ZigModule
and everything should work out just fine.
2023-10-16 19:33:04 +02:00
Jakub Konka
679accd887
elf: initialize output sections from input objects in a separate step
2023-10-16 19:33:04 +02:00
Jakub Konka
509da2316c
elf: run populateMissingMetadata only if ZigModule exists
2023-10-16 19:33:04 +02:00
Jakub Konka
f0f19e18c7
elf: write shdr_table in flush
2023-10-16 19:33:04 +02:00
Jakub Konka
87602092fa
elf: write .got in bulk after scanning objects
2023-10-16 19:33:04 +02:00
Jakub Konka
d565f8bef2
elf: check for null atom in ZigModule
2023-10-16 19:33:04 +02:00
Jakub Konka
75f4420c2d
elf: increase Atom.Index resolution to u32
2023-10-16 19:33:04 +02:00
Jakub Konka
605e3eb08c
elf: clean up generating GOT symbol names
2023-10-16 19:33:03 +02:00