Skip to content

Commit 0036198

Browse files
CjiWChronostasys
authored andcommitted
fix: add all args
1 parent 139d29c commit 0036198

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

pl_linker/src/linker.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,24 @@ impl Linker for LdLinker {
121121
});
122122
// libs and link args
123123
[
124+
"-pie",
125+
"-zrelro",
126+
"--hash-style=gnu",
127+
"--build-id",
128+
"--eh-frame-hdr",
129+
"-melf_x86_64",
124130
"-dynamic-linker=/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2",
125-
"/lib/x86_64-linux-gnu/crt1.o",
131+
"/lib/x86_64-linux-gnu/Scrt1.o",
132+
"/lib/x86_64-linux-gnu/crti.o",
133+
// "/usr/lib/gcc/x86_64-linux-gnu/<version>/crtbeginS.o",
126134
"-lc",
127135
"-lpthread",
128136
"-lgcc_s",
137+
"-lgcc",
138+
"--no-as-needed",
139+
"-ldl",
140+
// "/usr/lib/gcc/x86_64-linux-gnu/<version>/crtendS.o",
141+
"/lib/x86_64-linux-gnu/crtn.o",
129142
]
130143
.iter()
131144
.for_each(|arg| {

0 commit comments

Comments
 (0)