Oops, use the generic ELF_ST_BIND() macro instead of ELF64_ST_BIND.

Submitted by:  marks
This commit is contained in:
Peter Wemm 2004-05-17 00:51:34 +00:00
parent f8aa392b11
commit 872e9216d0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129311

View file

@ -665,7 +665,7 @@ relocate_file(elf_file_t ef)
symidx = ELF_R_SYM(rel->r_info);
if (symidx < ef->ddbsymcnt) {
sym = ef->ddbsymtab + symidx;
if (ELF64_ST_BIND(sym->st_info) != STB_LOCAL) {
if (ELF_ST_BIND(sym->st_info) != STB_LOCAL) {
if (elf_reloc(&ef->lf, base, rel, ELF_RELOC_REL, elf_obj_lookup)) {
symname = symbol_name(ef, rel->r_info);
printf("link_elf: symbol %s undefined\n", symname);
@ -688,7 +688,7 @@ relocate_file(elf_file_t ef)
symidx = ELF_R_SYM(rela->r_info);
if (symidx < ef->ddbsymcnt) {
sym = ef->ddbsymtab + symidx;
if (ELF64_ST_BIND(sym->st_info) != STB_LOCAL) {
if (ELF_ST_BIND(sym->st_info) != STB_LOCAL) {
if (elf_reloc(&ef->lf, base, rela, ELF_RELOC_RELA, elf_obj_lookup)) {
symname = symbol_name(ef, rela->r_info);
printf("link_elf: symbol %s undefined\n", symname);
@ -854,7 +854,7 @@ elf_obj_lookup(linker_file_t lf, Elf_Word symidx, int deps)
sym = ef->ddbsymtab + symidx;
/* Theoretically we can avoid a lookup for some locals */
switch (ELF64_ST_BIND(sym->st_info)) {
switch (ELF_ST_BIND(sym->st_info)) {
case STB_LOCAL:
/* Local, but undefined? huh? */
if (sym->st_shndx == SHN_UNDEF)
@ -922,7 +922,7 @@ link_elf_reloc_local(linker_file_t lf)
symidx = ELF_R_SYM(rel->r_info);
if (symidx < ef->ddbsymcnt) {
sym = ef->ddbsymtab + symidx;
if (ELF64_ST_BIND(sym->st_info) == STB_LOCAL)
if (ELF_ST_BIND(sym->st_info) == STB_LOCAL)
elf_reloc_local(lf, base, rel, ELF_RELOC_REL, elf_obj_lookup);
}
rel++;
@ -940,7 +940,7 @@ link_elf_reloc_local(linker_file_t lf)
symidx = ELF_R_SYM(rela->r_info);
if (symidx < ef->ddbsymcnt) {
sym = ef->ddbsymtab + symidx;
if (ELF64_ST_BIND(sym->st_info) == STB_LOCAL)
if (ELF_ST_BIND(sym->st_info) == STB_LOCAL)
elf_reloc_local(lf, base, rela, ELF_RELOC_RELA, elf_obj_lookup);
}
rela++;