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
Jacob Young
8c3f6c72c0
Dwarf: fix and test string format
2024-08-27 02:09:59 -04: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
1254509d78
elf: make Atom.allocate and related ZigObject-independent
2024-08-26 22:19:51 +02:00
David Rubin
f777b29832
fix up merge conflicts with master
2024-08-25 22:43:57 -07:00
David Rubin
1c1feba08e
remove mod aliases for Zcus
2024-08-25 15:17:40 -07:00
David Rubin
9868ed44b3
macho: remove deprecated Module usages
2024-08-25 15:17:23 -07:00
David Rubin
863f74dcd2
comp: rename module to zcu
2024-08-25 15:17:21 -07:00
David Rubin
bb531759bc
coff: remove deprecated Module usages
2024-08-25 15:16:46 -07:00
David Rubin
b4bb64ce78
sema: rework type resolution to use Zcu when possible
2024-08-25 15:16:42 -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
1af0f4cd00
elf: fix setting sh_info and sh_link for manually managed rela sections
2024-08-25 10:20:15 +02:00
Jakub Konka
7173ea1a15
elf: simplify output section symbol tracking
2024-08-25 10:20:15 +02:00
Jakub Konka
95c30fb486
elf: fix shdr-to-phdr links
2024-08-25 10:20:15 +02:00
Jakub Konka
a9d3885ac7
elf: streamline sections container
2024-08-25 10:20:14 +02:00
Jakub Konka
a6bf762a8b
elf: finally move initMetadata into ZigObject.init
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
Jacob Young
0a52914355
Elf: all dwarf relocs need to become linker relocs
2024-08-22 20:08:05 -04:00
Jacob Young
17171cdb07
Dwarf: fix big and zero enum values
2024-08-22 20:08:05 -04:00
Jacob Young
f47e1e148e
Dwarf: add more childless special cases
2024-08-22 20:08:05 -04:00
Jacob Young
874ad98f7a
Dwarf: fix treating big int limbs as signed
2024-08-22 20:08:04 -04:00
Jacob Young
cbaff43b2a
Dwarf: add missing var args info on function decls
2024-08-22 19:53:04 -04:00
Jacob Young
31220b50b5
Dwarf: cleanup emitted debug info
...
* reduce iteration cost by not tracking unused entries
* avoid emitting unused abbrevs to `.debug_abbrev`
* get the compiler executable passing `llvm-dwarfdump --verify`
* make it possible to skip `.debug_line` padding much more quickly
2024-08-22 08:44:08 +02:00
Jakub Konka
cbb8093455
macho: emit local symbols for thunks
2024-08-22 00:34:58 +02:00
Jakub Konka
e79ac14ef3
elf: refactor tracking debug section sizes
2024-08-21 10:28:31 +02:00
Jacob Young
db48a78963
Dwarf: ensure stale relocations are deleted
2024-08-21 01:43:22 -04:00
Jakub Konka
b17bbf9e6c
elf: fixes after rebase
2024-08-21 01:43:21 -04:00
Jakub Konka
6c731be3a1
elf: allow for concatenating atoms to merge sections
2024-08-21 01:43:21 -04:00
Jakub Konka
6a86a1041c
elf: remove obsolete call to Dwarf.resolveRelocs
2024-08-21 01:43:21 -04:00
Jakub Konka
fe6dfd5090
elf: fix emitting cross-section relocs for .debug* sections
2024-08-21 01:43:21 -04:00
Jakub Konka
c4d820b3f1
elf: emit DTPOFF32/DTPOFF64 relocation for .debug* sections
2024-08-21 01:43:21 -04:00
Jakub Konka
d388d555d5
elf: parse and emit Elf relocs for cross section refs for .debug* sections
2024-08-21 01:43:21 -04:00
Jakub Konka
d3d5ed992c
elf: emit .rela.debug* sections for relocatable if required
2024-08-21 01:43:21 -04:00
Jakub Konka
517721bbcc
elf: start unraveling Dwarf relocs into Elf relocs
2024-08-21 01:43:21 -04:00
Jakub Konka
56e1ae21e4
elf: populate debug atoms on the linker side after Dwarf.flushModule
2024-08-21 01:43:21 -04:00
Jakub Konka
41f2302865
elf: create section symbols and atoms per each ZigObject debug section
2024-08-21 01:43:21 -04:00
Jakub Konka
84105be4df
elf: remove unused code
2024-08-21 01:43:21 -04:00
Jacob Young
eaa227449c
Dwarf: fix issues with inline call sites
2024-08-20 15:08:23 -04:00
Jacob Young
62f7276501
Dwarf: emit info about inline call sites
2024-08-20 08:09:33 -04:00
Jacob Young
ef90eb0d4d
Dwarf: delete incorrect logic that also has the possibility of crashing
2024-08-20 08:09:33 -04:00