aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/elf32-arm.c2
-rw-r--r--bfd/elf32-csky.c2
-rw-r--r--bfd/elf32-hppa.c6
-rw-r--r--bfd/elf32-m68hc11.c2
-rw-r--r--bfd/elf32-m68hc12.c2
-rw-r--r--bfd/elf32-metag.c2
-rw-r--r--bfd/elf32-nios2.c2
-rw-r--r--bfd/elf64-ppc.c29
-rw-r--r--bfd/elflink.c20
-rw-r--r--bfd/elfnn-aarch64.c2
-rw-r--r--bfd/xcofflink.c2
11 files changed, 19 insertions, 52 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 86cc961..3e262d7 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -5053,7 +5053,7 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry,
section. The user should fix his linker script. */
if (stub_entry->target_section->output_section == NULL
&& info->non_contiguous_regions)
- info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. "
+ info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. "
"Retry without --enable-non-contiguous-regions.\n"),
stub_entry->target_section);
diff --git a/bfd/elf32-csky.c b/bfd/elf32-csky.c
index 3333eec..d0c7c75 100644
--- a/bfd/elf32-csky.c
+++ b/bfd/elf32-csky.c
@@ -3739,7 +3739,7 @@ csky_build_one_stub (struct bfd_hash_entry *gen_entry,
section. The user should fix his linker script. */
if (stub_entry->target_section->output_section == NULL
&& info->non_contiguous_regions)
- info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. "
+ info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. "
"Retry without --enable-non-contiguous-regions.\n"),
stub_entry->target_section);
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 153a3ce..82e7e0d 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -729,7 +729,7 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
section. The user should fix his linker script. */
if (hsh->target_section->output_section == NULL
&& info->non_contiguous_regions)
- info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output "
+ info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output "
"section. Retry without "
"--enable-non-contiguous-regions.\n"),
hsh->target_section);
@@ -758,7 +758,7 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
section. The user should fix his linker script. */
if (hsh->target_section->output_section == NULL
&& info->non_contiguous_regions)
- info->callbacks->einfo (_("%F%P: Could not assign %pA to an output "
+ info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output "
"section. Retry without "
"--enable-non-contiguous-regions.\n"),
hsh->target_section);
@@ -839,7 +839,7 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
section. The user should fix his linker script. */
if (hsh->target_section->output_section == NULL
&& info->non_contiguous_regions)
- info->callbacks->einfo (_("%F%P: Could not assign %pA to an output "
+ info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output "
"section. Retry without "
"--enable-non-contiguous-regions.\n"),
hsh->target_section);
diff --git a/bfd/elf32-m68hc11.c b/bfd/elf32-m68hc11.c
index 21e7a11..b812ad4 100644
--- a/bfd/elf32-m68hc11.c
+++ b/bfd/elf32-m68hc11.c
@@ -419,7 +419,7 @@ m68hc11_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
section. The user should fix his linker script. */
if (stub_entry->target_section->output_section == NULL
&& info->non_contiguous_regions)
- info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. "
+ info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. "
"Retry without --enable-non-contiguous-regions.\n"),
stub_entry->target_section);
diff --git a/bfd/elf32-m68hc12.c b/bfd/elf32-m68hc12.c
index 3a4458d..efd440e 100644
--- a/bfd/elf32-m68hc12.c
+++ b/bfd/elf32-m68hc12.c
@@ -539,7 +539,7 @@ m68hc12_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
section. The user should fix his linker script. */
if (stub_entry->target_section->output_section == NULL
&& info->non_contiguous_regions)
- info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. "
+ info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. "
"Retry without --enable-non-contiguous-regions.\n"),
stub_entry->target_section);
diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c
index 5099e8f..fd19c33 100644
--- a/bfd/elf32-metag.c
+++ b/bfd/elf32-metag.c
@@ -3342,7 +3342,7 @@ metag_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
section. The user should fix his linker script. */
if (hsh->target_section->output_section == NULL
&& info->non_contiguous_regions)
- info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. "
+ info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. "
"Retry without --enable-non-contiguous-regions.\n"),
hsh->target_section);
diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
index 806ec31..5ca6482 100644
--- a/bfd/elf32-nios2.c
+++ b/bfd/elf32-nios2.c
@@ -2491,7 +2491,7 @@ nios2_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg ATTRIBUTE_U
section. The user should fix his linker script. */
if (hsh->target_section->output_section == NULL
&& info->non_contiguous_regions)
- info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. "
+ info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. "
"Retry without --enable-non-contiguous-regions.\n"),
hsh->target_section);
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 5329bb6..a6c12a4 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -11701,25 +11701,6 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
stub_entry = (struct ppc_stub_hash_entry *) gen_entry;
info = in_arg;
- /* Fail if the target section could not be assigned to an output
- section. The user should fix his linker script. */
- if (stub_entry->target_section != NULL
- && stub_entry->target_section->output_section == NULL
- && info->non_contiguous_regions)
- info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. "
- "Retry without --enable-non-contiguous-regions.\n"),
- stub_entry->target_section);
-
- /* Same for the group. */
- if (stub_entry->group->stub_sec != NULL
- && stub_entry->group->stub_sec->output_section == NULL
- && info->non_contiguous_regions)
- info->callbacks->einfo (_("%F%P: Could not assign group %pA target %pA to an "
- "output section. Retry without "
- "--enable-non-contiguous-regions.\n"),
- stub_entry->group->stub_sec,
- stub_entry->target_section);
-
htab = ppc_hash_table (info);
if (htab == NULL)
return false;
@@ -12254,7 +12235,7 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
if (stub_entry->target_section != NULL
&& stub_entry->target_section->output_section == NULL
&& info->non_contiguous_regions)
- info->callbacks->einfo (_("%F%P: Could not assign %pA to an output section. "
+ info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. "
"Retry without --enable-non-contiguous-regions.\n"),
stub_entry->target_section);
@@ -12262,11 +12243,9 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
if (stub_entry->group->stub_sec != NULL
&& stub_entry->group->stub_sec->output_section == NULL
&& info->non_contiguous_regions)
- info->callbacks->einfo (_("%F%P: Could not assign group %pA target %pA to an "
- "output section. Retry without "
- "--enable-non-contiguous-regions.\n"),
- stub_entry->group->stub_sec,
- stub_entry->target_section);
+ info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. "
+ "Retry without --enable-non-contiguous-regions.\n"),
+ stub_entry->group->stub_sec);
/* Make a note of the offset within the stubs for this entry. */
stub_offset = stub_entry->group->stub_sec->size;
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 0368256..e15b683 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -11151,22 +11151,10 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd)
/* If this symbol is defined in a section which we are
discarding, we don't need to keep it. */
- if (isym->st_shndx != SHN_UNDEF
- && isym->st_shndx < SHN_LORESERVE
- && isec->output_section == NULL
- && flinfo->info->non_contiguous_regions)
- {
- if (flinfo->info->non_contiguous_regions_warnings)
- _bfd_error_handler (_("warning: --enable-non-contiguous-regions "
- "discards section `%s' from '%s'\n"),
- isec->name, bfd_get_filename (isec->owner));
- continue;
- }
-
- if (isym->st_shndx != SHN_UNDEF
- && isym->st_shndx < SHN_LORESERVE
- && bfd_section_removed_from_list (output_bfd,
- isec->output_section))
+ if (isym->st_shndx < SHN_LORESERVE
+ && (isec->output_section == NULL
+ || bfd_section_removed_from_list (output_bfd,
+ isec->output_section)))
continue;
/* Get the name of the symbol. */
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index a9fefbd..e1dc110 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -3264,7 +3264,7 @@ aarch64_build_one_stub (struct bfd_hash_entry *gen_entry,
section. The user should fix his linker script. */
if (stub_entry->target_section->output_section == NULL
&& info->non_contiguous_regions)
- info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. "
+ info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. "
"Retry without "
"--enable-non-contiguous-regions.\n"),
stub_entry->target_section);
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index 8346977..ec6bc5d 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -4690,7 +4690,7 @@ xcoff_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
if (hstub->target_section != NULL
&& hstub->target_section->output_section == NULL
&& info->non_contiguous_regions)
- info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. "
+ info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. "
"Retry without --enable-non-contiguous-regions.\n"),
hstub->target_section);