aboutsummaryrefslogtreecommitdiff
path: root/gas/dwarf2dbg.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2002-12-25 21:20:31 +0000
committerAlexandre Oliva <aoliva@redhat.com>2002-12-25 21:20:31 +0000
commit9605f328cd91016a1f55928b8b67419eb050e771 (patch)
treeed558c78614b16d0a9211bba60a86514bc84d058 /gas/dwarf2dbg.c
parentc4e54c2a3ceaad2a0f5550ff2d28f2be1dbfbaa1 (diff)
downloadfsf-binutils-gdb-9605f328cd91016a1f55928b8b67419eb050e771.zip
fsf-binutils-gdb-9605f328cd91016a1f55928b8b67419eb050e771.tar.gz
fsf-binutils-gdb-9605f328cd91016a1f55928b8b67419eb050e771.tar.bz2
* dwarf2dbg.c (DWARF2_ADDR_SIZE): New macro.
(dwarf2_finish): Use it. * doc/internals.texi (DWARF2_ADDR_SIZE): Document it. * config/tc-mips.h (DWARF2_ADDR_SIZE): Override.
Diffstat (limited to 'gas/dwarf2dbg.c')
-rw-r--r--gas/dwarf2dbg.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c
index 0d5c072..db6e0f0 100644
--- a/gas/dwarf2dbg.c
+++ b/gas/dwarf2dbg.c
@@ -44,9 +44,14 @@
#include "dwarf2dbg.h"
#ifndef DWARF2_FORMAT
-#define DWARF2_FORMAT() dwarf2_format_32bit
+# define DWARF2_FORMAT() dwarf2_format_32bit
#endif
+#ifndef DWARF2_ADDR_SIZE
+# define DWARF2_ADDR_SIZE(bfd) (bfd_arch_bits_per_address (bfd) / 8);
+#endif
+
+
#ifdef BFD_ASSEMBLER
#include "subsegs.h"
@@ -1341,7 +1346,7 @@ dwarf2_finish ()
return;
/* Calculate the size of an address for the target machine. */
- sizeof_address = bfd_arch_bits_per_address (stdoutput) / 8;
+ sizeof_address = DWARF2_ADDR_SIZE (stdoutput);
/* Create and switch to the line number section. */
line_seg = subseg_new (".debug_line", 0);