https://sourceware.org/bugzilla/show_bug.cgi?id=18307
Cary Coutant <ccoutant at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Cary Coutant <ccoutant at gmail dot com> ---
This looks like a bogus complaint to me.
The error is flagged in Output_segment::set_addresses, called from
Layout::attach_allocated_section_to_segment, here:
// Check for --section-start.
uint64_t addr;
bool is_address_set = parameters->options().section_start(os->name(), &addr);
...
if (is_address_set)
oseg->set_addresses(addr, addr);
General_options::section_start looks like this:
bool
General_options::section_start(const char* secname, uint64_t* paddr) const
{
if (this->section_starts_.empty())
return false;
std::map<std::string, uint64_t>::const_iterator p =
this->section_starts_.find(secname);
if (p == this->section_starts_.end())
return false;
*paddr = p->second;
return true;
}
So we only use addr if section_start returns true, in which case, it will have
initialized addr. GCC's flow analysis ought to be good enough to deal with
this.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils