mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
strip: Treat "default" output_target as unspecified
Treat output target as unspecified if it is set to "default". binutils/ PR binutils/33230 * objcopy.c (copy_file): Treat "default" output_target as unspecified. binutils/testsuite/ PR binutils/33230 * binutils-all/x86-64/x86-64.exp (run_pr33230_test): New. Run binutils/33230 tests with readelf if supported. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
This commit is contained in:
@@ -3953,7 +3953,8 @@ copy_file (const char *input_filename, const char *output_filename, int ofd,
|
||||
|
||||
/* bfd_get_target does not return the correct value until
|
||||
bfd_check_format succeeds. */
|
||||
if (output_target == NULL)
|
||||
if (output_target == NULL
|
||||
|| strcmp (output_target, "default") == 0)
|
||||
{
|
||||
output_target = bfd_get_target (ibfd);
|
||||
force_output_target = false;
|
||||
@@ -4008,7 +4009,8 @@ copy_file (const char *input_filename, const char *output_filename, int ofd,
|
||||
|
||||
/* bfd_get_target does not return the correct value until
|
||||
bfd_check_format succeeds. */
|
||||
if (output_target == NULL)
|
||||
if (output_target == NULL
|
||||
|| strcmp (output_target, "default") == 0)
|
||||
output_target = bfd_get_target (ibfd);
|
||||
|
||||
if (ofd >= 0)
|
||||
|
||||
Reference in New Issue
Block a user