mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 12:03:41 +08:00
2010-06-11 Tristan Gingold <gingold@adacore.com>
* vms-misc.c (_bfd_vms_output_counted): Make VALUE argument const. Adjust cast. (_bfd_vms_output_dump): Make DATA argument const, adjust cast. * vms.h (_bfd_vms_output_counted, _bfd_vms_output_dump): Adjust. * vms-alpha.c (evax_section_flags): Make it const. (vms_secflag_by_name): Remove unused ABFD argument. Make SECTION_FLAGS and NAME arguments const. Clarify comment. (vms_esecflag_by_name): Make SECTION_FLAGS and NAME arguments const. (_bfd_vms_slurp_egsd): Adjust call to vms_secflag_by_name. (_bfd_vms_write_egsd): Remove useless cast.
This commit is contained in:
parent
1ded560998
commit
81bb31c0d9
@ -1,3 +1,16 @@
|
|||||||
|
2010-06-11 Tristan Gingold <gingold@adacore.com>
|
||||||
|
|
||||||
|
* vms-misc.c (_bfd_vms_output_counted): Make VALUE argument const.
|
||||||
|
Adjust cast.
|
||||||
|
(_bfd_vms_output_dump): Make DATA argument const, adjust cast.
|
||||||
|
* vms.h (_bfd_vms_output_counted, _bfd_vms_output_dump): Adjust.
|
||||||
|
* vms-alpha.c (evax_section_flags): Make it const.
|
||||||
|
(vms_secflag_by_name): Remove unused ABFD argument.
|
||||||
|
Make SECTION_FLAGS and NAME arguments const. Clarify comment.
|
||||||
|
(vms_esecflag_by_name): Make SECTION_FLAGS and NAME arguments const.
|
||||||
|
(_bfd_vms_slurp_egsd): Adjust call to vms_secflag_by_name.
|
||||||
|
(_bfd_vms_write_egsd): Remove useless cast.
|
||||||
|
|
||||||
2010-06-10 Tristan Gingold <gingold@adacore.com>
|
2010-06-10 Tristan Gingold <gingold@adacore.com>
|
||||||
|
|
||||||
* config.bfd: Remove #if/#endif so that som can be compiled on any
|
* config.bfd: Remove #if/#endif so that som can be compiled on any
|
||||||
|
@ -936,7 +936,7 @@ struct sec_flags_struct
|
|||||||
|
|
||||||
/* These flags are deccrtl/vaxcrtl (openVMS 6.2 Alpha) compatible. */
|
/* These flags are deccrtl/vaxcrtl (openVMS 6.2 Alpha) compatible. */
|
||||||
|
|
||||||
static struct sec_flags_struct evax_section_flags[] =
|
static const struct sec_flags_struct evax_section_flags[] =
|
||||||
{
|
{
|
||||||
{ EVAX_ABS_NAME,
|
{ EVAX_ABS_NAME,
|
||||||
(EGPS__V_SHR),
|
(EGPS__V_SHR),
|
||||||
@ -995,12 +995,11 @@ static struct sec_flags_struct evax_section_flags[] =
|
|||||||
(SEC_IN_MEMORY | SEC_DATA | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD) }
|
(SEC_IN_MEMORY | SEC_DATA | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD) }
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Retrieve bfd section flags by name and size. */
|
/* Retrieve BFD section flags by name and size. */
|
||||||
|
|
||||||
static flagword
|
static flagword
|
||||||
vms_secflag_by_name (bfd *abfd ATTRIBUTE_UNUSED,
|
vms_secflag_by_name (const struct sec_flags_struct *section_flags,
|
||||||
struct sec_flags_struct *section_flags,
|
const char *name,
|
||||||
char *name,
|
|
||||||
int hassize)
|
int hassize)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@ -1021,12 +1020,12 @@ vms_secflag_by_name (bfd *abfd ATTRIBUTE_UNUSED,
|
|||||||
return section_flags[i].flags_always;
|
return section_flags[i].flags_always;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Retrieve vms section flags by name and size. */
|
/* Retrieve VMS section flags by name and size. */
|
||||||
|
|
||||||
static flagword
|
static flagword
|
||||||
vms_esecflag_by_name (struct sec_flags_struct *section_flags,
|
vms_esecflag_by_name (const struct sec_flags_struct *section_flags,
|
||||||
char *name,
|
const char *name,
|
||||||
int hassize)
|
int hassize)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
@ -1144,7 +1143,7 @@ _bfd_vms_slurp_egsd (bfd *abfd)
|
|||||||
vms_section_data (section)->flags = old_flags;
|
vms_section_data (section)->flags = old_flags;
|
||||||
vms_section_data (section)->no_flags = 0;
|
vms_section_data (section)->no_flags = 0;
|
||||||
section->size = bfd_getl32 (egps->alloc);
|
section->size = bfd_getl32 (egps->alloc);
|
||||||
new_flags = vms_secflag_by_name (abfd, evax_section_flags, name,
|
new_flags = vms_secflag_by_name (evax_section_flags, name,
|
||||||
section->size > 0);
|
section->size > 0);
|
||||||
if (!(old_flags & EGPS__V_NOMOD))
|
if (!(old_flags & EGPS__V_NOMOD))
|
||||||
{
|
{
|
||||||
@ -3319,7 +3318,7 @@ _bfd_vms_write_egsd (bfd *abfd)
|
|||||||
|
|
||||||
/* Don't know if this is necessary for the linker but for now it keeps
|
/* Don't know if this is necessary for the linker but for now it keeps
|
||||||
vms_slurp_gsd happy. */
|
vms_slurp_gsd happy. */
|
||||||
sname = (char *)section->name;
|
sname = section->name;
|
||||||
if (*sname == '.')
|
if (*sname == '.')
|
||||||
{
|
{
|
||||||
/* Remove leading dot. */
|
/* Remove leading dot. */
|
||||||
|
@ -348,7 +348,7 @@ _bfd_vms_output_quad (struct vms_rec_wr *recwr, bfd_vma value)
|
|||||||
/* Output c-string as counted string. */
|
/* Output c-string as counted string. */
|
||||||
|
|
||||||
void
|
void
|
||||||
_bfd_vms_output_counted (struct vms_rec_wr *recwr, char *value)
|
_bfd_vms_output_counted (struct vms_rec_wr *recwr, const char *value)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
@ -366,13 +366,13 @@ _bfd_vms_output_counted (struct vms_rec_wr *recwr, char *value)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_bfd_vms_output_byte (recwr, (unsigned int) len & 0xff);
|
_bfd_vms_output_byte (recwr, (unsigned int) len & 0xff);
|
||||||
_bfd_vms_output_dump (recwr, (unsigned char *) value, len);
|
_bfd_vms_output_dump (recwr, (const unsigned char *)value, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Output character area. */
|
/* Output character area. */
|
||||||
|
|
||||||
void
|
void
|
||||||
_bfd_vms_output_dump (struct vms_rec_wr *recwr, unsigned char *data, int len)
|
_bfd_vms_output_dump (struct vms_rec_wr *recwr, const unsigned char *data, int len)
|
||||||
{
|
{
|
||||||
vms_debug2 ((6, "_bfd_vms_output_dump (%d)\n", len));
|
vms_debug2 ((6, "_bfd_vms_output_dump (%d)\n", len));
|
||||||
|
|
||||||
|
@ -131,8 +131,8 @@ extern void _bfd_vms_output_byte (struct vms_rec_wr *, unsigned);
|
|||||||
extern void _bfd_vms_output_short (struct vms_rec_wr *, unsigned);
|
extern void _bfd_vms_output_short (struct vms_rec_wr *, unsigned);
|
||||||
extern void _bfd_vms_output_long (struct vms_rec_wr *, unsigned long);
|
extern void _bfd_vms_output_long (struct vms_rec_wr *, unsigned long);
|
||||||
extern void _bfd_vms_output_quad (struct vms_rec_wr *, bfd_vma);
|
extern void _bfd_vms_output_quad (struct vms_rec_wr *, bfd_vma);
|
||||||
extern void _bfd_vms_output_counted (struct vms_rec_wr *, char *);
|
extern void _bfd_vms_output_counted (struct vms_rec_wr *, const char *);
|
||||||
extern void _bfd_vms_output_dump (struct vms_rec_wr *, unsigned char *, int);
|
extern void _bfd_vms_output_dump (struct vms_rec_wr *, const unsigned char *, int);
|
||||||
extern void _bfd_vms_output_fill (struct vms_rec_wr *, int, int);
|
extern void _bfd_vms_output_fill (struct vms_rec_wr *, int, int);
|
||||||
extern int _bfd_vms_convert_to_var_unix_filename (const char *);
|
extern int _bfd_vms_convert_to_var_unix_filename (const char *);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user