mlugg
0fe3fd01dd
std: update std.builtin.Type fields to follow naming conventions
...
The compiler actually doesn't need any functional changes for this: Sema
does reification based on the tag indices of `std.builtin.Type` already!
So, no zig1.wasm update is necessary.
This change is necessary to disallow name clashes between fields and
decls on a type, which is a prerequisite of #9938 .
2024-08-28 08:39:59 +01:00
Alex Rønne Petersen
fb6f5a30b2
link: Rename InvalidCpuArch error to InvalidMachineType.
2024-08-23 19:56:29 +02:00
Jakub Konka
06a0da3e8a
macho: cache string len
2024-07-22 12:06:02 +02:00
Jakub Konka
2b84592858
macho: run more things in parallel
2024-07-22 12:06:02 +02:00
Jakub Konka
cba3389d90
macho: redo input file parsing in prep for multithreading
2024-07-22 12:05:56 +02:00
Jakub Konka
34f34dbe32
macho: reinstate duplicate definition checking
2024-07-18 09:13:09 +02:00
Jakub Konka
e9328e7da8
macho: fix 32bit compilation issues
2024-07-18 09:13:09 +02:00
Jakub Konka
b62281a9c8
macho: re-enable relocatable mode
2024-07-18 09:13:08 +02:00
Jakub Konka
90c54f1eb6
macho: fix symbol visibility merging logic
2024-07-18 09:13:08 +02:00
Jakub Konka
3d58faed12
macho: we do not yet support interposable symbols
2024-07-18 09:13:08 +02:00
Jakub Konka
18778e2a0a
macho: bring back parts of ar
2024-07-18 09:13:08 +02:00
Jakub Konka
174de37cef
macho: fix compile errors
2024-07-18 09:13:08 +02:00
Jakub Konka
355992cbdf
macho: migrate some of MachO driver
2024-07-18 09:13:08 +02:00
Jakub Konka
b9bac32a25
macho: migrate Atom and Symbol
2024-07-18 09:13:08 +02:00
Jakub Konka
9d5a900f4b
macho: migrate Object to self-ownership of atoms and symbols
2024-07-18 09:13:08 +02:00
Jakub Konka
e2bfd6fc69
macho: revamp how we compute dyld relocs
2024-07-18 09:13:07 +02:00
Jakub Konka
101299e856
macho: move unwind info records ownership to Objects
2024-07-18 09:13:07 +02:00
Jakub Konka
ed7073c630
link/macho: fix perf bug in DWARF parsing
2024-05-24 15:34:48 +02:00
Jakub Konka
d31eb744ce
link/macho: fix 32bit build
2024-05-23 12:04:17 +02:00
Jakub Konka
f3a503eca2
link/macho: ensure we set alignment of literals to max alignment
2024-05-23 12:04:17 +02:00
Jakub Konka
8fc0c7dce1
link/macho: apply fixes to deduping logic
...
* test non-ObjC literal deduping logic
2024-05-23 12:04:17 +02:00
Jakub Konka
434e69482e
link/macho: dedup literals in objects and internal object file
2024-05-23 12:04:17 +02:00
zhylmzr
3648d7df19
fix: object size error in archive
2024-04-25 18:27:11 +02:00
Jakub Konka
6fd09f8d2d
link/macho: make --verbose-link represent the actual linker line
2024-04-22 15:14:56 +02:00
Jakub Konka
a7e4d17226
link/macho: introduce Atom extras for out-of-band data
2024-04-22 12:21:37 +02:00
Jakub Konka
9e402704e2
macho: correctly find N_GSYM symbols when parsing symbol stabs
...
In `ld -r` mode, the linker will emit `N_GSYM` for any defined
external symbols as well as private externals. In the former case,
the thing is easy since `N_EXT` bit will be set in the nlist's type.
In the latter however we will encounter a local symbol with `N_PEXT`
bit set (non-extern, but was private external) which we also need
to include when resolving symbol stabs.
The major change in the logic for parsing symbol stabs per input
object file is that we no longer try to force-resolve a `N_GSYM`
as a global symbol. This was a mistake since every symbol stab
always describes a symbol defined within the parsed input object file.
We then work out if we should forward `N_GSYM` in the output symtab
after we have resolved all symbols, but never before - intel we lack
when initially parsing symbol stabs. Therefore, we simply record
which symbol has a debug symbol stab, and work out its precise type
when emitting output symtab after symbol resolution has been done.
2024-03-01 10:18:10 +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
f9eb14ddcf
macho: parse input object files specifically for incl in archive
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
db6addf31a
macho: store open file descriptors in a global array
2024-02-06 17:38:50 +01:00
Jakub Konka
b8490c05c1
macho: improve weak-ref symbols handling
2024-01-30 13:56:08 +01:00
Jakub Konka
f2214e4371
macho: re-enable dSYM but don't write anything to it yet
2024-01-29 07:26:59 +01:00
Jakub Konka
5b315f8a3a
macho: fix 32bit builds
2024-01-28 19:14:55 +01:00
Jakub Konka
6337ce16ae
macho: do not allocate input files in full
2024-01-28 00:40:50 +01:00
Jakub Konka
f2dce0c337
macho: exclude symbols from empty sections when parsing unwind info
2024-01-24 12:34:42 +01:00
Jakub Konka
82628dd151
macho: synthesise unwind records from __eh_frame even if no __compact_unwind
2024-01-24 12:34:42 +01:00
Jakub Konka
06224c23b7
macho: fix 32bit compilation issues
2024-01-24 12:34:42 +01:00
Jakub Konka
67ea039426
macho: do not enforce platform check for now
2024-01-24 12:34:42 +01:00
Jakub Konka
a8629fb850
macho: fix symbol index dereference in codegen wrt ZigObject
...
This is incredibly confusing and I really need to simplify it.
Elf also possesses this shortcoming so once I get Coff up to speed
it should hopefully become clear on how to refactor this.
2024-01-24 12:34:41 +01:00
Jakub Konka
bd9d8bd462
macho: create Atom for Decl in ZigObject
2024-01-24 12:34:41 +01:00
Jakub Konka
9509fadbe3
macho: split symbol.flags.got into needs_got and has_got
2024-01-24 12:34:41 +01:00
Jakub Konka
6d0ba6dd10
macho: introduce ZigObject
2024-01-24 12:34:40 +01:00
Jakub Konka
c2a0a88284
macho: report duplicate symbols
2024-01-24 12:34:39 +01:00
Jakub Konka
3968aea8ec
macho: write to file
2024-01-24 12:34:39 +01:00
Jakub Konka
32ebceea95
macho: sort sections; use Atom.Alignment for alignment; init segments
2024-01-24 12:34:39 +01:00
Jakub Konka
8a1311733b
macho: resolve symbols and mark files live
2024-01-24 12:34:39 +01:00
Jakub Konka
c5e509595a
macho: parse archives
2024-01-24 12:34:38 +01:00
Jakub Konka
d05e9c3792
macho: create scaffolding for parsing different input objects
2024-01-24 12:34:38 +01:00
Jakub Konka
0c171afab0
macho: parse an input object file!
2024-01-24 12:34:38 +01:00