| ... | ... | @@ -4376,6 +4376,12 @@ fn initHeaders( |
| 4376 | 4376 | assert(elf.targetLoad(&shdr.size) == elf.got.count() * @sizeOf(Addr)); |
| 4377 | 4377 | }, |
| 4378 | 4378 | } |
| 4379 | if (elf.shndx.dynamic != .UNDEF) { |
| 4380 | try elf.shndx.rela_dyn.relaEnsureAdditionalCapacity(elf, elf.got.count()); |
| 4381 | } |
| 4382 | for (0..elf.got.count()) |got_index| { |
| 4383 | elf.updateGotEntry(got_index); |
| 4384 | } |
| 4379 | 4385 | |
| 4380 | 4386 | // Create any always-provided linker-defined symbols. The symbols marking the `INIT_ARRAY`/ |
| 4381 | 4387 | // `FINI_ARRAY`/`PREINIT_ARRAY` sections are instead created by `createInitFiniArraySection` |
| ... | ... | @@ -7187,6 +7193,7 @@ fn addGotRelocAssumeCapacity( |
| 7187 | 7193 | }); |
| 7188 | 7194 | } |
| 7189 | 7195 | fn updateGotEntry(elf: *Elf, got_index: usize) void { |
| 7196 | assert(elf.ehdrType() != .REL); |
| 7190 | 7197 | const entry_value: union(enum) { |
| 7191 | 7198 | unsigned: u64, |
| 7192 | 7199 | signed: i64, |