mlugg
b355893438
compiler: correct unnecessary uses of 'var'
2023-11-19 11:11:49 +00:00
mlugg
172c2797bd
link: fix MachO boundary symbol resolution
2023-11-19 11:11:49 +00:00
Jakub Konka
91329ce944
std.macho: fix LoadCommandIterator to work with underaligned data
2023-11-17 20:49:32 +01:00
Jakub Konka
6e4d7362ce
elf: fix emitting start/stop synthetic symbols
2023-11-15 19:20:03 +01:00
Jakub Konka
d771c0a7a1
elf: create .got.plt unconditionally
2023-11-15 19:07:09 +01:00
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
e883907431
coff: revert .rdata to be read-only again
2023-11-13 23:23:06 +01:00
Jakub Konka
028bfdbca3
coff: mark dirty any reloc target at [addr,..) inclusive
2023-11-13 23:07:21 +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
Jacob Young
2eeb735822
Dwarf: improve x86_64 backend debug info
...
Closes #17811
2023-11-12 03:21:52 -05:00
Andrew Kelley
53f74d6a04
move libssp into libcompiler_rt
...
closes #7265
2023-11-10 13:12:10 -07:00
Jakub Konka
197fd41e27
macho: check for null Module before creating llvm_object
2023-11-10 13:43:43 +01:00
Jakub Konka
0f2489d8fc
macho: resolve special section/segment boundary symbols
...
Boundary symbols have a special name prefix:
* section$start$segname$sectname
* section$stop$segname$sectname
* segment$start$segname
* segment$stop$segname
and will resolve to either start or end of the respective
section/segment if found.
If not found, we return an error stating we couldn't find the
requested section/segment rather than silently failing and resolving
the address to 0 which seems to be the case with Apple's ld64.
2023-11-10 12:52:56 +01:00
Jakub Konka
c550eb3e8a
Merge pull request #17933 from ziglang/elf-r-mode
...
elf: the dreaded `-r` mode
2023-11-10 07:57:52 +01: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
27970bab07
elf: format shdr flags when dumping state
2023-11-09 18:49:19 +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
031d9faf02
elf: separate logic for reseting shdr indexes into a separate fn
2023-11-09 15:05:29 +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
666ac6bf9b
elf: track .rela.eh_frame section and emit .eh_frame section symbol
2023-11-09 11:49:32 +01:00
Jakub Konka
0de5dd2ef1
elf: misc fixes
2023-11-09 10:32:39 +01:00
Luuk de Gram
2ac0ba03a6
wasm-linker: ensure symbol fields are set for decls
...
Previously the symbol tag field would remain `undefined` until it
was set during `flush`. However, the symbol's tag would be observed
earlier than where it was being set. We now set it to the explicit
tag `undefined` so this can be caught during debug. The symbol tag of
a decl will now also be set right after `updateDecl` and `updateFunc`.
Likewise, we now also set the `name` field during atom creation for
decls, as well as set the other fields to the max(u32) to ensure we
get a compiler crash during debug to ensure any misses will be caught.
2023-11-09 00:00:17 +01:00
Jakub Konka
0299ed5036
elf: fix 32bit build
2023-11-08 18:45:43 +01:00
Jakub Konka
29d7727254
elf: emit SHN_COMMON symbols in -r mode
2023-11-08 18:15:41 +01:00
Jakub Konka
0b4d398c40
elf: streamline codepaths for different linker modes (object, ar, exe/dyn)
2023-11-08 17:35:56 +01:00
Jakub Konka
a16e6706b3
elf: LLVM emits relocs to undef local symbols - color me surprised!
2023-11-08 15:10:28 +01:00
Jacob Young
6c15c34421
MachO: support -fsingle-threaded mode
2023-11-08 08:40:10 -05: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
ecf6ed7d9b
elf: allocate alloc sections when emitting relocatable
2023-11-07 15:04:57 +01:00
Jakub Konka
31b280c78f
elf: emit .rela.eh_frame section header if required
2023-11-07 14:47:11 +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