diff options
author | John David Anglin <danglin@gcc.gnu.org> | 2020-08-27 15:25:03 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2020-08-27 15:25:03 +0000 |
commit | 9e7ed8b080afa19fff25244913594f95af282657 (patch) | |
tree | e7f674d3c99c6e7a3c5b8ccab397a68d039e8810 /bfd/som.c | |
parent | 6b5473c97e98828d6d8509b13a257efbed308bad (diff) | |
download | gdb-9e7ed8b080afa19fff25244913594f95af282657.zip gdb-9e7ed8b080afa19fff25244913594f95af282657.tar.gz gdb-9e7ed8b080afa19fff25244913594f95af282657.tar.bz2 |
Fix PR binutils/26356 on hppa*-*-hpux*.
PR 26356
* som.c (som_bfd_copy_private_section_data): Issue error when a
subspace is specified without its containing space.
* testsuite/binutils-all/objcopy.exp (objcopy --reverse-bytes): Add
"-j $PRIVATE$" to command on hppa*-*-hpux*.
* testsuite/lib/utils-lib.exp (default_binutils_run): Remove existing
dollar-sign quotes before quoting. Do this prior to generating log
output.
Diffstat (limited to 'bfd/som.c')
-rw-r--r-- | bfd/som.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -5455,8 +5455,18 @@ som_bfd_copy_private_section_data (bfd *ibfd, /* Reparent if necessary. */ if (som_section_data (osection)->copy_data->container) - som_section_data (osection)->copy_data->container = - som_section_data (osection)->copy_data->container->output_section; + { + if (som_section_data (osection)->copy_data->container->output_section) + som_section_data (osection)->copy_data->container = + som_section_data (osection)->copy_data->container->output_section; + else + { + /* User has specified a subspace without its containing space. */ + _bfd_error_handler (_("%pB[%pA]: no output section for space %pA"), + obfd, osection, som_section_data (osection)->copy_data->container); + return FALSE; + } + } return TRUE; } |