This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Make the compiler do the math 2.
- From: Pedro Alves <pedro_alves at portugalmail dot pt>
- To: binutils at sourceware dot org
- Date: Tue, 12 Sep 2006 12:28:59 +0100
- Subject: Re: [PATCH] Make the compiler do the math 2.
- References: <4505CF00.6060805@portugalmail.pt>
Same patch with the formatting inline with GNU standards.
Sorry again for the noise.
Please review and commit.
Cheers,
Pedro Alves
---
bfd/ChangeLog
2006-09-12 Pedro Alves <pedro_alves@portugalmail.pt>
* elf.c (_bfd_elf_make_section_from_shdr): New macro DSECT.
(_bfd_elf_make_section_from_shdr, debug_sections): Use DSECT.
--- elf.c.org 2006-09-12 07:12:05.000000000 -0400
+++ elf.c 2006-09-12 07:17:57.000000000 -0400
@@ -816,22 +816,24 @@ _bfd_elf_make_section_from_shdr (bfd *ab
int len;
} debug_sections [] =
{
- { "debug", 5 }, /* 'd' */
- { NULL, 0 }, /* 'e' */
- { NULL, 0 }, /* 'f' */
- { "gnu.linkonce.wi.", 16 }, /* 'g' */
- { NULL, 0 }, /* 'h' */
- { NULL, 0 }, /* 'i' */
- { NULL, 0 }, /* 'j' */
- { NULL, 0 }, /* 'k' */
- { "line", 4 }, /* 'l' */
- { NULL, 0 }, /* 'm' */
- { NULL, 0 }, /* 'n' */
- { NULL, 0 }, /* 'o' */
- { NULL, 0 }, /* 'p' */
- { NULL, 0 }, /* 'q' */
- { NULL, 0 }, /* 'r' */
- { "stab", 4 } /* 's' */
+#define DSECT(STR) { (STR), ((STR) ? sizeof (STR) - 1 : 0) }
+ DSECT ("debug"), /* 'd' */
+ DSECT (NULL), /* 'e' */
+ DSECT (NULL), /* 'f' */
+ DSECT ("gnu.linkonce.wi."), /* 'g' */
+ DSECT (NULL), /* 'h' */
+ DSECT (NULL), /* 'i' */
+ DSECT (NULL), /* 'j' */
+ DSECT (NULL), /* 'k' */
+ DSECT ("line"), /* 'l' */
+ DSECT (NULL), /* 'm' */
+ DSECT (NULL), /* 'n' */
+ DSECT (NULL), /* 'o' */
+ DSECT (NULL), /* 'p' */
+ DSECT (NULL), /* 'q' */
+ DSECT (NULL), /* 'r' */
+ DSECT ("stab") /* 's' */
+#undef DSECT
};
if (name [0] == '.')