Brandinfo: Retire emul_path as unneeded anymore
The Barndinfo emul_path was used by the Elf image activator to fixup interpreter file name according to ABI root directory. Since the non-native ABI can now specify its root directory directly to namei() via pwd_altroot() call this facility is not needed anymore. Differential Revision: https://reviews.freebsd.org/D40091 MFC after: 2 month
This commit is contained in:
@@ -184,7 +184,6 @@ static Elf64_Brandinfo freebsd_brand_info_la48 = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_X86_64,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/libexec/ld-elf.so.1",
|
||||
.sysvec = &elf64_freebsd_sysvec_la48,
|
||||
.interp_newpath = NULL,
|
||||
@@ -196,7 +195,6 @@ static Elf64_Brandinfo freebsd_brand_info_la57 = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_X86_64,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/libexec/ld-elf.so.1",
|
||||
.sysvec = &elf64_freebsd_sysvec_la57,
|
||||
.interp_newpath = NULL,
|
||||
@@ -223,7 +221,6 @@ static Elf64_Brandinfo freebsd_brand_oinfo = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_X86_64,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/usr/libexec/ld-elf.so.1",
|
||||
.sysvec = &elf64_freebsd_sysvec_la48,
|
||||
.interp_newpath = NULL,
|
||||
@@ -238,7 +235,6 @@ static Elf64_Brandinfo kfreebsd_brand_info = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_X86_64,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/lib/ld-kfreebsd-x86-64.so.1",
|
||||
.sysvec = &elf64_freebsd_sysvec_la48,
|
||||
.interp_newpath = NULL,
|
||||
|
||||
@@ -112,7 +112,6 @@ static Elf32_Brandinfo freebsd_brand_info = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_ARM,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/libexec/ld-elf.so.1",
|
||||
.sysvec = &elf32_freebsd_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
|
||||
@@ -130,7 +130,6 @@ static Elf32_Brandinfo freebsd32_brand_info = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_ARM,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/libexec/ld-elf.so.1",
|
||||
.sysvec = &elf32_freebsd_sysvec,
|
||||
.interp_newpath = "/libexec/ld-elf32.so.1",
|
||||
|
||||
@@ -109,7 +109,6 @@ static Elf64_Brandinfo freebsd_brand_info = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_AARCH64,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/libexec/ld-elf.so.1",
|
||||
.sysvec = &elf64_freebsd_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
|
||||
@@ -151,7 +151,6 @@ static Elf32_Brandinfo ia32_brand_info = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_386,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/libexec/ld-elf.so.1",
|
||||
.sysvec = &ia32_freebsd_sysvec,
|
||||
.interp_newpath = "/libexec/ld-elf32.so.1",
|
||||
@@ -167,7 +166,6 @@ static Elf32_Brandinfo ia32_brand_oinfo = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_386,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/usr/libexec/ld-elf.so.1",
|
||||
.sysvec = &ia32_freebsd_sysvec,
|
||||
.interp_newpath = "/libexec/ld-elf32.so.1",
|
||||
@@ -183,7 +181,6 @@ static Elf32_Brandinfo kia32_brand_info = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_386,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/lib/ld.so.1",
|
||||
.sysvec = &ia32_freebsd_sysvec,
|
||||
.brand_note = &elf32_kfreebsd_brandnote,
|
||||
|
||||
@@ -99,7 +99,6 @@ static Elf32_Brandinfo freebsd_brand_info = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_386,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/libexec/ld-elf.so.1",
|
||||
.sysvec = &elf32_freebsd_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
@@ -115,7 +114,6 @@ static Elf32_Brandinfo freebsd_brand_oinfo = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_386,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/usr/libexec/ld-elf.so.1",
|
||||
.sysvec = &elf32_freebsd_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
@@ -131,7 +129,6 @@ static Elf32_Brandinfo kfreebsd_brand_info = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_386,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/lib/ld.so.1",
|
||||
.sysvec = &elf32_freebsd_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
|
||||
@@ -1069,20 +1069,8 @@ static int
|
||||
__elfN(load_interp)(struct image_params *imgp, const Elf_Brandinfo *brand_info,
|
||||
const char *interp, u_long *addr, u_long *entry)
|
||||
{
|
||||
char *path;
|
||||
int error;
|
||||
|
||||
if (brand_info->emul_path != NULL &&
|
||||
brand_info->emul_path[0] != '\0') {
|
||||
path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
|
||||
snprintf(path, MAXPATHLEN, "%s%s",
|
||||
brand_info->emul_path, interp);
|
||||
error = __elfN(load_file)(imgp->proc, path, addr, entry);
|
||||
free(path, M_TEMP);
|
||||
if (error == 0)
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (brand_info->interp_newpath != NULL &&
|
||||
(brand_info->interp_path == NULL ||
|
||||
strcmp(interp, brand_info->interp_path) == 0)) {
|
||||
|
||||
@@ -148,7 +148,6 @@ static Elf32_Brandinfo freebsd_brand_info = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_PPC,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/libexec/ld-elf.so.1",
|
||||
.sysvec = &elf32_freebsd_sysvec,
|
||||
#ifdef __powerpc64__
|
||||
@@ -168,7 +167,6 @@ static Elf32_Brandinfo freebsd_brand_oinfo = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_PPC,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/usr/libexec/ld-elf.so.1",
|
||||
.sysvec = &elf32_freebsd_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
|
||||
@@ -158,7 +158,6 @@ static Elf64_Brandinfo freebsd_brand_info_elfv1 = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_PPC64,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/libexec/ld-elf.so.1",
|
||||
.sysvec = &elf64_freebsd_sysvec_v1,
|
||||
.interp_newpath = NULL,
|
||||
@@ -175,7 +174,6 @@ static Elf64_Brandinfo freebsd_brand_info_elfv2 = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_PPC64,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/libexec/ld-elf.so.1",
|
||||
.sysvec = &elf64_freebsd_sysvec_v2,
|
||||
.interp_newpath = NULL,
|
||||
@@ -192,7 +190,6 @@ static Elf64_Brandinfo freebsd_brand_oinfo = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_PPC64,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/usr/libexec/ld-elf.so.1",
|
||||
.sysvec = &elf64_freebsd_sysvec_v1,
|
||||
.interp_newpath = NULL,
|
||||
|
||||
@@ -121,7 +121,6 @@ static Elf64_Brandinfo freebsd_brand_info = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
.machine = EM_RISCV,
|
||||
.compat_3_brand = "FreeBSD",
|
||||
.emul_path = NULL,
|
||||
.interp_path = "/libexec/ld-elf.so.1",
|
||||
.sysvec = &elf64_freebsd_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
|
||||
@@ -83,7 +83,6 @@ typedef struct {
|
||||
int brand;
|
||||
int machine;
|
||||
const char *compat_3_brand; /* pre Binutils 2.10 method (FBSD 3) */
|
||||
const char *emul_path;
|
||||
const char *interp_path;
|
||||
struct sysentvec *sysvec;
|
||||
const char *interp_newpath;
|
||||
|
||||
Reference in New Issue
Block a user