This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: powerpc gold, work around pr17670
- From: Markus Trippelsdorf <markus at trippelsdorf dot de>
- To: binutils at sourceware dot org, ccoutant at google dot com
- Date: Wed, 3 Dec 2014 16:27:45 +0100
- Subject: Re: powerpc gold, work around pr17670
- Authentication-results: sourceware.org; auth=none
- References: <20141203151701 dot GR20383 at bubble dot grove dot modra dot org>
On 2014.12.04 at 01:47 +1030, Alan Modra wrote:
> pr17670 is about an assert triggering on a branch to an undefined
> weak symbol, the symbol being undefined due to dropping its comdat
> group section. (Well sort of. The symbol is actually defined in
> an .opd section which isn't part of the group, but the code section
> the opd entry points at is dropped.) So don't assert.
> Also, don't make long branch stubs to such symbols, and arrange to
> have target-reloc.h code warn when applying relocs that use the sym
> by making the sym seem to be undefined. Making the sym undefined can
> be done via override_base() but using that function requires setting
> up an elfcpp::Sym, so I opted for a simpler new Symbol interface.
> @@ -7205,8 +7211,11 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
> value += object->ppc64_local_entry_offset(r_sym);
> }
> else
> - value = target->symval_for_branch(relinfo->symtab, value,
> - gsym, object, &dest_shndx);
> + {
> + unsigned int dest_shndx;
> + target->symval_for_branch(relinfo->symtab, gsym, object,
> + &value, &dest_shndx))
> + }
Extra ')':
powerpc.cc: In member function âbool {anonymous}::Target_powerpc<size, big_endian>::Relocate::relocate(const gold::Relocate_info<size, big_endian>*, {anonymous}::Target_powerpc<size, big_endian>*, gold::Output_section*, size_t, const elfcpp::Rela<size, big_endian>&, unsigned int, const gold::Sized_symbol<size>*, const gold::Symbol_value<size>*, unsigned char*, {anonymous}::Target_powerpc<size, big_endian>::Address, gold::section_size_type)â:
powerpc.cc:7217:26: error: expected â;â before â)â token
&value, &dest_shndx))
--
Markus