Jakub Konka
5cb51c10de
elf: fix relocatable mode
2024-09-04 13:34:26 +02:00
Jakub Konka
6b53dc9461
elf: actually allocate atoms within each section chunk
2024-09-04 13:34:26 +02:00
Jakub Konka
f87a7251a3
elf: actually write allocated atoms in object files
2024-09-04 13:34:26 +02:00
Jakub Konka
45e46f0fb9
elf: allocate atom chunks using allocateChunk mechanics in objects
2024-09-04 13:34:25 +02:00
Jakub Konka
1ef96f05eb
elf: introduce SectionChunk - a container of atoms per object file
2024-09-04 13:34:25 +02:00
Jakub Konka
d32af9ea2a
elf: move initOutputSection into Elf from Object
2024-09-04 13:34:25 +02:00
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
Andrew Kelley
d9147b91a6
Merge pull request #21212 from ziglang/elf-incr
...
elf: cleanups, cleanups, cleanups
2024-08-26 19:25:23 -07:00
Jakub Konka
20240e9cd5
elf: store atom refs for rela sections until we can do better
2024-08-25 10:20:15 +02:00
Jakub Konka
a9d3885ac7
elf: streamline sections container
2024-08-25 10:20:14 +02:00
Alex Rønne Petersen
fb6f5a30b2
link: Rename InvalidCpuArch error to InvalidMachineType.
2024-08-23 19:56:29 +02:00
Alex Rønne Petersen
a69f55a7cc
std.{coff,elf}: Remove the {MachineType,EM}.toTargetCpuArch() functions.
...
These are fundamentally incapable of producing accurate information for reasons
I've laid out in #20771 . Since our only use of these functions is to check that
object files have the correct machine type, and since #21020 made
`std.Target.to{Coff,Elf}Machine()` more accurate, just switch these checks over
to that and compare the machine type tags instead.
Closes #20771 .
2024-08-23 19:56:24 +02:00
Jakub Konka
b058545970
elf: remove stale code
2024-08-07 10:21:03 +02:00
Jakub Konka
e99818c602
elf: start-stop resolution has to come after init output sections
2024-08-07 10:21:03 +02:00
Jakub Konka
835f1fc03f
elf: fix off-by-one when referring to resolved table directly
2024-08-07 10:21:02 +02:00
Jakub Konka
137d43c0ea
elf: get hello-world glibc working again
2024-08-07 10:21:02 +02:00
Jakub Konka
26da7c8207
elf: fix symbol resolution for Objects
2024-08-07 10:21:02 +02:00
Jakub Konka
8ca809d928
elf: move getStartStopBasename into Object
2024-08-07 10:21:02 +02:00
Jakub Konka
41e9b8b6c8
elf: fix compile errors
2024-08-07 10:21:02 +02:00
Jakub Konka
deeaa1bb0c
elf: redo symbol mgmt and ownership in ZigObject
2024-08-07 10:21:02 +02:00
Jakub Konka
9fe69cc0b5
elf: move symbol ownership to SharedObject
2024-08-07 10:21:02 +02:00
Jakub Konka
d0367b0219
elf: move symbol ownership to Object
2024-08-07 10:21:02 +02:00
Jakub Konka
518c7908f0
elf: always create symbol extra
2024-08-07 10:21:02 +02:00
Jakub Konka
ef7bbcd80f
elf: do not store merge section output section name in strings buffer
2024-07-30 10:00:50 +02:00
Jakub Konka
801c372098
elf: init output merge sections in a separate step
2024-07-30 10:00:50 +02:00
Jakub Konka
0701646beb
elf: move merge subsections ownership into merge sections
2024-07-30 10:00:50 +02:00
Jakub Konka
24126f5382
elf: simplify output section tracking for symbols
2024-07-30 10:00:50 +02:00
Jakub Konka
e8d008a8a8
elf: atom is always assigned output section index
2024-07-30 10:00:50 +02:00
Jakub Konka
96c20adeee
elf: remove obsolete flags from atom
2024-07-30 10:00:50 +02:00
Jakub Konka
c575e3daa4
elf: resolve COMDATs in more parallel-friendly way
2024-07-30 10:00:50 +02:00
Jakub Konka
494ae149e0
elf: skip storing comdat group signature globally
2024-07-30 10:00:50 +02:00
Jakub Konka
669f285943
elf: move ownership of atoms into objects
2024-07-30 10:00:50 +02:00
Jakub Konka
f1fedb3a51
elf: move ownership of comdat groups to Object
2024-07-30 10:00:50 +02:00
Jakub Konka
733d25000b
elf: move ownership of input merge sections to Object
2024-07-30 10:00:50 +02:00
Jakub Konka
7aaebd1774
Merge pull request #20751 from Rexicon226/riscv-eflags
...
elf: add riscv eflag collisions
2024-07-23 22:29:57 +02:00
David Rubin
782a9d16c7
elf: add riscv eflag collisions
2024-07-22 18:01:26 -07:00
Jakub Konka
cba3389d90
macho: redo input file parsing in prep for multithreading
2024-07-22 12:05:56 +02:00
zhylmzr
3648d7df19
fix: object size error in archive
2024-04-25 18:27:11 +02:00
Jakub Konka
4931a291f8
link/elf: keep track of sh_entsize per MergeSubsection
2024-04-20 23:36:42 +02:00
Jakub Konka
2cc1623925
link/elf: fix parsing SHF_STRINGS section
2024-04-20 23:36:42 +02:00
Jakub Konka
65492b3d52
link/elf: skip empty merge sections when resolving
2024-04-20 23:36:41 +02:00
Jakub Konka
9e0bca73e2
link/elf: implement string merging
2024-04-20 23:36:41 +02:00
Jakub Konka
09820a96b6
link/elf: move relocs indexes into Atom extras
2024-04-20 23:36:41 +02:00
Jakub Konka
13b403cbf7
link/elf: move fde record indexes into Atom extras
2024-04-20 23:36:41 +02:00
Jakub Konka
d5fdb7315f
link/elf: port macho symbol extras handling
2024-04-20 23:36:41 +02:00
Jakub Konka
4cd92567e7
link/elf: propagate Haiku requirement of always passing -shared for images
2024-04-08 13:24:08 -04:00
Jakub Konka
1cf45fb209
elf+aarch64: implement enough to link dynamically with gcc as the driver
2024-03-08 22:46:17 +01:00
Jakub Konka
ca6f41ee30
elf+riscv: skip parsing .riscv.attributes section for now
2024-02-21 22:50:55 +01:00
Jakub Konka
d19001abac
elf: skip STT_NOTYPE only if SHN_UNDEF from symtab inclusion
2024-02-21 22:49:58 +01:00
Jakub Konka
8ba31ed39a
elf: sort input relocs if targeting riscv64
2024-02-21 22:47:52 +01:00