Allow FreeBSD's native ELF image activators to execute shared libraries the
same way it was enabled for Linux binares in linuxulator. This allows binaries built with -pie. Many ports auto-detect -fPIE support in GCC 4.2 and build binaries FreeBSD was unable to run.
This commit is contained in:
parent
2049c78bad
commit
4c2d706212
@ -82,7 +82,7 @@ static Elf64_Brandinfo freebsd_brand_info = {
|
||||
"/libexec/ld-elf.so.1",
|
||||
&elf64_freebsd_sysvec,
|
||||
NULL,
|
||||
0,
|
||||
BI_CAN_EXEC_DYN,
|
||||
};
|
||||
|
||||
SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY,
|
||||
@ -97,7 +97,7 @@ static Elf64_Brandinfo freebsd_brand_oinfo = {
|
||||
"/usr/libexec/ld-elf.so.1",
|
||||
&elf64_freebsd_sysvec,
|
||||
NULL,
|
||||
0,
|
||||
BI_CAN_EXEC_DYN,
|
||||
};
|
||||
|
||||
SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY,
|
||||
|
@ -82,7 +82,7 @@ static Elf32_Brandinfo freebsd_brand_info = {
|
||||
"/libexec/ld-elf.so.1",
|
||||
&elf32_freebsd_sysvec,
|
||||
NULL,
|
||||
0,
|
||||
BI_CAN_EXEC_DYN,
|
||||
};
|
||||
|
||||
SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
|
||||
@ -97,7 +97,7 @@ static Elf32_Brandinfo freebsd_brand_oinfo = {
|
||||
"/usr/libexec/ld-elf.so.1",
|
||||
&elf32_freebsd_sysvec,
|
||||
NULL,
|
||||
0,
|
||||
BI_CAN_EXEC_DYN,
|
||||
};
|
||||
|
||||
SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY,
|
||||
|
@ -138,7 +138,7 @@ static Elf32_Brandinfo ia32_brand_info = {
|
||||
"/libexec/ld-elf.so.1",
|
||||
&ia32_freebsd_sysvec,
|
||||
"/libexec/ld-elf32.so.1",
|
||||
0,
|
||||
BI_CAN_EXEC_DYN,
|
||||
};
|
||||
|
||||
SYSINIT(ia32, SI_SUB_EXEC, SI_ORDER_ANY,
|
||||
@ -153,7 +153,7 @@ static Elf32_Brandinfo ia32_brand_oinfo = {
|
||||
"/usr/libexec/ld-elf.so.1",
|
||||
&ia32_freebsd_sysvec,
|
||||
"/libexec/ld-elf32.so.1",
|
||||
0,
|
||||
BI_CAN_EXEC_DYN,
|
||||
};
|
||||
|
||||
SYSINIT(oia32, SI_SUB_EXEC, SI_ORDER_ANY,
|
||||
|
@ -82,7 +82,7 @@ static Elf32_Brandinfo freebsd_brand_info = {
|
||||
"/libexec/ld-elf.so.1",
|
||||
&elf32_freebsd_sysvec,
|
||||
NULL,
|
||||
0,
|
||||
BI_CAN_EXEC_DYN,
|
||||
};
|
||||
|
||||
SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
|
||||
@ -97,7 +97,7 @@ static Elf32_Brandinfo freebsd_brand_oinfo = {
|
||||
"/usr/libexec/ld-elf.so.1",
|
||||
&elf32_freebsd_sysvec,
|
||||
NULL,
|
||||
0,
|
||||
BI_CAN_EXEC_DYN,
|
||||
};
|
||||
|
||||
SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY,
|
||||
|
@ -90,7 +90,7 @@ static Elf64_Brandinfo freebsd_brand_info = {
|
||||
"/libexec/ld-elf.so.1",
|
||||
&elf64_freebsd_sysvec,
|
||||
NULL,
|
||||
0,
|
||||
BI_CAN_EXEC_DYN,
|
||||
};
|
||||
SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY,
|
||||
(sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_info);
|
||||
@ -103,7 +103,7 @@ static Elf64_Brandinfo freebsd_brand_oinfo = {
|
||||
"/usr/libexec/ld-elf.so.1",
|
||||
&elf64_freebsd_sysvec,
|
||||
NULL,
|
||||
0,
|
||||
BI_CAN_EXEC_DYN,
|
||||
};
|
||||
SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY,
|
||||
(sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_oinfo);
|
||||
|
@ -85,7 +85,7 @@ static Elf32_Brandinfo freebsd_brand_info = {
|
||||
"/libexec/ld-elf.so.1",
|
||||
&elf32_freebsd_sysvec,
|
||||
NULL,
|
||||
0,
|
||||
BI_CAN_EXEC_DYN,
|
||||
};
|
||||
|
||||
SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
|
||||
@ -100,7 +100,7 @@ static Elf32_Brandinfo freebsd_brand_oinfo = {
|
||||
"/usr/libexec/ld-elf.so.1",
|
||||
&elf32_freebsd_sysvec,
|
||||
NULL,
|
||||
0,
|
||||
BI_CAN_EXEC_DYN,
|
||||
};
|
||||
|
||||
SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY,
|
||||
|
@ -95,7 +95,7 @@ static Elf64_Brandinfo freebsd_brand_info = {
|
||||
"/libexec/ld-elf.so.1",
|
||||
&elf64_freebsd_sysvec,
|
||||
NULL,
|
||||
0,
|
||||
BI_CAN_EXEC_DYN,
|
||||
};
|
||||
|
||||
SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY,
|
||||
@ -110,7 +110,7 @@ static Elf64_Brandinfo freebsd_brand_oinfo = {
|
||||
"/usr/libexec/ld-elf.so.1",
|
||||
&elf64_freebsd_sysvec,
|
||||
NULL,
|
||||
0,
|
||||
BI_CAN_EXEC_DYN,
|
||||
};
|
||||
|
||||
SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY,
|
||||
|
Loading…
Reference in New Issue
Block a user