Skip to content

Commit

Permalink
Remove the specific SHT_GNU_HASH for some version unix OS.
Browse files Browse the repository at this point in the history
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1276 7335b38e-4728-0410-8992-fb3ffe349368
  • Loading branch information
lgao4 committed Jul 4, 2008
1 parent 9f3e473 commit 1b3d3f3
Showing 1 changed file with 8 additions and 27 deletions.
35 changes: 8 additions & 27 deletions Source/C/GenFw/GenFw.c
Expand Up @@ -508,38 +508,15 @@ IsTextShdr(
Elf_Shdr *Shdr
)
{
int Status;
int NotText = 1;
Status = (int)((Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) == SHF_ALLOC);
if (Ehdr->e_type == ET_EXEC)
return Status;
else {
//
// this is a shared object file.
//
switch (Shdr->sh_type) {
case SHT_HASH:
case SHT_DYNSYM:
case SHT_STRTAB:
case SHT_REL:
case SHT_GNU_HASH:
NotText = 0;
break;
default:
break;
}
return Status && NotText;
}
return (Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) == SHF_ALLOC;
}

int
IsDataShdr(
Elf_Shdr *Shdr
)
{
int Status;
Status = (Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) == (SHF_ALLOC | SHF_WRITE);
return Status && !(Shdr->sh_type == (SHT_DYNAMIC));
return (Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) == (SHF_ALLOC | SHF_WRITE);
}

VOID
Expand Down Expand Up @@ -720,8 +697,12 @@ WriteSections(
memset(CoffFile + CoffSectionsOffset[Idx], 0, Shdr->sh_size);
break;
default:
Error (NULL, 0, 3000, "Invalid", "%s unhandled section type %x.", mInImageName, (UINTN)Shdr->sh_type);
}
//
// Ignore for unkown section type.
//
VerboseMsg ("%s unknown section type %x. We directly copy this section into Coff file", mInImageName, (UINTN)Shdr->sh_type);
break;
}
}
}

Expand Down

0 comments on commit 1b3d3f3

Please sign in to comment.