diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2010-11-21 21:27:15 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2010-11-21 21:27:15 +0000 |
commit | 3284fe0c5e852fb8a3a06630c161b9633b9f6682 (patch) | |
tree | 92eae22c1b78113a96791d1ad8de502b918b5949 /binutils/dwarf.h | |
parent | f84854b643db17f4f06a8164114152b0bc001803 (diff) | |
download | gdb-3284fe0c5e852fb8a3a06630c161b9633b9f6682.zip gdb-3284fe0c5e852fb8a3a06630c161b9633b9f6682.tar.gz gdb-3284fe0c5e852fb8a3a06630c161b9633b9f6682.tar.bz2 |
Add and use elfcomm.c/elfcomm.h.
2010-11-21 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12235
* elfcomm.c: New.
* elfcomm.h: Likewise.
* Makefile.am (HFILES): Add elfcomm.h.
(CFILES): Add elfcomm.c.
(ELFLIBS): New.
(readelf_SOURCES): Add $(ELFLIBS).
(elfedit_SOURCES): Likewise.
(objdump_SOURCES): Likewise.
* Makefile.in: Regenerated.
* dwarf.c: Include "elfcomm.h".
(byte_get): Removed.
(byte_get_little_endian): Likewise.
(byte_get_big_endian): Likewise.
(byte_get_signed): Likewise.
(error): Likewise.
(warn): Likewise.
* dwarf.h (dwarf_vma): Defined with HOST_WIDEST_INT.
(dwarf_size_type): Likewise.
(byte_get): Removed.
(byte_get_signed): Likewise.
(byte_get_little_endian): Likewise.
(byte_get_big_endian): Likewise.
(error): Likewise.
(warn): Likewise.
* elfedit.c: Include "elfcomm.h". Don't include "aout/ar.h".
Call error () instead of non_fatal ().
(streq): Removed.
(strneq): Likewise.
(const_strneq): Likewise.
(non_fatal): Likewise.
(BYTE_GET): Likewise.
(BYTE_PUT): Likewise.
(byte_get): Likewise.
(byte_put): Likewise.
(byte_get_little_endian): Likewise.
(byte_get_big_endian): Likewise.
(byte_put_little_endian): Likewise.
(byte_put_big_endian): Likewise.
(adjust_relative_path): Likewise.
(archive_info): Likewise.
(setup_archive): Likewise.
(release_archive): Likewise.
(setup_nested_archive): Likewise.
(get_archive_member_name): Likewise.
(get_archive_member_name_at): Likewise.
(make_qualified_name): Likewise.
* objdump.c: Include "elfcomm.h".
* readelf.c: Include "elfcomm.h". Don't include "aout/ar.h".
(BYTE_GET): Removed.
(BYTE_GET_SIGNED): Removed.
(streq): Likewise.
(strneq): Likewise.
(const_strneq): Likewise.
(byte_put): Likewise.
(byte_put_little_endian): Likewise.
(byte_put_big_endian): Likewise.
(adjust_relative_path): Likewise.
(archive_info): Likewise.
(setup_archive): Likewise.
(release_archive): Likewise.
(setup_nested_archive): Likewise.
(get_archive_member_name): Likewise.
(get_archive_member_name_at): Likewise.
(make_qualified_name): Likewise.
Diffstat (limited to 'binutils/dwarf.h')
-rw-r--r-- | binutils/dwarf.h | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/binutils/dwarf.h b/binutils/dwarf.h index 1c47c5e..e9de463 100644 --- a/binutils/dwarf.h +++ b/binutils/dwarf.h @@ -19,15 +19,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) -/* We can't use any bfd types here since readelf may define BFD64 and - objdump may not. */ -typedef unsigned long long dwarf_vma; -typedef unsigned long long dwarf_size_type; -#else -typedef unsigned long dwarf_vma; -typedef unsigned long dwarf_size_type; -#endif +typedef unsigned HOST_WIDEST_INT dwarf_vma; +typedef unsigned HOST_WIDEST_INT dwarf_size_type; struct dwarf_section { @@ -100,11 +93,6 @@ typedef struct } debug_info; -extern dwarf_vma (*byte_get) (unsigned char *, int); -extern dwarf_vma byte_get_signed (unsigned char *, int); -extern dwarf_vma byte_get_little_endian (unsigned char *, int); -extern dwarf_vma byte_get_big_endian (unsigned char *, int); - extern int eh_addr_size; extern int do_debug_info; @@ -142,8 +130,5 @@ void *cmalloc (size_t, size_t); void *xcmalloc (size_t, size_t); void *xcrealloc (void *, size_t, size_t); -void error (const char *, ...) ATTRIBUTE_PRINTF_1; -void warn (const char *, ...) ATTRIBUTE_PRINTF_1; - unsigned long int read_leb128 (unsigned char *data, unsigned int *length_return, int sign); |