summaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2009-02-02 03:52:38 +0000
committerAlan Modra <amodra@bigpond.net.au>2009-02-02 03:52:38 +0000
commitfdcf7843b92be86c66eac988579bc39939438c3f (patch)
treefb597b3ce010d4ee57db340abc69e01f4b2f998f /bfd/elf.c
parentcfe372be8f0c6a937483040a55fdc153fd2c3450 (diff)
downloadbinutils-redhat-fdcf7843b92be86c66eac988579bc39939438c3f.tar.gz
* elf-bfd.h (bfd_elf_get_str_section): Don't declare.
(bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise. * elf.c (bfd_elf_get_str_section): Make static. (bfd_elf_find_section): Delete. * libbfd.h: Regenerate.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c44
1 files changed, 3 insertions, 41 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 0009ee87f9..44af469e1f 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1,7 +1,8 @@
/* ELF executable support for BFD.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -258,7 +259,7 @@ bfd_elf_mkcorefile (bfd *abfd)
return bfd_elf_make_generic_object (abfd);
}
-char *
+static char *
bfd_elf_get_str_section (bfd *abfd, unsigned int shindex)
{
Elf_Internal_Shdr **i_shdrp;
@@ -1019,45 +1020,6 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
return TRUE;
}
-/*
-INTERNAL_FUNCTION
- bfd_elf_find_section
-
-SYNOPSIS
- struct elf_internal_shdr *bfd_elf_find_section (bfd *abfd, char *name);
-
-DESCRIPTION
- Helper functions for GDB to locate the string tables.
- Since BFD hides string tables from callers, GDB needs to use an
- internal hook to find them. Sun's .stabstr, in particular,
- isn't even pointed to by the .stab section, so ordinary
- mechanisms wouldn't work to find it, even if we had some.
-*/
-
-struct elf_internal_shdr *
-bfd_elf_find_section (bfd *abfd, char *name)
-{
- Elf_Internal_Shdr **i_shdrp;
- char *shstrtab;
- unsigned int max;
- unsigned int i;
-
- i_shdrp = elf_elfsections (abfd);
- if (i_shdrp != NULL)
- {
- shstrtab = bfd_elf_get_str_section (abfd,
- elf_elfheader (abfd)->e_shstrndx);
- if (shstrtab != NULL)
- {
- max = elf_numsections (abfd);
- for (i = 1; i < max; i++)
- if (!strcmp (&shstrtab[i_shdrp[i]->sh_name], name))
- return i_shdrp[i];
- }
- }
- return 0;
-}
-
const char *const bfd_elf_section_type_names[] = {
"SHT_NULL", "SHT_PROGBITS", "SHT_SYMTAB", "SHT_STRTAB",
"SHT_RELA", "SHT_HASH", "SHT_DYNAMIC", "SHT_NOTE",