This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Patch: Remove BFD_ASSEMBLER checking in dwarf2dbg.c.
On Wed, Dec 13, 2000 at 06:37:21PM -0800, Richard Henderson wrote:
> On Mon, Dec 11, 2000 at 02:03:56PM -0800, H . J . Lu wrote:
> > +#ifdef BFD_ASSEMBLER
>
> You should probably also go through that code and eliminate
> the now-redundant checks for BFD_ASSEMBLER. There aren't many.
>
>
Here is the patch.
--
H.J. Lu (hjl@valinux.com)
---
2000-12-21 H.J. Lu <hjl@gnu.org>
* dwarf2dbg.c (dwarf2_finish): Remove #if BFD_ASSEMBLER.
Index: dwarf2dbg.c
===================================================================
RCS file: /work/cvs/gnu/binutils/gas/dwarf2dbg.c,v
retrieving revision 1.17
diff -u -p -r1.17 dwarf2dbg.c
--- dwarf2dbg.c 2000/12/22 00:47:46 1.17
+++ dwarf2dbg.c 2000/12/22 00:48:34
@@ -1197,18 +1197,11 @@ dwarf2_finish ()
return;
/* Calculate the size of an address for the target machine. */
-#ifdef BFD_ASSEMBLER
sizeof_address = bfd_arch_bits_per_address (stdoutput) / 8;
-#else
- /* FIXME. */
- sizeof_address = 4;
-#endif
/* Create and switch to the line number section. */
line_seg = subseg_new (".debug_line", 0);
-#ifdef BFD_ASSEMBLER
bfd_set_section_flags (stdoutput, line_seg, SEC_READONLY);
-#endif
/* For each subsection, chain the debug entries together. */
for (s = all_segs; s; s = s->next)
@@ -1237,11 +1230,9 @@ dwarf2_finish ()
abbrev_seg = subseg_new (".debug_abbrev", 0);
aranges_seg = subseg_new (".debug_aranges", 0);
-#ifdef BFD_ASSEMBLER
bfd_set_section_flags (stdoutput, info_seg, SEC_READONLY);
bfd_set_section_flags (stdoutput, abbrev_seg, SEC_READONLY);
bfd_set_section_flags (stdoutput, aranges_seg, SEC_READONLY);
-#endif
record_alignment (aranges_seg, ffs (2 * sizeof_address) - 1);