public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: binutils@sourceware.org
Cc: toolchain-devel@blackfin.uclinux.org
Subject: [PATCH] bfd: constify a few arrays
Date: Wed, 27 Apr 2011 22:55:00 -0000	[thread overview]
Message-ID: <1303944895-1069-1-git-send-email-vapier@gentoo.org> (raw)

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

2011-04-27  Mike Frysinger  <vapier@gentoo.org>

	* dwarf2.c (dwarf_debug_sections): Mark const.
	* elf.c (special_sections): Likewise.
	* libbfd-in.h (dwarf_debug_sections): Likewise.
	* libbfd.h: Regenerate.
---
 bfd/dwarf2.c    |    2 +-
 bfd/elf.c       |    2 +-
 bfd/libbfd-in.h |    2 +-
 bfd/libbfd.h    |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 3db2395..02e69a8 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -278,7 +278,7 @@ struct attr_abbrev
 /* Map of uncompressed DWARF debug section name to compressed one.  It
    is terminated by NULL uncompressed_name.  */
 
-struct dwarf_debug_section dwarf_debug_sections[] =
+const struct dwarf_debug_section dwarf_debug_sections[] =
 {
   { ".debug_abbrev",		".zdebug_abbrev" },
   { ".debug_aranges",		".zdebug_aranges" },
diff --git a/bfd/elf.c b/bfd/elf.c
index 71de844..b5a1952 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2164,7 +2164,7 @@ static const struct bfd_elf_special_section special_sections_z[] =
   { NULL,                     0,  0, 0,            0 }
 };
 
-static const struct bfd_elf_special_section *special_sections[] =
+static const struct bfd_elf_special_section * const special_sections[] =
 {
   special_sections_b,		/* 'b' */
   special_sections_c,		/* 'c' */
diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
index b7201bd..ad45ba3 100644
--- a/bfd/libbfd-in.h
+++ b/bfd/libbfd-in.h
@@ -817,4 +817,4 @@ struct dwarf_debug_section
 /* Map of uncompressed DWARF debug section name to compressed one.  It
    is terminated by NULL uncompressed_name.  */
 
-extern struct dwarf_debug_section dwarf_debug_sections[];
+extern const struct dwarf_debug_section dwarf_debug_sections[];
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 2e7df4f..90737df 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -822,7 +822,7 @@ struct dwarf_debug_section
 /* Map of uncompressed DWARF debug section name to compressed one.  It
    is terminated by NULL uncompressed_name.  */
 
-extern struct dwarf_debug_section dwarf_debug_sections[];
+extern const struct dwarf_debug_section dwarf_debug_sections[];
 /* Extracted from init.c.  */
 /* Extracted from libbfd.c.  */
 bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
-- 
1.7.5.rc3

             reply	other threads:[~2011-04-27 22:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 22:55 Mike Frysinger [this message]
2011-04-28  0:28 ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1303944895-1069-1-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=binutils@sourceware.org \
    --cc=toolchain-devel@blackfin.uclinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).