Do not complain when copying a file format that does not support relocations.
This commit is contained in:
parent
47eebc207f
commit
ed570f48a0
2 changed files with 23 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2003-10-27 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
* objcopy.c (copy_section): Do not complain when a target does not
|
||||||
|
support relocations.
|
||||||
|
(mark_symbols_used_in_relocations): Likewise.
|
||||||
|
|
||||||
2003-10-14 Anil Paranjpe <anilp1@KPITCummins.com>
|
2003-10-14 Anil Paranjpe <anilp1@KPITCummins.com>
|
||||||
|
|
||||||
* objcopy.c (copy_main): Reads machine flags from arch_info
|
* objcopy.c (copy_main): Reads machine flags from arch_info
|
||||||
|
|
|
@ -1885,10 +1885,18 @@ copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
|
||||||
if (bfd_get_format (obfd) == bfd_core)
|
if (bfd_get_format (obfd) == bfd_core)
|
||||||
relsize = 0;
|
relsize = 0;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
relsize = bfd_get_reloc_upper_bound (ibfd, isection);
|
relsize = bfd_get_reloc_upper_bound (ibfd, isection);
|
||||||
|
|
||||||
if (relsize < 0)
|
if (relsize < 0)
|
||||||
|
{
|
||||||
|
/* Do not complain if the target does not support relocations. */
|
||||||
|
if (relsize == -1 && bfd_get_error () == bfd_error_invalid_operation)
|
||||||
|
relsize = 0;
|
||||||
|
else
|
||||||
RETURN_NONFATAL (bfd_get_filename (ibfd));
|
RETURN_NONFATAL (bfd_get_filename (ibfd));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (relsize == 0)
|
if (relsize == 0)
|
||||||
bfd_set_reloc (obfd, osection, NULL, 0);
|
bfd_set_reloc (obfd, osection, NULL, 0);
|
||||||
|
@ -2030,7 +2038,12 @@ mark_symbols_used_in_relocations (bfd *ibfd, sec_ptr isection, void *symbolsarg)
|
||||||
|
|
||||||
relsize = bfd_get_reloc_upper_bound (ibfd, isection);
|
relsize = bfd_get_reloc_upper_bound (ibfd, isection);
|
||||||
if (relsize < 0)
|
if (relsize < 0)
|
||||||
|
{
|
||||||
|
/* Do not complain if the target does not support relocations. */
|
||||||
|
if (relsize == -1 && bfd_get_error () == bfd_error_invalid_operation)
|
||||||
|
return;
|
||||||
bfd_fatal (bfd_get_filename (ibfd));
|
bfd_fatal (bfd_get_filename (ibfd));
|
||||||
|
}
|
||||||
|
|
||||||
if (relsize == 0)
|
if (relsize == 0)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue