[rfa] make bfd_set_section_contents buffer param constant
Alan Modra
amodra@bigpond.net.au
Tue Nov 4 10:40:00 GMT 2003
On Sat, Nov 01, 2003 at 12:27:05PM +1030, Alan Modra wrote:
> On Fri, Oct 31, 2003 at 12:22:10PM -0500, Andrew Cagney wrote:
> > * section.c (bfd_set_section_contents): Make the "location" buffer
> > constant.
> > * bfd-in2.h: Re-generate.
>
> OK.
Andrew's patch introduced a warning
bfd/section.c:1210: warning: passing arg 3 of pointer to function discards
qualifiers from pointer target type.
Fixing that one trickled down to the following.
* aout-adobe.c (aout_adobe_set_section_contents): Constify location.
* aoutx.h (NAME(aout,set_section_contents)): Ditto.
* bfd-in2.h: Regenerate.
* binary.c (binary_set_section_contents): Ditto.
* bout.c (b_out_set_section_contents): Ditto.
* coff-tic54x.c (tic54x_set_section_contents): Ditto.
* coffcode.h (coff_set_section_contents): Ditto.
* ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
* elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
* elf.c (_bfd_elf_set_section_contents): Ditto.
* elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
* elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
* i386msdos.c (msdos_set_section_contents): Ditto.
* ieee.c (ieee_set_section_contents): Ditto.
* ihex.c (ihex_set_section_contents): Ditto.
* libaout.h (NAME(aout,set_section_contents)): Ditto.
* libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
(_bfd_generic_set_section_contents): Ditto.
* libbfd.h: Regenerate.
* libbfd.c (_bfd_generic_set_section_contents): Ditto.
* libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
* libnlm.h (nlmNAME(set_section_contents)): Ditto.
(struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
* mmo.c (mmo_set_section_contents): Ditto.
* nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
* nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
* nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
* nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
* nlmcode.h (nlm_set_section_contents): Ditto.
* oasys.c (oasys_set_section_contents): Ditto.
* pdp11.c (NAME(aout,set_section_contents)): Ditto.
* ppcboot.c (ppcboot_set_section_contents): Ditto.
* srec.c (srec_set_section_contents): Ditto.
* targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
* tekhex.c (tekhex_set_section_contents): Ditto.
(move_section_contents): Ditto.
* versados.c (versados_set_section_contents): Ditto.
* vms-misc.c (_bfd_save_vms_section): Ditto.
* vms.c (vms_set_section_contents): Ditto.
* vms.h (_bfd_save_vms_section): Ditto.
Index: bfd/aout-adobe.c
===================================================================
RCS file: /cvs/src/src/bfd/aout-adobe.c,v
retrieving revision 1.16
diff -u -p -r1.16 aout-adobe.c
--- bfd/aout-adobe.c 30 Nov 2002 08:39:34 -0000 1.16
+++ bfd/aout-adobe.c 4 Nov 2003 10:02:18 -0000
@@ -47,7 +47,7 @@ static bfd_boolean aout_adobe_mkobject
static bfd_boolean aout_adobe_write_object_contents
PARAMS ((bfd *));
static bfd_boolean aout_adobe_set_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
static bfd_boolean aout_adobe_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
static int aout_adobe_sizeof_headers
@@ -415,7 +415,7 @@ static bfd_boolean
aout_adobe_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
Index: bfd/aoutx.h
===================================================================
RCS file: /cvs/src/src/bfd/aoutx.h,v
retrieving revision 1.43
diff -u -p -r1.43 aoutx.h
--- bfd/aoutx.h 16 Oct 2003 04:11:04 -0000 1.43
+++ bfd/aoutx.h 4 Nov 2003 10:02:22 -0000
@@ -1265,7 +1265,7 @@ bfd_boolean
NAME(aout,set_section_contents) (abfd, section, location, offset, count)
bfd *abfd;
sec_ptr section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
Index: bfd/binary.c
===================================================================
RCS file: /cvs/src/src/bfd/binary.c,v
retrieving revision 1.19
diff -u -p -r1.19 binary.c
--- bfd/binary.c 21 Oct 2003 14:08:12 -0000 1.19
+++ bfd/binary.c 4 Nov 2003 10:02:27 -0000
@@ -51,7 +51,7 @@ static char *mangle_name PARAMS ((bfd *,
static long binary_canonicalize_symtab PARAMS ((bfd *, asymbol **));
static void binary_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
static bfd_boolean binary_set_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
static int binary_sizeof_headers PARAMS ((bfd *, bfd_boolean));
/* Set by external programs - specifies the BFD architecture and
@@ -257,7 +257,7 @@ static bfd_boolean
binary_set_section_contents (abfd, sec, data, offset, size)
bfd *abfd;
asection *sec;
- PTR data;
+ const PTR data;
file_ptr offset;
bfd_size_type size;
{
Index: bfd/bout.c
===================================================================
RCS file: /cvs/src/src/bfd/bout.c,v
retrieving revision 1.17
diff -u -p -r1.17 bout.c
--- bfd/bout.c 25 Jun 2003 06:40:18 -0000 1.17
+++ bfd/bout.c 4 Nov 2003 10:02:28 -0000
@@ -61,7 +61,7 @@ static int b_out_sizeof_headers
static bfd_boolean b_out_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
static bfd_boolean b_out_set_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
static long b_out_get_reloc_upper_bound
PARAMS ((bfd *, sec_ptr));
static long b_out_canonicalize_reloc
@@ -983,7 +983,7 @@ static bfd_boolean
b_out_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
Index: bfd/coff-tic54x.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-tic54x.c,v
retrieving revision 1.13
diff -u -p -r1.13 coff-tic54x.c
--- bfd/coff-tic54x.c 4 Jun 2003 11:38:30 -0000 1.13
+++ bfd/coff-tic54x.c 4 Nov 2003 10:02:28 -0000
@@ -35,7 +35,7 @@ static void tic54x_reloc_processing
static bfd_reloc_status_type tic54x_relocation
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_boolean tic54x_set_section_contents
- PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, sec_ptr, const PTR, file_ptr, bfd_size_type));
static reloc_howto_type *coff_tic54x_rtype_to_howto
PARAMS ((bfd *, asection *, struct internal_reloc *, struct coff_link_hash_entry *, struct internal_syment *, bfd_vma *));
static bfd_vma tic54x_getl32
@@ -345,7 +345,7 @@ static bfd_boolean
tic54x_set_section_contents (abfd, section, location, offset, bytes_to_do)
bfd *abfd;
sec_ptr section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type bytes_to_do;
{
Index: bfd/coffcode.h
===================================================================
RCS file: /cvs/src/src/bfd/coffcode.h,v
retrieving revision 1.96
diff -u -p -r1.96 coffcode.h
--- bfd/coffcode.h 7 Oct 2003 08:49:11 -0000 1.96
+++ bfd/coffcode.h 4 Nov 2003 10:02:29 -0000
@@ -333,7 +333,7 @@ static bfd_boolean coff_compute_section_
static bfd_boolean coff_write_object_contents
PARAMS ((bfd *)) ATTRIBUTE_UNUSED;
static bfd_boolean coff_set_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
static PTR buy_and_read
PARAMS ((bfd *, file_ptr, bfd_size_type));
static bfd_boolean coff_slurp_line_table
@@ -4271,7 +4271,7 @@ static bfd_boolean
coff_set_section_contents (abfd, section, location, offset, count)
bfd * abfd;
sec_ptr section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
Index: bfd/ecoff.c
===================================================================
RCS file: /cvs/src/src/bfd/ecoff.c,v
retrieving revision 1.29
diff -u -p -r1.29 ecoff.c
--- bfd/ecoff.c 31 Oct 2003 05:32:45 -0000 1.29
+++ bfd/ecoff.c 4 Nov 2003 10:02:35 -0000
@@ -2262,7 +2262,7 @@ bfd_boolean
_bfd_ecoff_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
Index: bfd/elf-bfd.h
===================================================================
RCS file: /cvs/src/src/bfd/elf-bfd.h,v
retrieving revision 1.117
diff -u -p -r1.117 elf-bfd.h
--- bfd/elf-bfd.h 4 Nov 2003 06:16:33 -0000 1.117
+++ bfd/elf-bfd.h 4 Nov 2003 10:02:36 -0000
@@ -1348,7 +1348,7 @@ extern bfd_boolean _bfd_elf_write_object
extern bfd_boolean _bfd_elf_write_corefile_contents
(bfd *);
extern bfd_boolean _bfd_elf_set_section_contents
- (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
+ (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
extern long _bfd_elf_get_symtab_upper_bound
(bfd *);
extern long _bfd_elf_canonicalize_symtab
Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.206
diff -u -p -r1.206 elf.c
--- bfd/elf.c 4 Nov 2003 06:16:33 -0000 1.206
+++ bfd/elf.c 4 Nov 2003 10:02:43 -0000
@@ -6096,7 +6096,7 @@ _bfd_elf_sizeof_headers (bfd *abfd, bfd_
bfd_boolean
_bfd_elf_set_section_contents (bfd *abfd,
sec_ptr section,
- void *location,
+ const void *location,
file_ptr offset,
bfd_size_type count)
{
Index: bfd/elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.79
diff -u -p -r1.79 elfxx-mips.c
--- bfd/elfxx-mips.c 24 Oct 2003 15:18:29 -0000 1.79
+++ bfd/elfxx-mips.c 4 Nov 2003 10:02:51 -0000
@@ -7913,7 +7913,7 @@ bfd_boolean
_bfd_mips_elf_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
sec_ptr section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
Index: bfd/elfxx-mips.h
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.h,v
retrieving revision 1.12
diff -u -p -r1.12 elfxx-mips.h
--- bfd/elfxx-mips.h 7 Aug 2003 08:38:10 -0000 1.12
+++ bfd/elfxx-mips.h 4 Nov 2003 10:02:51 -0000
@@ -80,7 +80,7 @@ extern bfd_boolean _bfd_mips_elf_find_ne
PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
const char **, unsigned int *));
extern bfd_boolean _bfd_mips_elf_set_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
extern bfd_byte *_bfd_elf_mips_get_relocated_section_contents
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
bfd_byte *, bfd_boolean, asymbol **));
Index: bfd/i386msdos.c
===================================================================
RCS file: /cvs/src/src/bfd/i386msdos.c,v
retrieving revision 1.12
diff -u -p -r1.12 i386msdos.c
--- bfd/i386msdos.c 16 Oct 2003 04:11:06 -0000 1.12
+++ bfd/i386msdos.c 4 Nov 2003 10:02:51 -0000
@@ -61,7 +61,7 @@ static int msdos_sizeof_headers
static bfd_boolean msdos_write_object_contents
PARAMS ((bfd *));
static bfd_boolean msdos_set_section_contents
- PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, sec_ptr, const PTR, file_ptr, bfd_size_type));
static int
msdos_sizeof_headers (abfd, exec)
@@ -139,7 +139,7 @@ static bfd_boolean
msdos_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
sec_ptr section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
Index: bfd/ieee.c
===================================================================
RCS file: /cvs/src/src/bfd/ieee.c,v
retrieving revision 1.34
diff -u -p -r1.34 ieee.c
--- bfd/ieee.c 21 Oct 2003 13:28:58 -0000 1.34
+++ bfd/ieee.c 4 Nov 2003 10:02:53 -0000
@@ -160,7 +160,7 @@ static bfd_boolean ieee_write_data_part
static bfd_boolean init_for_output
PARAMS ((bfd *));
static bfd_boolean ieee_set_section_contents
- PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, sec_ptr, const PTR, file_ptr, bfd_size_type));
static bfd_boolean ieee_write_external_part
PARAMS ((bfd *));
static bfd_boolean ieee_write_me_part
@@ -3440,7 +3440,7 @@ static bfd_boolean
ieee_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
sec_ptr section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
Index: bfd/ihex.c
===================================================================
RCS file: /cvs/src/src/bfd/ihex.c,v
retrieving revision 1.19
diff -u -p -r1.19 ihex.c
--- bfd/ihex.c 16 Oct 2003 04:11:06 -0000 1.19
+++ bfd/ihex.c 4 Nov 2003 10:02:53 -0000
@@ -142,7 +142,7 @@ static bfd_boolean ihex_read_section
static bfd_boolean ihex_get_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static bfd_boolean ihex_set_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
static bfd_boolean ihex_write_record
PARAMS ((bfd *, size_t, unsigned int, unsigned int, bfd_byte *));
static bfd_boolean ihex_write_object_contents
@@ -699,7 +699,7 @@ static bfd_boolean
ihex_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
Index: bfd/libaout.h
===================================================================
RCS file: /cvs/src/src/bfd/libaout.h,v
retrieving revision 1.11
diff -u -p -r1.11 libaout.h
--- bfd/libaout.h 16 Oct 2003 04:11:06 -0000 1.11
+++ bfd/libaout.h 4 Nov 2003 10:02:54 -0000
@@ -513,7 +513,7 @@ extern bfd_boolean NAME(aout,new_section
PARAMS ((bfd *, asection *));
extern bfd_boolean NAME(aout,set_section_contents)
- PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, sec_ptr, const PTR, file_ptr, bfd_size_type));
extern asymbol * NAME(aout,make_empty_symbol)
PARAMS ((bfd *));
Index: bfd/libbfd-in.h
===================================================================
RCS file: /cvs/src/src/bfd/libbfd-in.h,v
retrieving revision 1.29
diff -u -p -r1.29 libbfd-in.h
--- bfd/libbfd-in.h 20 Oct 2003 14:38:39 -0000 1.29
+++ bfd/libbfd-in.h 4 Nov 2003 10:02:54 -0000
@@ -326,7 +326,7 @@ extern bfd_boolean _bfd_archive_coff_con
((bfd_boolean (*) (bfd *, enum bfd_architecture, unsigned long)) \
bfd_false)
#define _bfd_nowrite_set_section_contents \
- ((bfd_boolean (*) (bfd *, asection *, void *, file_ptr, bfd_size_type)) \
+ ((bfd_boolean (*) (bfd *, asection *, const void *, file_ptr, bfd_size_type)) \
bfd_false)
/* Generic routines to use for BFD_JUMP_TABLE_WRITE. Use
@@ -334,7 +334,7 @@ extern bfd_boolean _bfd_archive_coff_con
#define _bfd_generic_set_arch_mach bfd_default_set_arch_mach
extern bfd_boolean _bfd_generic_set_section_contents
- (bfd *, asection *, void *, file_ptr, bfd_size_type);
+ (bfd *, asection *, const void *, file_ptr, bfd_size_type);
/* Routines to use for BFD_JUMP_TABLE_LINK for targets which do not
support linking. Use BFD_JUMP_TABLE_LINK (_bfd_nolink). */
Index: bfd/libbfd.c
===================================================================
RCS file: /cvs/src/src/bfd/libbfd.c,v
retrieving revision 1.28
diff -u -p -r1.28 libbfd.c
--- bfd/libbfd.c 29 Jun 2003 10:06:39 -0000 1.28
+++ bfd/libbfd.c 4 Nov 2003 10:02:55 -0000
@@ -771,7 +771,7 @@ _bfd_generic_get_section_contents_in_win
bfd_boolean
_bfd_generic_set_section_contents (bfd *abfd,
sec_ptr section,
- void *location,
+ const void *location,
file_ptr offset,
bfd_size_type count)
{
Index: bfd/libecoff.h
===================================================================
RCS file: /cvs/src/src/bfd/libecoff.h,v
retrieving revision 1.13
diff -u -p -r1.13 libecoff.h
--- bfd/libecoff.h 16 Oct 2003 04:11:07 -0000 1.13
+++ bfd/libecoff.h 4 Nov 2003 10:02:56 -0000
@@ -324,7 +324,7 @@ extern long _bfd_ecoff_canonicalize_relo
extern bfd_boolean _bfd_ecoff_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
extern bfd_boolean _bfd_ecoff_set_section_contents
- PARAMS ((bfd *, asection *, PTR location, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR location, file_ptr, bfd_size_type));
extern int _bfd_ecoff_sizeof_headers PARAMS ((bfd *abfd, bfd_boolean reloc));
/* ecoff_bfd_get_relocated_section_contents defined by backend. */
Index: bfd/libnlm.h
===================================================================
RCS file: /cvs/src/src/bfd/libnlm.h,v
retrieving revision 1.5
diff -u -p -r1.5 libnlm.h
--- bfd/libnlm.h 16 Oct 2003 04:11:07 -0000 1.5
+++ bfd/libnlm.h 4 Nov 2003 10:02:56 -0000
@@ -76,7 +76,7 @@ extern const bfd_target *nlmNAME(object_
extern bfd_boolean nlmNAME(set_arch_mach)
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
extern bfd_boolean nlmNAME(set_section_contents)
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
extern bfd_boolean nlmNAME(write_object_contents)
PARAMS ((bfd *));
@@ -188,7 +188,8 @@ struct nlm_backend_data
/* To make objcopy to an i386 NLM work, the i386 backend needs a
chance to work over the relocs. This is a bit icky. */
bfd_boolean (*nlm_mangle_relocs)
- PARAMS ((bfd *, asection *, PTR data, bfd_vma offset, bfd_size_type count));
+ PARAMS ((bfd *, asection *, const PTR data, bfd_vma offset,
+ bfd_size_type count));
/* Read an import record from abfd. It would be nice if this
were in a machine-dependent format, but it doesn't seem to be. */
bfd_boolean (*nlm_read_import) PARAMS ((bfd *, nlmNAME(symbol_type) *));
Index: bfd/mmo.c
===================================================================
RCS file: /cvs/src/src/bfd/mmo.c,v
retrieving revision 1.15
diff -u -p -r1.15 mmo.c
--- bfd/mmo.c 16 Oct 2003 04:11:07 -0000 1.15
+++ bfd/mmo.c 4 Nov 2003 10:02:58 -0000
@@ -408,7 +408,7 @@ static void mmo_get_symbol_info
static void mmo_print_symbol
PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type));
static bfd_boolean mmo_set_section_contents
- PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, sec_ptr, const PTR, file_ptr, bfd_size_type));
static int mmo_sizeof_headers
PARAMS ((bfd *, bfd_boolean));
static long mmo_get_reloc_upper_bound
@@ -2613,7 +2613,7 @@ static bfd_boolean
mmo_set_section_contents (abfd, sec, location, offset, bytes_to_do)
bfd *abfd ATTRIBUTE_UNUSED;
sec_ptr sec;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type bytes_to_do;
{
Index: bfd/nlm32-alpha.c
===================================================================
RCS file: /cvs/src/src/bfd/nlm32-alpha.c,v
retrieving revision 1.8
diff -u -p -r1.8 nlm32-alpha.c
--- bfd/nlm32-alpha.c 30 Nov 2002 08:39:40 -0000 1.8
+++ bfd/nlm32-alpha.c 4 Nov 2003 10:02:58 -0000
@@ -40,7 +41,7 @@ static bfd_boolean nlm_alpha_write_prefi
static bfd_boolean nlm_alpha_read_reloc
PARAMS ((bfd *, nlmNAME(symbol_type) *, asection **, arelent *));
static bfd_boolean nlm_alpha_mangle_relocs
- PARAMS ((bfd *, asection *, PTR, bfd_vma, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, bfd_vma, bfd_size_type));
static bfd_boolean nlm_alpha_read_import
PARAMS ((bfd *, nlmNAME(symbol_type) *));
static bfd_boolean nlm_alpha_write_import
@@ -605,7 +606,7 @@ static bfd_boolean
nlm_alpha_mangle_relocs (abfd, sec, data, offset, count)
bfd *abfd ATTRIBUTE_UNUSED;
asection *sec ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
+ const PTR data ATTRIBUTE_UNUSED;
bfd_vma offset ATTRIBUTE_UNUSED;
bfd_size_type count ATTRIBUTE_UNUSED;
{
Index: bfd/nlm32-i386.c
===================================================================
RCS file: /cvs/src/src/bfd/nlm32-i386.c,v
retrieving revision 1.7
diff -u -p -r1.7 nlm32-i386.c
--- bfd/nlm32-i386.c 30 Nov 2002 08:39:40 -0000 1.7
+++ bfd/nlm32-i386.c 4 Nov 2003 10:02:59 -0000
@@ -33,7 +33,7 @@ static bfd_boolean nlm_i386_read_reloc
static bfd_boolean nlm_i386_write_import
PARAMS ((bfd *, asection *, arelent *));
static bfd_boolean nlm_i386_mangle_relocs
- PARAMS ((bfd *, asection *, PTR, bfd_vma, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, bfd_vma, bfd_size_type));
static bfd_boolean nlm_i386_read_import
PARAMS ((bfd *, nlmNAME(symbol_type) *));
static bfd_boolean nlm_i386_write_external
@@ -247,7 +247,7 @@ static bfd_boolean
nlm_i386_mangle_relocs (abfd, sec, data, offset, count)
bfd *abfd;
asection *sec;
- PTR data;
+ const PTR data;
bfd_vma offset;
bfd_size_type count;
{
Index: bfd/nlm32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/nlm32-ppc.c,v
retrieving revision 1.7
diff -u -p -r1.7 nlm32-ppc.c
--- bfd/nlm32-ppc.c 30 Nov 2002 08:39:40 -0000 1.7
+++ bfd/nlm32-ppc.c 4 Nov 2003 10:02:59 -0000
@@ -41,7 +42,7 @@ static bfd_boolean nlm_powerpc_write_pre
static bfd_boolean nlm_powerpc_read_reloc
PARAMS ((bfd *, nlmNAME(symbol_type) *, asection **, arelent *));
static bfd_boolean nlm_powerpc_mangle_relocs
- PARAMS ((bfd *, asection *, PTR, bfd_vma, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, bfd_vma, bfd_size_type));
static bfd_boolean nlm_powerpc_read_import
PARAMS ((bfd *, nlmNAME(symbol_type) *));
@@ -641,7 +642,7 @@ static bfd_boolean
nlm_powerpc_mangle_relocs (abfd, sec, data, offset, count)
bfd *abfd ATTRIBUTE_UNUSED;
asection *sec ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
+ const PTR data ATTRIBUTE_UNUSED;
bfd_vma offset ATTRIBUTE_UNUSED;
bfd_size_type count ATTRIBUTE_UNUSED;
{
Index: bfd/nlm32-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/nlm32-sparc.c,v
retrieving revision 1.8
diff -u -p -r1.8 nlm32-sparc.c
--- bfd/nlm32-sparc.c 30 Nov 2002 08:39:40 -0000 1.8
+++ bfd/nlm32-sparc.c 4 Nov 2003 10:02:59 -0000
@@ -33,7 +34,7 @@ static bfd_boolean nlm_sparc_read_reloc
static bfd_boolean nlm_sparc_write_reloc
PARAMS ((bfd *, asection *, arelent *));
static bfd_boolean nlm_sparc_mangle_relocs
- PARAMS ((bfd *, asection *, PTR, bfd_vma, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, bfd_vma, bfd_size_type));
static bfd_boolean nlm_sparc_read_import
PARAMS ((bfd *, nlmNAME(symbol_type) *));
static bfd_boolean nlm_sparc_write_import
@@ -237,7 +238,7 @@ static bfd_boolean
nlm_sparc_mangle_relocs (abfd, sec, data, offset, count)
bfd *abfd ATTRIBUTE_UNUSED;
asection *sec ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
+ const PTR data ATTRIBUTE_UNUSED;
bfd_vma offset ATTRIBUTE_UNUSED;
bfd_size_type count ATTRIBUTE_UNUSED;
{
Index: bfd/nlmcode.h
===================================================================
RCS file: /cvs/src/src/bfd/nlmcode.h,v
retrieving revision 1.10
diff -u -p -r1.10 nlmcode.h
--- bfd/nlmcode.h 16 Oct 2003 04:11:07 -0000 1.10
+++ bfd/nlmcode.h 4 Nov 2003 10:03:01 -0000
@@ -1568,7 +1568,7 @@ bfd_boolean
nlm_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
@@ -1586,7 +1586,7 @@ nlm_set_section_contents (abfd, section,
if (section->reloc_count != 0)
{
bfd_boolean (*mangle_relocs_func)
- PARAMS ((bfd *, asection *, PTR, bfd_vma, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, bfd_vma, bfd_size_type));
mangle_relocs_func = nlm_mangle_relocs_func (abfd);
if (mangle_relocs_func != NULL)
Index: bfd/oasys.c
===================================================================
RCS file: /cvs/src/src/bfd/oasys.c,v
retrieving revision 1.20
diff -u -p -r1.20 oasys.c
--- bfd/oasys.c 16 Oct 2003 04:11:07 -0000 1.20
+++ bfd/oasys.c 4 Nov 2003 10:03:01 -0000
@@ -70,7 +70,7 @@ static int comp
static bfd_boolean oasys_write_object_contents
PARAMS ((bfd *));
static bfd_boolean oasys_set_section_contents
- PARAMS ((bfd *, sec_ptr, void *, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, sec_ptr, const void *, file_ptr, bfd_size_type));
static asymbol *oasys_make_empty_symbol
PARAMS ((bfd *));
static bfd *oasys_openr_next_archived_file
@@ -1346,7 +1346,7 @@ static bfd_boolean
oasys_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
sec_ptr section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
Index: bfd/pdp11.c
===================================================================
RCS file: /cvs/src/src/bfd/pdp11.c,v
retrieving revision 1.18
diff -u -p -r1.18 pdp11.c
--- bfd/pdp11.c 16 Oct 2003 04:11:07 -0000 1.18
+++ bfd/pdp11.c 4 Nov 2003 10:03:04 -0000
@@ -1429,7 +1429,7 @@ bfd_boolean
NAME(aout,set_section_contents) (abfd, section, location, offset, count)
bfd *abfd;
sec_ptr section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
Index: bfd/ppcboot.c
===================================================================
RCS file: /cvs/src/src/bfd/ppcboot.c,v
retrieving revision 1.15
diff -u -p -r1.15 ppcboot.c
--- bfd/ppcboot.c 16 Oct 2003 04:11:07 -0000 1.15
+++ bfd/ppcboot.c 4 Nov 2003 10:03:04 -0000
@@ -98,7 +98,7 @@ static char *mangle_name PARAMS ((bfd *,
static long ppcboot_canonicalize_symtab PARAMS ((bfd *, asymbol **));
static void ppcboot_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
static bfd_boolean ppcboot_set_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
static int ppcboot_sizeof_headers PARAMS ((bfd *, bfd_boolean));
static bfd_boolean ppcboot_bfd_print_private_bfd_data PARAMS ((bfd *, PTR));
@@ -364,7 +364,7 @@ static bfd_boolean
ppcboot_set_section_contents (abfd, sec, data, offset, size)
bfd *abfd;
asection *sec;
- PTR data;
+ const PTR data;
file_ptr offset;
bfd_size_type size;
{
Index: bfd/srec.c
===================================================================
RCS file: /cvs/src/src/bfd/srec.c,v
retrieving revision 1.25
diff -u -p -r1.25 srec.c
--- bfd/srec.c 16 Oct 2003 04:11:08 -0000 1.25
+++ bfd/srec.c 4 Nov 2003 10:03:05 -0000
@@ -132,7 +132,7 @@ static bfd_boolean srec_get_section_cont
static bfd_boolean srec_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
static bfd_boolean srec_set_section_contents
- PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, sec_ptr, const PTR, file_ptr, bfd_size_type));
static bfd_boolean internal_srec_write_object_contents PARAMS ((bfd *, int));
static bfd_boolean srec_write_object_contents PARAMS ((bfd *));
static bfd_boolean symbolsrec_write_object_contents PARAMS ((bfd *));
@@ -872,7 +872,7 @@ static bfd_boolean
srec_set_section_contents (abfd, section, location, offset, bytes_to_do)
bfd *abfd;
sec_ptr section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type bytes_to_do;
{
Index: bfd/targets.c
===================================================================
RCS file: /cvs/src/src/bfd/targets.c,v
retrieving revision 1.100
diff -u -p -r1.100 targets.c
--- bfd/targets.c 31 Oct 2003 05:32:46 -0000 1.100
+++ bfd/targets.c 4 Nov 2003 10:03:06 -0000
@@ -391,7 +391,7 @@ BFD_JUMP_TABLE macros.
. bfd_boolean (*_bfd_set_arch_mach)
. (bfd *, enum bfd_architecture, unsigned long);
. bfd_boolean (*_bfd_set_section_contents)
-. (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
+. (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
.
. {* Routines used by the linker. *}
.#define BFD_JUMP_TABLE_LINK(NAME) \
Index: bfd/tekhex.c
===================================================================
RCS file: /cvs/src/src/bfd/tekhex.c,v
retrieving revision 1.16
diff -u -p -r1.16 tekhex.c
--- bfd/tekhex.c 16 Oct 2003 04:11:08 -0000 1.16
+++ bfd/tekhex.c 4 Nov 2003 10:03:06 -0000
@@ -110,13 +110,13 @@ static void out PARAMS ((bfd *, int, cha
static void writesym PARAMS ((char **, const char *));
static void writevalue PARAMS ((char **, bfd_vma));
static bfd_boolean tekhex_set_section_contents
- PARAMS ((bfd*, sec_ptr, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd*, sec_ptr, const PTR, file_ptr, bfd_size_type));
static bfd_boolean tekhex_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
static bfd_boolean tekhex_get_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static void move_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type, bfd_boolean));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type, bfd_boolean));
static const bfd_target *tekhex_object_p PARAMS ((bfd *));
static bfd_boolean tekhex_mkobject PARAMS ((bfd *));
static long tekhex_get_symtab_upper_bound PARAMS ((bfd *));
@@ -593,7 +593,7 @@ static void
move_section_contents (abfd, section, locationp, offset, count, get)
bfd *abfd;
asection *section;
- PTR locationp;
+ const PTR locationp;
file_ptr offset;
bfd_size_type count;
bfd_boolean get;
@@ -672,7 +672,7 @@ static bfd_boolean
tekhex_set_section_contents (abfd, section, locationp, offset, bytes_to_do)
bfd *abfd;
sec_ptr section;
- PTR locationp;
+ const PTR locationp;
file_ptr offset;
bfd_size_type bytes_to_do;
{
Index: bfd/versados.c
===================================================================
RCS file: /cvs/src/src/bfd/versados.c,v
retrieving revision 1.18
diff -u -p -r1.18 versados.c
--- bfd/versados.c 16 Oct 2003 04:11:09 -0000 1.18
+++ bfd/versados.c 4 Nov 2003 10:03:07 -0000
@@ -55,7 +55,7 @@ static bfd_boolean versados_pass_2 PARAM
static bfd_boolean versados_get_section_contents
PARAMS ((bfd *, asection *, void *, file_ptr, bfd_size_type));
static bfd_boolean versados_set_section_contents
- PARAMS ((bfd *, sec_ptr, void *, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, sec_ptr, const void *, file_ptr, bfd_size_type));
static int versados_sizeof_headers PARAMS ((bfd *, bfd_boolean));
static long int versados_get_symtab_upper_bound PARAMS ((bfd *));
static long int versados_canonicalize_symtab PARAMS ((bfd *, asymbol **));
@@ -713,7 +713,7 @@ static bfd_boolean
versados_set_section_contents (abfd, section, location, offset, bytes_to_do)
bfd *abfd ATTRIBUTE_UNUSED;
sec_ptr section ATTRIBUTE_UNUSED;
- PTR location ATTRIBUTE_UNUSED;
+ const PTR location ATTRIBUTE_UNUSED;
file_ptr offset ATTRIBUTE_UNUSED;
bfd_size_type bytes_to_do ATTRIBUTE_UNUSED;
{
Index: bfd/vms-misc.c
===================================================================
RCS file: /cvs/src/src/bfd/vms-misc.c,v
retrieving revision 1.16
diff -u -p -r1.16 vms-misc.c
--- bfd/vms-misc.c 20 Dec 2002 22:41:13 -0000 1.16
+++ bfd/vms-misc.c 4 Nov 2003 10:03:07 -0000
@@ -612,7 +612,7 @@ bfd_boolean
_bfd_save_vms_section (abfd, section, data, offset, count)
bfd *abfd;
sec_ptr section;
- PTR data;
+ const PTR data;
file_ptr offset;
bfd_size_type count;
{
Index: bfd/vms.c
===================================================================
RCS file: /cvs/src/src/bfd/vms.c,v
retrieving revision 1.25
diff -u -p -r1.25 vms.c
--- bfd/vms.c 16 Oct 2003 04:11:09 -0000 1.25
+++ bfd/vms.c 4 Nov 2003 10:03:08 -0000
@@ -125,7 +125,7 @@ static const struct reloc_howto_struct *
static bfd_boolean vms_set_arch_mach
PARAMS ((bfd *abfd, enum bfd_architecture arch, unsigned long mach));
static bfd_boolean vms_set_section_contents
- PARAMS ((bfd *abfd, asection *section, PTR location, file_ptr offset,
+ PARAMS ((bfd *abfd, asection *section, const PTR location, file_ptr offset,
bfd_size_type count));
static int vms_sizeof_headers
PARAMS ((bfd *abfd, bfd_boolean reloc));
@@ -1659,7 +1659,7 @@ static bfd_boolean
vms_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
Index: bfd/vms.h
===================================================================
RCS file: /cvs/src/src/bfd/vms.h,v
retrieving revision 1.7
diff -u -p -r1.7 vms.h
--- bfd/vms.h 31 Oct 2003 05:32:46 -0000 1.7
+++ bfd/vms.h 4 Nov 2003 10:03:08 -0000
@@ -505,9 +505,6 @@ typedef struct _vms_section {
struct _vms_section *next;
} vms_section;
-extern bfd_boolean _bfd_save_vms_section
- PARAMS ((bfd *abfd, asection *section, PTR data, file_ptr offset,
- bfd_size_type count));
extern vms_section *_bfd_get_vms_section PARAMS ((bfd *abfd, int index));
typedef struct _vms_reloc {
@@ -649,7 +646,7 @@ extern void _bfd_vms_push PARAMS ((bfd *
extern uquad _bfd_vms_pop PARAMS ((bfd *abfd, int *psect));
extern bfd_boolean _bfd_save_vms_section
- PARAMS ((bfd *abfd, asection *section, PTR data, file_ptr offset,
+ PARAMS ((bfd *abfd, asection *section, const PTR data, file_ptr offset,
bfd_size_type count));
extern void _bfd_vms_output_begin
PARAMS ((bfd *abfd, int rectype, int rechead));
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list