aboutsummaryrefslogtreecommitdiff
path: root/src/link/Elf/Atom.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-12-12 16:25:28 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-01-01 17:51:19 -0700
commit0789e91eeb08495c5084067df2b2dab410197364 (patch)
treebf5bdee3e86bf182abd95c98d6811a3f5beace99 /src/link/Elf/Atom.zig
parent3b6cb257dfbcfe7217cdb00819615d1cf1e6b89c (diff)
downloadzig-0789e91eeb08495c5084067df2b2dab410197364.tar.gz
zig-0789e91eeb08495c5084067df2b2dab410197364.zip
linkers: update references to "options" field
Diffstat (limited to 'src/link/Elf/Atom.zig')
-rw-r--r--src/link/Elf/Atom.zig13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/link/Elf/Atom.zig b/src/link/Elf/Atom.zig
index b3d7b51d3e..dc330fa54b 100644
--- a/src/link/Elf/Atom.zig
+++ b/src/link/Elf/Atom.zig
@@ -543,7 +543,7 @@ fn scanReloc(
try self.reportPicError(symbol, rel, elf_file),
.copyrel => {
- if (elf_file.base.options.z_nocopyreloc) {
+ if (elf_file.z_nocopyreloc) {
if (symbol.isAbs(elf_file))
try self.reportNoPicError(symbol, rel, elf_file)
else
@@ -553,9 +553,9 @@ fn scanReloc(
},
.dyn_copyrel => {
- if (is_writeable or elf_file.base.options.z_nocopyreloc) {
+ if (is_writeable or elf_file.z_nocopyreloc) {
if (!is_writeable) {
- if (elf_file.base.options.z_notext) {
+ if (elf_file.z_notext) {
elf_file.has_text_reloc = true;
} else {
try self.reportTextRelocError(symbol, rel, elf_file);
@@ -587,7 +587,7 @@ fn scanReloc(
.dynrel, .baserel, .ifunc => {
if (!is_writeable) {
- if (elf_file.base.options.z_notext) {
+ if (elf_file.z_notext) {
elf_file.has_text_reloc = true;
} else {
try self.reportTextRelocError(symbol, rel, elf_file);
@@ -657,11 +657,12 @@ fn dynAbsRelocAction(symbol: *const Symbol, elf_file: *Elf) RelocAction {
}
fn outputType(elf_file: *Elf) u2 {
+ const comp = elf_file.base.comp;
assert(!elf_file.isRelocatable());
return switch (elf_file.base.comp.config.output_mode) {
.Obj => unreachable,
.Lib => 0,
- .Exe => if (elf_file.base.options.pie) 1 else 2,
+ .Exe => if (comp.config.pie) 1 else 2,
};
}
@@ -979,7 +980,7 @@ fn resolveDynAbsReloc(
=> try writer.writeInt(i32, @as(i32, @truncate(S + A)), .little),
.dyn_copyrel => {
- if (is_writeable or elf_file.base.options.z_nocopyreloc) {
+ if (is_writeable or elf_file.z_nocopyreloc) {
elf_file.addRelaDynAssumeCapacity(.{
.offset = P,
.sym = target.extra(elf_file).?.dynamic,