Skip to content

Commit 969a877

Browse files
committed
Merge branch 'main' into pauth-type-info-addr-discr-fix
2 parents 130ff55 + 76f2fa8 commit 969a877

File tree

4,631 files changed

+278836
-110491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,631 files changed

+278836
-110491
lines changed

.github/new-prs-labeler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,3 +1008,8 @@ bazel:
10081008

10091009
offload:
10101010
- offload/**
1011+
1012+
tablegen:
1013+
- llvm/include/TableGen/**
1014+
- llvm/lib/TableGen/**
1015+
- llvm/utils/TableGen/**

.github/workflows/commit-access-review.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,10 @@ def main():
358358
gh = github.Github(login_or_token=token)
359359
org = gh.get_organization("llvm")
360360
repo = org.get_repo("llvm-project")
361-
team = org.get_team_by_slug("llvm-committers")
362361
one_year_ago = datetime.datetime.now() - datetime.timedelta(days=365)
363362
triage_list = {}
364-
for member in team.get_members():
365-
triage_list[member.login] = User(member.login, triage_list)
363+
for collaborator in repo.get_collaborators(permission="push"):
364+
triage_list[collaborator.login] = User(collaborator.login, triage_list)
366365

367366
print("Start:", len(triage_list), "triagers")
368367
# Step 0 Check if users have requested commit access in the last year.

.github/workflows/release-binaries-all.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ on:
4343
- '.github/workflows/release-binaries.yml'
4444
- '.github/workflows/release-binaries-setup-stage/*'
4545
- '.github/workflows/release-binaries-save-stage/*'
46+
- 'clang/cmake/caches/Release.cmake'
4647

4748
concurrency:
4849
group: ${{ github.workflow }}-${{ github.event.pull_request.number || 'dispatch' }}

bolt/include/bolt/Core/BinaryBasicBlock.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "bolt/Core/MCPlus.h"
2020
#include "llvm/ADT/GraphTraits.h"
2121
#include "llvm/ADT/StringRef.h"
22+
#include "llvm/Config/llvm-config.h" // for LLVM_ON_UNIX
2223
#include "llvm/MC/MCInst.h"
2324
#include "llvm/MC/MCSymbol.h"
2425
#include "llvm/Support/ErrorOr.h"

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,15 @@ struct SegmentInfo {
7171
uint64_t FileOffset; /// Offset in the file.
7272
uint64_t FileSize; /// Size in file.
7373
uint64_t Alignment; /// Alignment of the segment.
74+
bool IsExecutable; /// Is the executable bit set on the Segment?
7475

7576
void print(raw_ostream &OS) const {
76-
OS << "SegmentInfo { Address: 0x"
77-
<< Twine::utohexstr(Address) << ", Size: 0x"
78-
<< Twine::utohexstr(Size) << ", FileOffset: 0x"
77+
OS << "SegmentInfo { Address: 0x" << Twine::utohexstr(Address)
78+
<< ", Size: 0x" << Twine::utohexstr(Size) << ", FileOffset: 0x"
7979
<< Twine::utohexstr(FileOffset) << ", FileSize: 0x"
8080
<< Twine::utohexstr(FileSize) << ", Alignment: 0x"
81-
<< Twine::utohexstr(Alignment) << "}";
81+
<< Twine::utohexstr(Alignment) << ", " << (IsExecutable ? "x" : " ")
82+
<< "}";
8283
};
8384
};
8485

bolt/include/bolt/Core/BinaryData.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ inline raw_ostream &operator<<(raw_ostream &OS,
226226
Sep = ",\n ";
227227
TotalCount += AccessInfo.Count;
228228
}
229-
SS.flush();
230229

231230
OS << TotalCount << " total counts : " << TempString;
232231
return OS;

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ inline raw_ostream &operator<<(raw_ostream &OS,
117117
TotalCount += CSP.Count;
118118
TotalMispreds += CSP.Mispreds;
119119
}
120-
SS.flush();
121120

122121
OS << TotalCount << " (" << TotalMispreds << " misses) :" << TempString;
123122
return OS;

bolt/include/bolt/Rewrite/RewriteInstance.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -510,12 +510,11 @@ class RewriteInstance {
510510
};
511511

512512
/// Different types of X86-64 PLT sections.
513-
const PLTSectionInfo X86_64_PLTSections[4] = {
514-
{ ".plt", 16 },
515-
{ ".plt.got", 8 },
516-
{ ".plt.sec", 8 },
517-
{ nullptr, 0 }
518-
};
513+
const PLTSectionInfo X86_64_PLTSections[5] = {{".plt", 16},
514+
{".plt.got", 8},
515+
{".plt.sec", 8},
516+
{".iplt", 16},
517+
{nullptr, 0}};
519518

520519
/// AArch64 PLT sections.
521520
const PLTSectionInfo AArch64_PLTSections[4] = {

bolt/lib/Core/BinaryContext.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,6 +2021,9 @@ BinaryContext::getBaseAddressForMapping(uint64_t MMapAddress,
20212021
// Find a segment with a matching file offset.
20222022
for (auto &KV : SegmentMapInfo) {
20232023
const SegmentInfo &SegInfo = KV.second;
2024+
// Only consider executable segments.
2025+
if (!SegInfo.IsExecutable)
2026+
continue;
20242027
// FileOffset is got from perf event,
20252028
// and it is equal to alignDown(SegInfo.FileOffset, pagesize).
20262029
// If the pagesize is not equal to SegInfo.Alignment.

bolt/lib/Core/BinaryFunction.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ bool shouldPrint(const BinaryFunction &Function) {
165165
}
166166
}
167167

168+
std::optional<StringRef> Origin = Function.getOriginSectionName();
169+
if (Origin && llvm::any_of(opts::PrintOnly, [&](const std::string &Name) {
170+
return Name == *Origin;
171+
}))
172+
return true;
173+
168174
return false;
169175
}
170176

bolt/lib/Passes/RetpolineInsertion.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ std::string createRetpolineFunctionTag(BinaryContext &BC,
181181
if (BrInfo.isReg()) {
182182
BC.InstPrinter->printRegName(TagOS, BrInfo.BranchReg);
183183
TagOS << "_";
184-
TagOS.flush();
185184
return Tag;
186185
}
187186

@@ -212,7 +211,6 @@ std::string createRetpolineFunctionTag(BinaryContext &BC,
212211
BC.InstPrinter->printRegName(TagOS, MemRef.SegRegNum);
213212
}
214213

215-
TagOS.flush();
216214
return Tag;
217215
}
218216

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,8 @@ std::error_code DataAggregator::parseMMapEvents() {
20432043
// size of the mapping, but we know it should not exceed the segment
20442044
// alignment value. Hence we are performing an approximate check.
20452045
return SegInfo.Address >= MMapInfo.MMapAddress &&
2046-
SegInfo.Address - MMapInfo.MMapAddress < SegInfo.Alignment;
2046+
SegInfo.Address - MMapInfo.MMapAddress < SegInfo.Alignment &&
2047+
SegInfo.IsExecutable;
20472048
});
20482049
if (!MatchFound) {
20492050
errs() << "PERF2BOLT-WARNING: ignoring mapping of " << NameToUse

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -526,11 +526,9 @@ Error RewriteInstance::discoverStorage() {
526526
NextAvailableOffset = std::max(NextAvailableOffset,
527527
Phdr.p_offset + Phdr.p_filesz);
528528

529-
BC->SegmentMapInfo[Phdr.p_vaddr] = SegmentInfo{Phdr.p_vaddr,
530-
Phdr.p_memsz,
531-
Phdr.p_offset,
532-
Phdr.p_filesz,
533-
Phdr.p_align};
529+
BC->SegmentMapInfo[Phdr.p_vaddr] = SegmentInfo{
530+
Phdr.p_vaddr, Phdr.p_memsz, Phdr.p_offset,
531+
Phdr.p_filesz, Phdr.p_align, ((Phdr.p_flags & ELF::PF_X) != 0)};
534532
if (BC->TheTriple->getArch() == llvm::Triple::x86_64 &&
535533
Phdr.p_vaddr >= BinaryContext::KernelStartX86_64)
536534
BC->IsLinuxKernel = true;
@@ -1533,7 +1531,7 @@ void RewriteInstance::createPLTBinaryFunction(uint64_t TargetAddress,
15331531

15341532
MCSymbol *Symbol = Rel->Symbol;
15351533
if (!Symbol) {
1536-
if (!BC->isAArch64() || !Rel->Addend || !Rel->isIRelative())
1534+
if (BC->isRISCV() || !Rel->Addend || !Rel->isIRelative())
15371535
return;
15381536

15391537
// IFUNC trampoline without symbol
@@ -4247,7 +4245,6 @@ void RewriteInstance::addBoltInfoSection() {
42474245
<< "command line:";
42484246
for (int I = 0; I < Argc; ++I)
42494247
DescOS << " " << Argv[I];
4250-
DescOS.flush();
42514248

42524249
// Encode as GNU GOLD VERSION so it is easily printable by 'readelf -n'
42534250
const std::string BoltInfo =
@@ -4270,7 +4267,6 @@ void RewriteInstance::encodeBATSection() {
42704267
raw_string_ostream DescOS(DescStr);
42714268

42724269
BAT->write(*BC, DescOS);
4273-
DescOS.flush();
42744270

42754271
const std::string BoltInfo =
42764272
BinarySection::encodeELFNote("BOLT", DescStr, BinarySection::NT_BOLT_BAT);

bolt/lib/RuntimeLibs/InstrumentationRuntimeLibrary.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ std::string InstrumentationRuntimeLibrary::buildTables(BinaryContext &BC) {
314314
}
315315
// Our string table lives immediately after descriptions vector
316316
OS << Summary->StringTable;
317-
OS.flush();
318317

319318
return TablesStr;
320319
}

bolt/test/AArch64/constant_island_pie_update.s

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
# RUN: %clang %cflags -fPIC -pie %t.o -o %t.rela.exe -nostdlib \
99
# RUN: -Wl,-q -Wl,-z,notext
1010
# RUN: llvm-bolt %t.rela.exe -o %t.rela.bolt --use-old-text=0 --lite=0
11-
# RUN: llvm-objdump -j .text -d --show-all-symbols %t.rela.bolt | FileCheck %s
11+
# RUN: llvm-objdump -j .text -d -z --show-all-symbols %t.rela.bolt | FileCheck %s
1212
# RUN: llvm-readelf -rsW %t.rela.bolt | FileCheck --check-prefix=ELFCHECK %s
1313
// .relr.dyn
1414
# RUN: %clang %cflags -fPIC -pie %t.o -o %t.relr.exe -nostdlib \
1515
# RUN: -Wl,-q -Wl,-z,notext -Wl,--pack-dyn-relocs=relr
1616
# RUN: llvm-objcopy --remove-section .rela.mytext %t.relr.exe
1717
# RUN: llvm-bolt %t.relr.exe -o %t.relr.bolt --use-old-text=0 --lite=0
18-
# RUN: llvm-objdump -j .text -d --show-all-symbols %t.relr.bolt | FileCheck %s
19-
# RUN: llvm-objdump -j .text -d %t.relr.bolt | \
18+
# RUN: llvm-objdump -j .text -d -z --show-all-symbols %t.relr.bolt | FileCheck %s
19+
# RUN: llvm-objdump -j .text -d -z %t.relr.bolt | \
2020
# RUN: FileCheck %s --check-prefix=ADDENDCHECK
2121
# RUN: llvm-readelf -rsW %t.relr.bolt | FileCheck --check-prefix=RELRELFCHECK %s
2222
# RUN: llvm-readelf -SW %t.relr.bolt | FileCheck --check-prefix=RELRSZCHECK %s
Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
// This test checks that IFUNC trampoline is properly recognised by BOLT
2-
31
// With -O0 indirect call is performed on IPLT trampoline. IPLT trampoline
42
// has IFUNC symbol.
5-
// RUN: %clang %cflags -nostdlib -O0 -no-pie %s -fuse-ld=lld \
3+
// RUN: %clang %cflags -nostdlib -O0 -no-pie %p/../Inputs/ifunc.c -fuse-ld=lld \
64
// RUN: -o %t.O0.exe -Wl,-q
75
// RUN: llvm-bolt %t.O0.exe -o %t.O0.bolt.exe \
86
// RUN: --print-disasm --print-only=_start | \
@@ -12,7 +10,7 @@
1210

1311
// Non-pie static executable doesn't generate PT_DYNAMIC, check relocation
1412
// is readed successfully and IPLT trampoline has been identified by bolt.
15-
// RUN: %clang %cflags -nostdlib -O3 %s -fuse-ld=lld -no-pie \
13+
// RUN: %clang %cflags -nostdlib -O3 %p/../Inputs/ifunc.c -fuse-ld=lld -no-pie \
1614
// RUN: -o %t.O3_nopie.exe -Wl,-q
1715
// RUN: llvm-readelf -l %t.O3_nopie.exe | \
1816
// RUN: FileCheck --check-prefix=NON_DYN_CHECK %s
@@ -25,7 +23,7 @@
2523
// With -O3 direct call is performed on IPLT trampoline. IPLT trampoline
2624
// doesn't have associated symbol. The ifunc symbol has the same address as
2725
// IFUNC resolver function.
28-
// RUN: %clang %cflags -nostdlib -O3 %s -fuse-ld=lld -fPIC -pie \
26+
// RUN: %clang %cflags -nostdlib -O3 %p/../Inputs/ifunc.c -fuse-ld=lld -fPIC -pie \
2927
// RUN: -o %t.O3_pie.exe -Wl,-q
3028
// RUN: llvm-bolt %t.O3_pie.exe -o %t.O3_pie.bolt.exe \
3129
// RUN: --print-disasm --print-only=_start | \
@@ -35,8 +33,8 @@
3533

3634
// Check that IPLT trampoline located in .plt section are normally handled by
3735
// BOLT. The gnu-ld linker doesn't use separate .iplt section.
38-
// RUN: %clang %cflags -nostdlib -O3 %s -fuse-ld=lld -fPIC -pie \
39-
// RUN: -T %p/Inputs/iplt.ld -o %t.iplt_O3_pie.exe -Wl,-q
36+
// RUN: %clang %cflags -nostdlib -O3 %p/../Inputs/ifunc.c -fuse-ld=lld -fPIC -pie \
37+
// RUN: -T %p/../Inputs/iplt.ld -o %t.iplt_O3_pie.exe -Wl,-q
4038
// RUN: llvm-bolt %t.iplt_O3_pie.exe -o %t.iplt_O3_pie.bolt.exe \
4139
// RUN: --print-disasm --print-only=_start | \
4240
// RUN: FileCheck --check-prefix=CHECK %s
@@ -49,14 +47,3 @@
4947

5048
// REL_CHECK: R_AARCH64_IRELATIVE [[#%x,REL_SYMB_ADDR:]]
5149
// REL_CHECK: [[#REL_SYMB_ADDR]] {{.*}} FUNC {{.*}} resolver_foo
52-
53-
static void foo() {}
54-
static void bar() {}
55-
56-
extern int use_foo;
57-
58-
static void *resolver_foo(void) { return use_foo ? foo : bar; }
59-
60-
__attribute__((ifunc("resolver_foo"))) void ifoo();
61-
62-
void _start() { ifoo(); }

bolt/test/AArch64/update-weak-reference-symbol.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %clang %cflags -Wl,-z,notext -shared -Wl,-q %s -o %t.so
44
// RUN: llvm-bolt %t.so -o %t.so.bolt
55
// RUN: llvm-nm -n %t.so.bolt > %t.out.txt
6-
// RUN: llvm-objdump -dj .rodata %t.so.bolt >> %t.out.txt
6+
// RUN: llvm-objdump -z -dj .rodata %t.so.bolt >> %t.out.txt
77
// RUN: FileCheck %s --input-file=%t.out.txt
88

99
# CHECK: w func_1

bolt/test/Inputs/ifunc.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// This test checks that IFUNC trampoline is properly recognised by BOLT
2+
3+
static void foo() {}
4+
static void bar() {}
5+
6+
extern int use_foo;
7+
8+
static void *resolver_foo(void) { return use_foo ? foo : bar; }
9+
10+
__attribute__((ifunc("resolver_foo"))) void ifoo();
11+
12+
void _start() { ifoo(); }
File renamed without changes.

bolt/test/X86/ifunc.test

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Check if BOLT can process ifunc symbols from .plt section
2+
// RUN: %clang %cflags -nostdlib -no-pie %p/../Inputs/ifunc.c -fuse-ld=lld \
3+
// RUN: -o %t.exe -Wl,-q
4+
// RUN: llvm-bolt %t.exe -o %t.bolt.exe \
5+
// RUN: --print-disasm --print-only=_start | \
6+
// RUN: FileCheck --check-prefix=CHECK %s
7+
// RUN: llvm-readelf -aW %t.bolt.exe | \
8+
// RUN: FileCheck --check-prefix=REL_CHECK %s
9+
10+
// Check if BOLT can process ifunc symbols from .plt section in non-pie static
11+
// executable case.
12+
// RUN: %clang %cflags -nostdlib %p/../Inputs/ifunc.c -fuse-ld=lld -no-pie \
13+
// RUN: -o %t.nopie.exe -Wl,-q
14+
// RUN: llvm-readelf -l %t.nopie.exe | \
15+
// RUN: FileCheck --check-prefix=NON_DYN_CHECK %s
16+
// RUN: llvm-bolt %t.nopie.exe -o %t.nopie.bolt.exe \
17+
// RUN: --print-disasm --print-only=_start | \
18+
// RUN: FileCheck --check-prefix=CHECK %s
19+
// RUN: llvm-readelf -aW %t.nopie.bolt.exe | \
20+
// RUN: FileCheck --check-prefix=REL_CHECK %s
21+
22+
// Check if BOLT can process ifunc symbols from .plt section in pie executable
23+
// case.
24+
// RUN: %clang %cflags -nostdlib %p/../Inputs/ifunc.c -fuse-ld=lld -fPIC -pie \
25+
// RUN: -o %t.pie.exe -Wl,-q
26+
// RUN: llvm-bolt %t.pie.exe -o %t.pie.bolt.exe \
27+
// RUN: --print-disasm --print-only=_start | \
28+
// RUN: FileCheck --check-prefix=CHECK %s
29+
// RUN: llvm-readelf -aW %t.pie.bolt.exe | \
30+
// RUN: FileCheck --check-prefix=REL_CHECK %s
31+
32+
// Check that IPLT trampoline located in .plt section are normally handled by
33+
// BOLT. The gnu-ld linker doesn't use separate .iplt section.
34+
// RUN: %clang %cflags -nostdlib %p/../Inputs/ifunc.c -fuse-ld=lld -fPIC -pie \
35+
// RUN: -T %p/../Inputs/iplt.ld -o %t.iplt_pie.exe -Wl,-q
36+
// RUN: llvm-bolt %t.iplt_pie.exe -o %t.iplt_pie.bolt.exe \
37+
// RUN: --print-disasm --print-only=_start | \
38+
// RUN: FileCheck --check-prefix=CHECK %s
39+
// RUN: llvm-readelf -aW %t.iplt_pie.bolt.exe | \
40+
// RUN: FileCheck --check-prefix=REL_CHECK %s
41+
42+
// NON_DYN_CHECK-NOT: DYNAMIC
43+
44+
// CHECK: callq "resolver_foo/1@PLT"
45+
46+
// REL_CHECK: R_X86_64_IRELATIVE [[#%x,REL_SYMB_ADDR:]]
47+
// REL_CHECK: [[#REL_SYMB_ADDR]] {{.*}} FUNC {{.*}} resolver_foo

bolt/test/X86/log.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN: yaml2obj %p/Inputs/blarge.yaml &> %t.exe
66
RUN: llvm-bolt %t.exe -o %t.null --data %p/Inputs/blarge.fdata -v=2 \
77
RUN: --reorder-blocks=normal --print-finalized --log-file=%t.log 2>&1 \
88
RUN: | FileCheck --check-prefix=CHECK --allow-empty %s
9-
RUN: cat %t.log | FileCheck %s --check-prefix=CHECK-LOG
9+
RUN: FileCheck %s --check-prefix=CHECK-LOG --input-file %t.log
1010

1111
CHECK-NOT: BOLT-INFO
1212
CHECK-NOT: BOLT-WARNING
@@ -16,4 +16,4 @@ CHECK-NOT: BOLT-ERROR
1616
CHECK-LOG: BOLT-INFO: Target architecture
1717
CHECK-LOG: BOLT-INFO: BOLT version
1818
CHECK-LOG: BOLT-INFO: basic block reordering modified layout
19-
CHECK-LOG: Binary Function "usqrt"
19+
CHECK-LOG: Binary Function "main"

bolt/test/X86/print-only-section.s

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Check that --print-only flag works with sections.
2+
3+
# REQUIRES: system-linux
4+
5+
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o
6+
# RUN: ld.lld %t.o -o %t.exe
7+
# RUN: llvm-bolt %t.exe -o %t.out --print-cfg --print-only=unused_code 2>&1 \
8+
# RUN: | FileCheck %s
9+
10+
# CHECK: Binary Function "foo"
11+
# CHECK-NOT: Binary Function "_start"
12+
13+
.text
14+
.globl _start
15+
.type _start, %function
16+
_start:
17+
.cfi_startproc
18+
ret
19+
.cfi_endproc
20+
.size _start, .-_start
21+
22+
.section unused_code,"ax",@progbits
23+
.globl foo
24+
.type foo, %function
25+
foo:
26+
.cfi_startproc
27+
ret
28+
.cfi_endproc
29+
.size foo, .-foo

bolt/test/lit.local.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
host_linux_triple = config.target_triple.split("-")[0] + "-unknown-linux-gnu"
2-
common_linker_flags = "-fuse-ld=lld -Wl,--unresolved-symbols=ignore-all"
3-
flags = f"--target={host_linux_triple} {common_linker_flags}"
2+
common_linker_flags = "-fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -pie"
3+
flags = f"--target={host_linux_triple} -fPIE {common_linker_flags}"
44

55
config.substitutions.insert(0, ("%cflags", f"%cflags {flags}"))
66
config.substitutions.insert(0, ("%cxxflags", f"%cxxflags {flags}"))

0 commit comments

Comments
 (0)