mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-20 06:15:09 +08:00
* objcopy.c (strip_main): keep_specific_list == NULL as additional
condition to set up strip all symbols by default. (copy_archive): don't change archive when error in object files of the archive. PR16197
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
1998-06-26 Vladimir N. Makarov <vmakarov@cygnus.com>
|
||||||
|
|
||||||
|
* objcopy.c (strip_main): keep_specific_list == NULL as additional
|
||||||
|
condition to set up strip all symbols by default.
|
||||||
|
(copy_archive): don't change archive when error in object files of
|
||||||
|
the archive.
|
||||||
|
|
||||||
Wed Jun 24 17:53:47 1998 Ian Lance Taylor <ian@cygnus.com>
|
Wed Jun 24 17:53:47 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
* stabs.c (parse_number): Sign extend negative values correctly if
|
* stabs.c (parse_number): Sign extend negative values correctly if
|
||||||
|
@ -961,7 +961,7 @@ copy_archive (ibfd, obfd, output_target)
|
|||||||
list = NULL;
|
list = NULL;
|
||||||
|
|
||||||
this_element = bfd_openr_next_archived_file (ibfd, NULL);
|
this_element = bfd_openr_next_archived_file (ibfd, NULL);
|
||||||
while (this_element != (bfd *) NULL)
|
while (!status && this_element != (bfd *) NULL)
|
||||||
{
|
{
|
||||||
/* Create an output file for this member. */
|
/* Create an output file for this member. */
|
||||||
char *output_name = concat (dir, "/", bfd_get_filename(this_element),
|
char *output_name = concat (dir, "/", bfd_get_filename(this_element),
|
||||||
@ -983,7 +983,12 @@ copy_archive (ibfd, obfd, output_target)
|
|||||||
if (bfd_check_format (this_element, bfd_object) == true)
|
if (bfd_check_format (this_element, bfd_object) == true)
|
||||||
copy_object (this_element, output_bfd);
|
copy_object (this_element, output_bfd);
|
||||||
|
|
||||||
bfd_close (output_bfd);
|
if (!bfd_close (output_bfd))
|
||||||
|
{
|
||||||
|
bfd_nonfatal (bfd_get_filename (output_bfd));
|
||||||
|
/* Error in new object file. Don't change archive. */
|
||||||
|
status = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Open the newly output file and attach to our list. */
|
/* Open the newly output file and attach to our list. */
|
||||||
output_bfd = bfd_openr (output_name, output_target);
|
output_bfd = bfd_openr (output_name, output_target);
|
||||||
@ -1097,6 +1102,7 @@ setup_section (ibfd, isection, obfdarg)
|
|||||||
bfd *obfd = (bfd *) obfdarg;
|
bfd *obfd = (bfd *) obfdarg;
|
||||||
struct section_list *p;
|
struct section_list *p;
|
||||||
sec_ptr osection;
|
sec_ptr osection;
|
||||||
|
bfd_size_type size;
|
||||||
bfd_vma vma;
|
bfd_vma vma;
|
||||||
bfd_vma lma;
|
bfd_vma lma;
|
||||||
flagword flags;
|
flagword flags;
|
||||||
@ -1124,9 +1130,10 @@ setup_section (ibfd, isection, obfdarg)
|
|||||||
goto loser;
|
goto loser;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bfd_set_section_size (obfd,
|
size = bfd_section_size (ibfd, isection);
|
||||||
osection,
|
if (copy_byte >= 0)
|
||||||
bfd_section_size (ibfd, isection)))
|
size = (size + interleave - 1) / interleave;
|
||||||
|
if (! bfd_set_section_size (obfd, osection, size))
|
||||||
{
|
{
|
||||||
err = "size";
|
err = "size";
|
||||||
goto loser;
|
goto loser;
|
||||||
@ -1284,12 +1291,7 @@ copy_section (ibfd, isection, obfdarg)
|
|||||||
RETURN_NONFATAL (bfd_get_filename (ibfd));
|
RETURN_NONFATAL (bfd_get_filename (ibfd));
|
||||||
|
|
||||||
if (copy_byte >= 0)
|
if (copy_byte >= 0)
|
||||||
{
|
|
||||||
filter_bytes (memhunk, &size);
|
filter_bytes (memhunk, &size);
|
||||||
/* The section has gotten smaller. */
|
|
||||||
if (!bfd_set_section_size (obfd, osection, size))
|
|
||||||
RETURN_NONFATAL (bfd_get_filename (obfd));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!bfd_set_section_contents (obfd, osection, memhunk, (file_ptr) 0,
|
if (!bfd_set_section_contents (obfd, osection, memhunk, (file_ptr) 0,
|
||||||
size))
|
size))
|
||||||
@ -1742,7 +1744,8 @@ strip_main (argc, argv)
|
|||||||
/* Default is to strip all symbols. */
|
/* Default is to strip all symbols. */
|
||||||
if (strip_symbols == STRIP_UNDEF
|
if (strip_symbols == STRIP_UNDEF
|
||||||
&& discard_locals == LOCALS_UNDEF
|
&& discard_locals == LOCALS_UNDEF
|
||||||
&& strip_specific_list == NULL)
|
&& strip_specific_list == NULL
|
||||||
|
&& keep_specific_list == NULL)
|
||||||
strip_symbols = STRIP_ALL;
|
strip_symbols = STRIP_ALL;
|
||||||
|
|
||||||
if (output_target == (char *) NULL)
|
if (output_target == (char *) NULL)
|
||||||
|
Reference in New Issue
Block a user