Skip to content

Commit 87d2e3f

Browse files
committed
Address review comments
1 parent 7b409b7 commit 87d2e3f

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lld/ELF/Writer.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1652,8 +1652,7 @@ static void removeUnusedSyntheticSections() {
16521652
// finalizeAddressDependentContent, making .rela.dyn no longer empty.
16531653
// Conservatively keep .rela.dyn. .relr.auth.dyn can be made empty, but
16541654
// we would fail to remove it here.
1655-
if (config->emachine == EM_AARCH64 && config->relrPackDynRelocs &&
1656-
!config->relocatable)
1655+
if (config->emachine == EM_AARCH64 && config->relrPackDynRelocs)
16571656
if (auto *relSec = dyn_cast<RelocationBaseSection>(sec))
16581657
if (relSec == mainPart->relaDyn.get())
16591658
return false;

lld/test/ELF/aarch64-reloc-pauth.s

+3-3
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@
180180
# RUN: llvm-mc -filetype=obj -triple=aarch64 empty-rela.s -o empty-rela.o
181181
# RUN: ld.lld -pie -z pack-relative-relocs empty-rela.o -o empty-rela
182182
# RUN: llvm-readelf -S -d -r empty-rela | FileCheck --check-prefixes=EMPTY-RELA %s
183-
# RUN: ld.lld -r -z pack-relative-relocs empty-rela.o -o empty-rela-relocatable
184-
# RUN: llvm-readelf -S empty-rela-relocatable | FileCheck --check-prefixes=EMPTY-RELA-RELOCATABLE %s
183+
# RUN: ld.lld -r -z pack-relative-relocs empty-rela.o -o empty-rela.ro
184+
# RUN: llvm-readelf -S empty-rela.ro | FileCheck --check-prefixes=EMPTY-RELA-RO %s
185185

186186
# EMPTY-RELA: Section Headers:
187187
# EMPTY-RELA-NEXT: Name Type Address Off Size ES Flg Lk Inf Al
@@ -203,7 +203,7 @@
203203
# EMPTY-RELA-NEXT: Index: Entry Address Symbolic Address
204204
# EMPTY-RELA-NEXT: 0000: 0000000000030310 0000000000030310 $d.0
205205

206-
# EMPTY-RELA-RELOCATABLE-NOT: .rela.dyn
206+
# EMPTY-RELA-RO-NOT: .rela.dyn
207207

208208
.section .test, "aw"
209209
.p2align 3

0 commit comments

Comments
 (0)