diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2025-09-10 16:41:10 +0100 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2025-09-30 13:44:53 +0100 |
| commit | 4e45362529e05ba1be44fab48bc3469f5bb6492d (patch) | |
| tree | b8d161294f8519ed8471b7cdb84ff2aa037e4368 /lib/std/debug.zig | |
| parent | 1123741fd5fc6545daf10e2bcdcad74ec148f61b (diff) | |
| download | zig-4e45362529e05ba1be44fab48bc3469f5bb6492d.tar.gz zig-4e45362529e05ba1be44fab48bc3469f5bb6492d.zip | |
link.Elf: fix static PIE
We mustn't emit the DT_PLTGOT entry in `.dynamic` in a statically-linked
PIE, because there's no dl to relocate it (and `std.pie.relocate`, or
the PIE relocator in libc, won't touch it). In that case, there cannot
be any PLT entries, so there's no point emitting the `.got.plt` section
at all. If we just don't create that section, `link.Elf` already knows
not to add the DT_PLTGOT entry to `.dynamic`.
Co-authored-by: Jacob Young <jacobly0@users.noreply.github.com>
Diffstat (limited to 'lib/std/debug.zig')
0 files changed, 0 insertions, 0 deletions
