Jacob Young
faafc41327
Dwarf: prevent crash on missing field inits
...
Workaround for #21362
2024-09-10 13:06:08 -04:00
Jacob Young
0f0142527a
Dwarf: implement default field values
2024-09-10 13:06:08 -04:00
Jacob Young
cdaf3154ee
Dwarf: implement variables without runtime bits
2024-09-10 12:27:57 -04:00
Jacob Young
e048e78886
Dwarf: implement and test multi array list
2024-09-10 12:27:57 -04:00
Jacob Young
e046977354
codegen: implement output to the .debug_info section
2024-09-10 12:27:57 -04:00
Jacob Young
f34b198251
Dwarf: implement and test decls
2024-09-10 12:27:56 -04:00
Jacob Young
778519bb0d
Dwarf: fix missing padding before incrementally updated entries
2024-09-10 08:29:31 -04:00
Jakub Konka
e1d5bb365b
elf: fix 32bit build
2024-09-04 15:55:38 +02:00
Jakub Konka
b6caab63cb
elf: actually commit AtomList.zig
2024-09-04 13:44:06 +02:00
Jakub Konka
f3d527c082
elf: migrate thunks to the new mechanism (AtomList)
2024-09-04 13:34:26 +02:00
Jakub Konka
d302a1068e
elf: rename SectionChunk into AtomList and store as part of Section
2024-09-04 13:34:26 +02:00
Jakub Konka
64ad6eff16
elf: create back/forward links for atoms within section chunks
2024-09-04 13:34:26 +02:00
Jakub Konka
6ec8b15918
elf: fix emitting static lib when ZigObject is present
2024-09-04 13:34:26 +02:00
Jakub Konka
801f038c2c
elf: do not pad placeholders coming from input object files
...
This is currently not entirely accurate since no padding will affect
the last-most atom of ZigObject that should be padded.
2024-09-04 13:34:26 +02:00
Jakub Konka
eeec50d251
elf: misc .eh_frame management fixes
2024-09-04 13:34:26 +02:00
Jakub Konka
fca92fd7c0
elf: copy existing data when allocating other alloc sections in relocatable mode
2024-09-04 13:34:26 +02:00
Jakub Konka
5cdad186fe
elf: do not create .eh_frame section if ZigObject already did so in relocatable mode
2024-09-04 13:34:26 +02:00
Jakub Konka
88e0d49feb
elf: init rela sections in a separate pass for ZigObject
2024-09-04 13:34:26 +02:00
Jakub Konka
2ef3e30e2d
elf: emit relocs for self-hosted generated .eh_frame section
2024-09-04 13:34:26 +02:00
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
6a50a0f0ed
elf: update osec index for section chunks in objects
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
874ef6308e
elf: do not create .eh_frame section if ZigObject already did so
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
6ec5df3898
elf: allocate .tdata and .tbss using allocateAtom mechanics
2024-09-04 13:34:25 +02:00
Jakub Konka
3e100c5dab
dwarf: make Section.off a function
2024-09-04 13:34:25 +02:00
Jakub Konka
da60159d85
elf+dwarf: refer sections via section symbols
2024-09-04 13:34:25 +02:00
Jakub Konka
acb91f4b30
elf: fix emitting correct .rela. sections in -r mode
2024-09-04 13:34:25 +02:00
Jakub Konka
25fa092bb1
elf: fix a typo in setting ZigObject.data_relro_index
2024-09-04 13:34:25 +02:00
Jakub Konka
bc39bddd5f
elf: remove isDebugSection helper
2024-09-04 13:34:25 +02:00
Jakub Konka
ef6ee90ff8
elf: remove now unused number_of_zig_segments
2024-09-04 13:34:25 +02:00
Jakub Konka
2d0f4fc9c0
elf: allocate .text in ZigObject similarly to .eh_frame
2024-09-04 13:34:25 +02:00
Jakub Konka
848535535d
elf: allocate .data.rel.ro and .rodata in ZigObject similarly to .eh_frame
2024-09-04 13:34:25 +02:00
Jakub Konka
0b92404ddf
elf: allocate .data in ZigObject similarly to .eh_frame
2024-09-04 13:34:25 +02:00
Jakub Konka
37a1f0e7f2
elf: allocate .bss in ZigObject similarly to .eh_frame
2024-09-04 13:34:25 +02:00
Jakub Konka
8f1ce3c85b
elf: shuffle some stages to make it clear what needs what
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
Jakub Konka
b44dd599ad
elf: split Atom.allocate into Atom-independent parts
2024-09-04 13:34:25 +02:00
Alex Rønne Petersen
290ccb160e
glibc: Avoid building and linking stub libraries that were emptied in 2.34.
...
Closes #20919 .
2024-09-03 17:33:23 -07:00
Andrew Kelley
a4cc43c42b
Merge pull request #21174 from alexrp/win-arm
...
Change `arm-windows-gnu` to `thumb-windows-gnu`, plus some initial port work
2024-08-30 14:34:53 -07:00
Jacob Young
a1a9d7440c
Elf: fix reference from eh_frame_hdr to eh_frame
2024-08-30 09:24:32 -04:00
Jacob Young
7305184203
dwarf: share and use std.dwarf.EH_PE constants
2024-08-30 09:24:32 -04:00
Jacob Young
f0c0f697a6
Dwarf: fix zir inst index comparison not checking the file
2024-08-30 08:21:24 -04:00
mlugg
c62487da76
compiler: avoid field/decl name conflicts
...
Most of the required renames here are net wins for readaibility, I'd
say. The ones in `arch` are a little more verbose, but I think better. I
didn't bother renaming the non-conflicting functions in
`arch/arm/bits.zig` and `arch/aarch64/bits.zig`, since these backends
are pretty bit-rotted anyway AIUI.
2024-08-29 23:43:52 +01:00
mlugg
aaa7e73983
link.Dwarf: skip tests in updateComptimeNav
...
These won't live in the parent namespace as decls which causes problems
later in this function, and tests are guaranteed not to be referenced at
comptime anyway, so there's actually no need to run this logic.
2024-08-28 08:39:59 +01: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
Alex Rønne Petersen
338730d2fa
link.Coff: Set default image base correctly for thumb.
2024-08-28 03:08:10 +02:00
Jacob Young
f289b82d0e
Dwarf: implement .eh_frame
2024-08-27 03:55:56 -04:00