2012-10-16 Sriraman Tallam <tmsriram@google.com>

* layout.cc (Layout::include_section): Keep sections marked
	SHF_EXCLUDE when doing relocatable links.
This commit is contained in:
Sriraman Tallam 2012-10-16 16:50:32 +00:00
parent bb3f9ed8ba
commit ae034989da
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2012-10-16 Sriraman Tallam <tmsriram@google.com>
* layout.cc (Layout::include_section): Keep sections marked
SHF_EXCLUDE when doing relocatable links.
2012-10-16 Alan Modra <amodra@gmail.com>
* powerpc.cc (Target_powerpc::define_save_restore_funcs): New func.

View file

@ -582,7 +582,8 @@ bool
Layout::include_section(Sized_relobj_file<size, big_endian>*, const char* name,
const elfcpp::Shdr<size, big_endian>& shdr)
{
if (shdr.get_sh_flags() & elfcpp::SHF_EXCLUDE)
if (!parameters->options().relocatable()
&& (shdr.get_sh_flags() & elfcpp::SHF_EXCLUDE))
return false;
switch (shdr.get_sh_type())