Use the ABI-prescribed name for SHT_X86_64_UNWIND in the loader and

kernel linker, after the r297686.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
kib 2016-04-08 10:23:48 +00:00
parent 21446f2890
commit 7c6ea895ee
2 changed files with 9 additions and 9 deletions

View File

@ -222,7 +222,7 @@ __elfN(obj_loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off)
case SHT_PROGBITS:
case SHT_NOBITS:
#if defined(__i386__) || defined(__amd64__)
case SHT_AMD64_UNWIND:
case SHT_X86_64_UNWIND:
#endif
lastaddr = roundup(lastaddr, shdr[i].sh_addralign);
shdr[i].sh_addr = (Elf_Addr)lastaddr;

View File

@ -258,7 +258,7 @@ link_elf_link_preload(linker_class_t cls, const char *filename,
case SHT_PROGBITS:
case SHT_NOBITS:
#ifdef __amd64__
case SHT_AMD64_UNWIND:
case SHT_X86_64_UNWIND:
#endif
ef->nprogtab++;
break;
@ -331,13 +331,13 @@ link_elf_link_preload(linker_class_t cls, const char *filename,
case SHT_PROGBITS:
case SHT_NOBITS:
#ifdef __amd64__
case SHT_AMD64_UNWIND:
case SHT_X86_64_UNWIND:
#endif
ef->progtab[pb].addr = (void *)shdr[i].sh_addr;
if (shdr[i].sh_type == SHT_PROGBITS)
ef->progtab[pb].name = "<<PROGBITS>>";
#ifdef __amd64__
else if (shdr[i].sh_type == SHT_AMD64_UNWIND)
else if (shdr[i].sh_type == SHT_X86_64_UNWIND)
ef->progtab[pb].name = "<<UNWIND>>";
#endif
else
@ -597,7 +597,7 @@ link_elf_load_file(linker_class_t cls, const char *filename,
case SHT_PROGBITS:
case SHT_NOBITS:
#ifdef __amd64__
case SHT_AMD64_UNWIND:
case SHT_X86_64_UNWIND:
#endif
ef->nprogtab++;
break;
@ -712,7 +712,7 @@ link_elf_load_file(linker_class_t cls, const char *filename,
case SHT_PROGBITS:
case SHT_NOBITS:
#ifdef __amd64__
case SHT_AMD64_UNWIND:
case SHT_X86_64_UNWIND:
#endif
alignmask = shdr[i].sh_addralign - 1;
mapsize += alignmask;
@ -782,7 +782,7 @@ link_elf_load_file(linker_class_t cls, const char *filename,
case SHT_PROGBITS:
case SHT_NOBITS:
#ifdef __amd64__
case SHT_AMD64_UNWIND:
case SHT_X86_64_UNWIND:
#endif
alignmask = shdr[i].sh_addralign - 1;
mapbase += alignmask;
@ -797,7 +797,7 @@ link_elf_load_file(linker_class_t cls, const char *filename,
} else if (shdr[i].sh_type == SHT_PROGBITS)
ef->progtab[pb].name = "<<PROGBITS>>";
#ifdef __amd64__
else if (shdr[i].sh_type == SHT_AMD64_UNWIND)
else if (shdr[i].sh_type == SHT_X86_64_UNWIND)
ef->progtab[pb].name = "<<UNWIND>>";
#endif
else
@ -823,7 +823,7 @@ link_elf_load_file(linker_class_t cls, const char *filename,
ef->progtab[pb].sec = i;
if (shdr[i].sh_type == SHT_PROGBITS
#ifdef __amd64__
|| shdr[i].sh_type == SHT_AMD64_UNWIND
|| shdr[i].sh_type == SHT_X86_64_UNWIND
#endif
) {
error = vn_rdwr(UIO_READ, nd.ni_vp,