public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Make the compiler do the math 2.
@ 2006-09-11 21:03 Pedro Alves
  2006-09-12 11:27 ` Pedro Alves
  0 siblings, 1 reply; 24+ messages in thread
From: Pedro Alves @ 2006-09-11 21:03 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

Hi all,

Same idea as my previous post (1), but applied to a file that
has just until very recently a str/strlen pair bug, fixed by H.J.LU.

Please review and commit.

(1) http://sourceware.org/ml/binutils/2006-09/msg00076.html

Cheers,
Pedro Alves

---

bfd/ChangeLog

2006-09-11  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.


[-- Attachment #2: elf.c.diff --]
[-- Type: text/plain, Size: 1519 bytes --]

--- elf.c.org	2006-09-11 21:17:02.000000000 +0100
+++ elf.c	2006-09-11 21:25:18.000000000 +0100
@@ -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(0),                     /* 'e' */
+	  DSECT(0),                     /* '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] == '.')

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2006-09-28 13:00 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-11 21:03 [PATCH] Make the compiler do the math 2 Pedro Alves
2006-09-12 11:27 ` Pedro Alves
2006-09-16 18:16   ` Nick Clifton
2006-09-17  3:39     ` Regression with strn-stuff (was: Re: [PATCH] Make the compiler do the math 2.) Hans-Peter Nilsson
2006-09-17 14:41       ` Regression with strn-stuff Nick Clifton
2006-09-17 18:58         ` Pedro Alves
2006-09-17 19:17           ` Hans-Peter Nilsson
2006-09-17 22:20             ` [PATCH]: " Pedro Alves
2006-09-19 10:37               ` Pedro Alves
2006-09-25 16:14                 ` Nick Clifton
2006-09-25 16:19                 ` Andreas Schwab
2006-09-17 19:08         ` Hans-Peter Nilsson
2006-09-25 16:09           ` Nick Clifton
2006-09-25 14:01     ` [PATCH] Make the compiler do the math 2 Andreas Schwab
2006-09-25 17:14       ` Nick Clifton
2006-09-25 19:37         ` Andreas Schwab
2006-09-25 20:38       ` Hans-Peter Nilsson
2006-09-25 22:23         ` Andreas Schwab
2006-09-26  8:49           ` Nick Clifton
2006-09-26 10:17           ` Nick Clifton
2006-09-26 10:30             ` Andreas Schwab
2006-09-26 12:38             ` Pedro Alves
2006-09-25 23:53         ` Pedro Alves
2006-09-28 13:25           ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).