151 Commits

Author SHA1 Message Date
Jakub Konka
6f3bbd5eaa elf: we were writing too many symbols in the symtab 2023-11-15 19:00:13 +01:00
Jakub Konka
760ce69734 elf: actually write synthetic globals to output symtab 2023-11-15 15:07:09 +01:00
Jakub Konka
4adb8f786f elf: do not pointlessly store zerofill data for TLVs 2023-11-14 16:51:25 +01:00
Jakub Konka
8c748d5fd7 elf: setting offset to maxInt for non-allocated non-incremental sections is bad 2023-11-13 17:57:57 +01:00
Jakub Konka
575c29e5c4 elf: set symbol flags such as needs_zig_got in ZigObject 2023-11-12 18:12:41 -05:00
Jakub Konka
0dab319e86 elf: dump PLT entries 2023-11-12 18:12:41 -05:00
Jakub Konka
51efee2cb6 elf: fix allocating local TLS symbols 2023-11-12 18:12:41 -05:00
Jakub Konka
1afc6917f5 x86_64: get something going for the local exec model 2023-11-12 18:12:41 -05:00
Jakub Konka
b48baeeebb elf: fix typo in initial section offsets 2023-11-12 18:12:41 -05:00
Jakub Konka
aa0fbbcb39 elf: check for empty relocs buffers in ZigObject before emitting section 2023-11-12 18:12:40 -05:00
Jakub Konka
f34247c4bc elf: lower TLS data into appropriate TLS section 2023-11-12 18:12:40 -05:00
Jakub Konka
08882234d1 elf: fix overflowing designated capacity when writing COMDAT groups 2023-11-09 23:16:41 +01:00
Jakub Konka
6e797d8648 elf: add SHF_INFO_LINK flag to any emitted SHT_RELA section 2023-11-09 19:41:50 +01:00
Jakub Konka
03c3a85ea3 elf: write out COMDAT groups to file 2023-11-09 18:29:58 +01:00
Jakub Konka
acd7cbf0b5 elf: init output COMDAT group sections 2023-11-09 17:41:14 +01:00
Jakub Konka
1f8dd27e40 elf: correctly format output .eh_frame when emitting relocatable 2023-11-09 14:46:28 +01:00
Jakub Konka
b1fcf0ed8f elf: emit .rela.eh_frame section contents 2023-11-09 12:24:49 +01:00
Jakub Konka
0efc471122 elf: calculate required size for .rela.eh_frame 2023-11-09 12:02:20 +01:00
Jakub Konka
0de5dd2ef1 elf: misc fixes 2023-11-09 10:32:39 +01:00
Jakub Konka
29d7727254 elf: emit SHN_COMMON symbols in -r mode 2023-11-08 18:15:41 +01:00
Jakub Konka
a16e6706b3 elf: LLVM emits relocs to undef local symbols - color me surprised! 2023-11-08 15:10:28 +01:00
Jakub Konka
d8b1ef9430 elf: adjust r_addend with offset of the original input section ref'd via STT_SECTION 2023-11-08 12:11:55 +01:00
Jakub Konka
ae08f9bfe9 elf: claim unresolved dangling symbols as undef externs in -r mode 2023-11-08 11:51:11 +01:00
Jakub Konka
e87c751558 elf: reference .rela sections via output section index 2023-11-08 10:57:34 +01:00
Jakub Konka
5e78600f0f elf: actually track output symtab index of symbols 2023-11-07 23:18:41 +01:00
Jakub Konka
0211d6bf4f elf: create link between .rela and output section 2023-11-07 14:42:27 +01:00
Jakub Konka
e22b3595c1 elf: update .rela section sizes 2023-11-07 14:29:44 +01:00
Jakub Konka
c7ed7c4690 elf: generate section symbols when writing symtab 2023-11-07 13:31:31 +01:00
Jakub Konka
3df53d1722 elf: create skeleton of required changes for supporting -r mode 2023-11-07 11:19:55 +01:00
Jakub Konka
261db02018 CheckObject: support parsing and dumping archive symtab for ELF 2023-11-06 21:18:26 +01:00
Jakub Konka
1b69b0c621 elf: clearly separate updating and writing symtab from only ZigObject 2023-11-06 14:26:35 +01:00
Jakub Konka
8142925c7e elf: hook up saving object files in an archive 2023-11-05 13:37:13 +01:00
Jakub Konka
55fa8a04f1 elf: add hooks for archiving Objects 2023-11-05 12:56:17 +01:00
Jakub Konka
5c48236103 elf: init objects after parsing them 2023-11-05 12:37:15 +01:00
Jakub Konka
8d7ec05070 elf: actually save correct object names in the archive 2023-11-05 12:08:15 +01:00
Jakub Konka
9cf3ebe524 elf: fix more int resolution issues 2023-11-04 09:13:50 +01:00
Jakub Konka
56296694d9 elf: fix 32bit build 2023-11-04 09:13:43 +01:00
Jakub Konka
e3b82eaa66 elf: do not store filename in strtab unless longer than 15 chars 2023-11-04 09:13:26 +01:00
Jakub Konka
acd700ac6b elf: store ar state per input object file 2023-11-04 09:13:18 +01:00
Jakub Konka
ed2984f335 elf: do not align end of archive to 2bytes; fix archive parser 2023-11-04 09:13:07 +01:00
Jakub Konka
33a0a72e87 elf: align ar_hdr to at least 2 bytes 2023-11-04 09:12:26 +01:00
Jakub Konka
3b9455f005 elf: generate pretty rudimentary archive 2023-11-04 09:12:07 +01:00
Jakub Konka
eddf9cc65b elf: collect exports from ZigObject into AR symtab 2023-11-04 09:11:58 +01:00
Jakub Konka
481ee1b598 elf: enable static-lib flush path 2023-11-04 09:11:47 +01:00
Jakub Konka
ccb2afacc0 elf: postpone creation of .got.zig entry until code emit 2023-11-04 09:11:29 +01:00
Jakub Konka
5affd29b47 elf: use StringTable for strtab management in ZigObject 2023-11-04 09:11:22 +01:00
Jakub Konka
96f221236d elf: fix r_offset when emitting relocs for the linker 2023-11-04 09:11:14 +01:00
Jakub Konka
7c5c59191e elf: claim unresolved dangling symbols as undef externs when emitting object 2023-11-04 09:10:43 +01:00
Jakub Konka
dbe13200f1 elf: emit STT_SECTION symbols 2023-11-04 09:10:30 +01:00
Jakub Konka
8055f68765 elf: make sure we never emit .got.zig relocs when linking object files 2023-11-04 09:10:23 +01:00