aboutsummaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-09-08 10:34:27 +0000
committerAlan Modra <amodra@gmail.com>2009-09-08 10:34:27 +0000
commit4dc3c23df4601114765f755fac6867f82844bc4d (patch)
tree93aaef4b9c22529c46d3fe9fde14a2756c5814be /binutils/dwarf.c
parent8a7e4aa01276c840311b72c0b5c45bd703d3a1a2 (diff)
downloadgdb-4dc3c23df4601114765f755fac6867f82844bc4d.zip
gdb-4dc3c23df4601114765f755fac6867f82844bc4d.tar.gz
gdb-4dc3c23df4601114765f755fac6867f82844bc4d.tar.bz2
* dwarf.c (byte_get_little_endian): Handle size of 3.
(byte_get_big_endian): Likewise. * readelf.c (byte_put_little_endian): Likewise. (byte_put_big_endian): Likewise. (is_24bit_abs_reloc): New function. (is_none_reloc): Formatting. (apply_relocations): Use is_24bit_abs_reloc. Handle pj and xtensa reloc peculiarity.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r--binutils/dwarf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 46b6929..6c9a1a6 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -72,6 +72,11 @@ byte_get_little_endian (unsigned char *field, int size)
return ((unsigned int) (field[0]))
| (((unsigned int) (field[1])) << 8);
+ case 3:
+ return ((unsigned long) (field[0]))
+ | (((unsigned long) (field[1])) << 8)
+ | (((unsigned long) (field[2])) << 16);
+
case 4:
return ((unsigned long) (field[0]))
| (((unsigned long) (field[1])) << 8)
@@ -114,6 +119,11 @@ byte_get_big_endian (unsigned char *field, int size)
case 2:
return ((unsigned int) (field[1])) | (((int) (field[0])) << 8);
+ case 3:
+ return ((unsigned long) (field[2]))
+ | (((unsigned long) (field[1])) << 8)
+ | (((unsigned long) (field[0])) << 16);
+
case 4:
return ((unsigned long) (field[3]))
| (((unsigned long) (field[2])) << 8)