summaryrefslogtreecommitdiff
path: root/binutils/elfcomm.c
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2012-02-15 18:32:30 +0000
committerCary Coutant <ccoutant@google.com>2012-02-15 18:32:30 +0000
commit74bc605283c5673b8742d3d60804d68d933b56e6 (patch)
treed3abff3108eae3fddb1b803edbf925abe0456669 /binutils/elfcomm.c
parent10010058f222196d4dbc3866f33fbaf0bb5de3e2 (diff)
downloadbinutils-gdb-74bc605283c5673b8742d3d60804d68d933b56e6.tar.gz
* dwarf.c (dwarf_vmatoa64): New function.
(read_and_display_attr_value): Print 8-byte forms as single hex numbers. (process_debug_info): Print type signatures as single hex numbers. * elfcomm.c (byte_get_64): New function. * elfcomm.h (byte_get_64): New function.
Diffstat (limited to 'binutils/elfcomm.c')
-rw-r--r--binutils/elfcomm.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/binutils/elfcomm.c b/binutils/elfcomm.c
index e44dee8348e..4224f8235ed 100644
--- a/binutils/elfcomm.c
+++ b/binutils/elfcomm.c
@@ -238,6 +238,25 @@ byte_get_signed (unsigned char *field, int size)
}
}
+/* Return the high-order 32-bits and the low-order 32-bits
+ of an 8-byte value separately. */
+
+void
+byte_get_64 (unsigned char *field, elf_vma *high, elf_vma *low)
+{
+ if (byte_get == byte_get_big_endian)
+ {
+ *high = byte_get_big_endian (field, 4);
+ *low = byte_get_big_endian (field + 4, 4);
+ }
+ else
+ {
+ *high = byte_get_little_endian (field + 4, 4);
+ *low = byte_get_little_endian (field, 4);
+ }
+ return;
+}
+
/* Return the path name for a proxy entry in a thin archive, adjusted
relative to the path name of the thin archive itself if necessary.
Always returns a pointer to malloc'ed memory. */