Jakub Konka
d18f52197d
macho: include compiler-rt in static lib if requested
2024-02-10 08:12:06 +01:00
Jakub Konka
d12c8db642
Merge pull request #18875 from ziglang/macho-zo-dwarf
...
macho: emit DWARF for ZigObject relocatable
2024-02-09 23:12:04 +01:00
Veikka Tuominen
ddcea2cad4
Merge pull request #18857 from alichraghi/shader
...
spirv: make rusticl the primary testing implementation
2024-02-09 14:11:31 +02:00
Jakub Konka
b5d2be1082
macho: undo invalid fix for allocating sections for relocatable
...
This is way too buggy for my taste. I will need to revisit
segment/section alloc logic.
2024-02-09 12:48:25 +01:00
Ali Chraghi
eb2d61d02e
spirv: merge construct(Struct/Vector/Array) into constructComposite
2024-02-09 09:27:05 +03:30
Jakub Konka
925273bcc8
macho: align memory size with file size when emitting relocatable
2024-02-09 00:20:11 +01:00
Jakub Konka
3bfda3d791
macho: fix alignment of objects in archive
2024-02-08 23:51:30 +01:00
Jakub Konka
8c0e5435b3
macho: do not close file on error - it will happen automatically anyhow
2024-02-08 23:51:30 +01:00
Jakub Konka
5da9d250ff
macho: fix incorrect skip conditions for zig and dwarf sections
2024-02-08 22:08:51 +01:00
Jakub Konka
dcb7f5791a
macho: alloc improvement for relocatable
2024-02-08 13:22:48 +01:00
Jakub Konka
102846315c
macho: couple small fixes
2024-02-08 13:12:06 +01:00
Jakub Konka
ce207caa24
macho: in relocatable mode, macho emit __DWARF directly
2024-02-08 12:15:46 +01:00
Jakub Konka
37033a96ac
macho: move Dwarf handle to ZigObject from DebugSymbols
2024-02-08 11:13:52 +01:00
Jakub Konka
272fc2df2e
macho: use preadAll to read in object files when emitting archive
2024-02-07 23:25:15 +01:00
Jakub Konka
114518c6b0
macho: fix 32bit builds
2024-02-07 21:28:20 +01:00
Jakub Konka
e3b6d347b2
macho: remove fallback to llvm-ar
2024-02-07 19:27:26 +01:00
Jakub Konka
f9eb14ddcf
macho: parse input object files specifically for incl in archive
2024-02-07 19:27:26 +01:00
Jakub Konka
82144a9073
macho: fix invalid ZigObject size calculation
2024-02-07 19:27:26 +01:00
Jakub Konka
35ac066f1d
macho: fix writing SYMDEF symtab size
2024-02-07 19:27:26 +01:00
Jakub Konka
efa1c6124d
macho: emit an archive
2024-02-07 19:27:26 +01:00
Jakub Konka
897a554109
macho: populate output archive symtab
2024-02-07 19:27:26 +01:00
Jakub Konka
80cafad9d3
macho: read-in committed ZigObject to memory from file
2024-02-07 19:27:26 +01:00
Jakub Konka
7f01b61679
macho: move static lib emitting logic to relocatable.zig
2024-02-07 19:27:25 +01:00
Jakub Konka
bdbb1dbe15
macho: refactor markExports, markImportsExports and claimUnresolved
2024-02-07 19:27:25 +01:00
Jakub Konka
352e27c55c
macho: move static lib flushing logic into Archive
2024-02-07 19:27:25 +01:00
Jacob Young
b3aed4e2c8
link: report function failures in FuncAnalysis
...
This unblocks backend errors after #18814 .
2024-02-07 07:12:32 +00:00
Jacob Young
9211938e6e
Elf: fix memory leaks
2024-02-07 00:17:23 -05:00
Jakub Konka
db6addf31a
macho: store open file descriptors in a global array
2024-02-06 17:38:50 +01:00
Andrew Kelley
78f15bc714
compiler: rename value.zig to Value.zig
...
This commit only does the file rename to be friendlier to version
control conflicts.
2024-02-05 18:13:07 -07:00
Ali Chraghi
afa7793351
spirv: basic shader support
2024-02-05 11:55:14 +03:30
Jakub Konka
f5dbcd1cb4
macho: add <cpu_arch>-macosx to target strings as a fallback target
...
Turns out that around 10.13/10.14 macOS release version, Apple changed the target tags in
tbd files from `macosx` to `macos`. In order to be compliant and therefore actually support
linking on older platforms against `libSystem.tbd`, we add `<cpu_arch>-macosx` to target strings.
2024-02-05 00:09:26 +01:00
Jakub Konka
a1b607acb5
macho: sanitize Zig sections segment names before emitting a relocatable
...
As reported by jacobly, the Apple system linker matches sections to
segments by name and not by flags causing Zig's executable section
ending up in a segment with incorrect permission flags.
2024-02-04 18:05:38 +01:00
Jakub Konka
7641561f2d
macho: refactor section/segment handle tracking logic
2024-02-03 16:57:15 +01:00
Jakub Konka
1ad545c97b
macho: refactor growSection logic; remove -r limitation for ZigObject
2024-02-03 15:55:32 +01:00
Jakub Konka
0a0f90f949
macho: migrate thunks to use new relative addressing mechanism
2024-02-03 10:52:29 +01:00
Jakub Konka
aa1aa98863
macho: fix remaining references to Atom.value
2024-02-03 09:28:37 +01:00
Jakub Konka
dc6db3b309
macho: minor fixes and sanitize input *_zig segment/sections names
2024-02-03 09:28:34 +01:00
Jakub Konka
9fc1685c1c
macho: make atom address relative wrt defining section
2024-02-03 09:28:30 +01:00
Jakub Konka
e10a2018a7
macho: emit relocs for ZigObject
2024-02-03 09:28:25 +01:00
Jakub Konka
dc222c9ba5
macho: use findFreeSpace for all sections
2024-02-03 09:28:19 +01:00
Jakub Konka
c5155170b2
macho: allocating space in .o
2024-02-03 09:28:12 +01:00
Jakub Konka
88a4bd6cf6
macho: pre-alloc sections in -r mode
2024-02-03 09:25:42 +01:00
Jakub Konka
352941b030
macho: emit incomplete object file
2024-02-03 09:25:41 +01:00
Jakub Konka
92deebcd66
cli+build: handle -ObjC flag and route it to MachO linker
2024-02-02 22:00:16 +01:00
Jakub Konka
d4966517f6
x86_64+macho: emit .got instead of .got_load relocs
2024-01-31 09:33:49 +01:00
Jakub Konka
1ee628a3e0
macho: improve error msg when relaxing GOT fails
2024-01-31 09:33:39 +01:00
Jakub Konka
f63f4508d2
macho: fix parsing versions from TBDs if parsed as floats
2024-01-30 20:56:20 +01:00
Jakub Konka
b8490c05c1
macho: improve weak-ref symbols handling
2024-01-30 13:56:08 +01:00
Jakub Konka
78740e5540
macho: flush Dwarf module before flushing dSYM
2024-01-29 13:01:32 +01:00
Jakub Konka
ec757ea666
macho: reset Zig-tracked section handles
2024-01-29 07:26:59 +01:00