* hpux-core.c (hpux_core_core_file_p): Add cast in call to
make_bfd_asection. * som.c (som_set_section_contents): Constantify second argument. (hppa_som_gen_reloc_type): Abort for unsupported selectors. (som_object_setup): Rework to avoid warning. (setup_sections, som_write_fixups, bfd_section_from_som_symbol): Likewise.
This commit is contained in:
parent
7339a42e03
commit
5198ba8bd1
@ -1,3 +1,13 @@
|
|||||||
|
2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||||
|
|
||||||
|
* hpux-core.c (hpux_core_core_file_p): Add cast in call to
|
||||||
|
make_bfd_asection.
|
||||||
|
* som.c (som_set_section_contents): Constantify second argument.
|
||||||
|
(hppa_som_gen_reloc_type): Abort for unsupported selectors.
|
||||||
|
(som_object_setup): Rework to avoid warning.
|
||||||
|
(setup_sections, som_write_fixups, bfd_section_from_som_symbol):
|
||||||
|
Likewise.
|
||||||
|
|
||||||
2004-04-22 Andrew Cagney <cagney@redhat.com>
|
2004-04-22 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
* cache.c (bfd_cache_close): Check for a previously closed file.
|
* cache.c (bfd_cache_close): Check for a previously closed file.
|
||||||
|
@ -276,7 +276,8 @@ hpux_core_core_file_p (abfd)
|
|||||||
case CORE_ANON_SHMEM:
|
case CORE_ANON_SHMEM:
|
||||||
if (!make_bfd_asection (abfd, ".data",
|
if (!make_bfd_asection (abfd, ".data",
|
||||||
SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS,
|
SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS,
|
||||||
core_header.len, core_header.addr, 2))
|
core_header.len,
|
||||||
|
(bfd_vma) core_header.addr, 2))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
bfd_seek (abfd, (file_ptr) core_header.len, SEEK_CUR);
|
bfd_seek (abfd, (file_ptr) core_header.len, SEEK_CUR);
|
||||||
|
24
bfd/som.c
24
bfd/som.c
@ -194,7 +194,7 @@ static bfd_boolean som_bfd_copy_private_bfd_data
|
|||||||
static bfd_boolean som_bfd_is_local_label_name
|
static bfd_boolean som_bfd_is_local_label_name
|
||||||
PARAMS ((bfd *, const char *));
|
PARAMS ((bfd *, const char *));
|
||||||
static bfd_boolean som_set_section_contents
|
static bfd_boolean som_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 som_get_section_contents
|
static bfd_boolean som_get_section_contents
|
||||||
PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
|
PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
|
||||||
static bfd_boolean som_set_arch_mach
|
static bfd_boolean som_set_arch_mach
|
||||||
@ -1589,6 +1589,11 @@ hppa_som_gen_reloc_type (abfd, base_type, format, field, sym_diff, sym)
|
|||||||
final_types[3] = NULL;
|
final_types[3] = NULL;
|
||||||
*final_type = base_type;
|
*final_type = base_type;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* FIXME: These two field selectors are not currently supported. */
|
||||||
|
case e_ltpsel:
|
||||||
|
case e_rtpsel:
|
||||||
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (base_type)
|
switch (base_type)
|
||||||
@ -1820,10 +1825,13 @@ som_object_setup (abfd, file_hdrp, aux_hdrp, current_offset)
|
|||||||
found = 0;
|
found = 0;
|
||||||
for (section = abfd->sections; section; section = section->next)
|
for (section = abfd->sections; section; section = section->next)
|
||||||
{
|
{
|
||||||
|
bfd_vma entry;
|
||||||
|
|
||||||
if ((section->flags & SEC_CODE) == 0)
|
if ((section->flags & SEC_CODE) == 0)
|
||||||
continue;
|
continue;
|
||||||
if (aux_hdrp->exec_entry >= section->vma
|
entry = aux_hdrp->exec_entry;
|
||||||
&& aux_hdrp->exec_entry < section->vma + section->_cooked_size)
|
if (entry >= section->vma
|
||||||
|
&& entry < section->vma + section->_cooked_size)
|
||||||
found = 1;
|
found = 1;
|
||||||
}
|
}
|
||||||
if (aux_hdrp->exec_entry == 0
|
if (aux_hdrp->exec_entry == 0
|
||||||
@ -1898,7 +1906,7 @@ setup_sections (abfd, file_hdr, current_offset)
|
|||||||
{
|
{
|
||||||
struct space_dictionary_record space;
|
struct space_dictionary_record space;
|
||||||
struct subspace_dictionary_record subspace, save_subspace;
|
struct subspace_dictionary_record subspace, save_subspace;
|
||||||
int subspace_index;
|
unsigned int subspace_index;
|
||||||
asection *space_asect;
|
asection *space_asect;
|
||||||
char *newname;
|
char *newname;
|
||||||
|
|
||||||
@ -2725,7 +2733,7 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
|
|||||||
int reloc_offset;
|
int reloc_offset;
|
||||||
unsigned int current_rounding_mode;
|
unsigned int current_rounding_mode;
|
||||||
#ifndef NO_PCREL_MODES
|
#ifndef NO_PCREL_MODES
|
||||||
int current_call_mode;
|
unsigned int current_call_mode;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Find a subspace of this space. */
|
/* Find a subspace of this space. */
|
||||||
@ -4298,7 +4306,7 @@ bfd_section_from_som_symbol (abfd, symbol)
|
|||||||
&& symbol->symbol_type != ST_SEC_PROG
|
&& symbol->symbol_type != ST_SEC_PROG
|
||||||
&& symbol->symbol_type != ST_MILLICODE))
|
&& symbol->symbol_type != ST_MILLICODE))
|
||||||
{
|
{
|
||||||
unsigned int index = symbol->symbol_info;
|
int index = symbol->symbol_info;
|
||||||
for (section = abfd->sections; section != NULL; section = section->next)
|
for (section = abfd->sections; section != NULL; section = section->next)
|
||||||
if (section->target_index == index && som_is_subspace (section))
|
if (section->target_index == index && som_is_subspace (section))
|
||||||
return section;
|
return section;
|
||||||
@ -5358,7 +5366,7 @@ static bfd_boolean
|
|||||||
som_set_section_contents (abfd, section, location, offset, count)
|
som_set_section_contents (abfd, section, location, offset, count)
|
||||||
bfd *abfd;
|
bfd *abfd;
|
||||||
sec_ptr section;
|
sec_ptr section;
|
||||||
PTR location;
|
const PTR location;
|
||||||
file_ptr offset;
|
file_ptr offset;
|
||||||
bfd_size_type count;
|
bfd_size_type count;
|
||||||
{
|
{
|
||||||
@ -5385,7 +5393,7 @@ som_set_section_contents (abfd, section, location, offset, count)
|
|||||||
if (bfd_seek (abfd, offset, SEEK_SET) != 0)
|
if (bfd_seek (abfd, offset, SEEK_SET) != 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (bfd_bwrite ((PTR) location, count, abfd) != count)
|
if (bfd_bwrite (location, count, abfd) != count)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user