projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[GOLD] PR27815, gold fails to build with latest GCC
[deliverable/binutils-gdb.git]
/
gold
/
arm.cc
diff --git
a/gold/arm.cc
b/gold/arm.cc
index 848924757e31cd7e605a864d65c2eaf609a37d29..a5a01bcd60ecc3e70148a4f0269864d99a9e630d 100644
(file)
--- a/
gold/arm.cc
+++ b/
gold/arm.cc
@@
-1,6
+1,6
@@
// arm.cc -- arm target support for gold.
// arm.cc -- arm target support for gold.
-// Copyright (C) 2009-20
18
Free Software Foundation, Inc.
+// Copyright (C) 2009-20
21
Free Software Foundation, Inc.
// Written by Doug Kwan <dougkwan@google.com> based on the i386 code
// by Ian Lance Taylor <iant@google.com>.
// This file also contains borrowed and adapted code from
// Written by Doug Kwan <dougkwan@google.com> based on the i386 code
// by Ian Lance Taylor <iant@google.com>.
// This file also contains borrowed and adapted code from
@@
-12140,6
+12140,7
@@
Target_arm<big_endian>::scan_reloc_section_for_stubs(
const Symbol_value<32> *psymval;
bool is_defined_in_discarded_section;
unsigned int shndx;
const Symbol_value<32> *psymval;
bool is_defined_in_discarded_section;
unsigned int shndx;
+ const Symbol* gsym = NULL;
if (r_sym < local_count)
{
sym = NULL;
if (r_sym < local_count)
{
sym = NULL;
@@
-12192,7
+12193,6
@@
Target_arm<big_endian>::scan_reloc_section_for_stubs(
}
else
{
}
else
{
- const Symbol* gsym;
gsym = arm_object->global_symbol(r_sym);
gold_assert(gsym != NULL);
if (gsym->is_forwarder())
gsym = arm_object->global_symbol(r_sym);
gold_assert(gsym != NULL);
if (gsym->is_forwarder())
@@
-12233,11
+12233,11
@@
Target_arm<big_endian>::scan_reloc_section_for_stubs(
Symbol_value<32> symval2;
if (is_defined_in_discarded_section)
{
Symbol_value<32> symval2;
if (is_defined_in_discarded_section)
{
+ std::string name = arm_object->section_name(relinfo->data_shndx);
+
if (comdat_behavior == CB_UNDETERMINED)
if (comdat_behavior == CB_UNDETERMINED)
- {
- std::string name = arm_object->section_name(relinfo->data_shndx);
comdat_behavior = default_comdat_behavior.get(name.c_str());
comdat_behavior = default_comdat_behavior.get(name.c_str());
- }
+
if (comdat_behavior == CB_PRETEND)
{
// FIXME: This case does not work for global symbols.
if (comdat_behavior == CB_PRETEND)
{
// FIXME: This case does not work for global symbols.
@@
-12247,7
+12247,7
@@
Target_arm<big_endian>::scan_reloc_section_for_stubs(
// script.
bool found;
typename elfcpp::Elf_types<32>::Elf_Addr value =
// script.
bool found;
typename elfcpp::Elf_types<32>::Elf_Addr value =
- arm_object->map_to_kept_section(shndx, &found);
+ arm_object->map_to_kept_section(shndx,
name,
&found);
if (found)
symval2.set_output_value(value + psymval->input_value());
else
if (found)
symval2.set_output_value(value + psymval->input_value());
else
@@
-12255,10
+12255,8
@@
Target_arm<big_endian>::scan_reloc_section_for_stubs(
}
else
{
}
else
{
- if (comdat_behavior == CB_WARNING)
- gold_warning_at_location(relinfo, i, offset,
- _("relocation refers to discarded "
- "section"));
+ if (comdat_behavior == CB_ERROR)
+ issue_discarded_error(relinfo, i, offset, r_sym, gsym);
symval2.set_output_value(0);
}
symval2.set_no_output_symtab_entry();
symval2.set_output_value(0);
}
symval2.set_no_output_symtab_entry();
This page took
0.027664 seconds
and
4
git commands to generate.