Bug 13168 - Comdat group breaks hppa stub placement on hppa-unknown-linux-gnu
Summary: Comdat group breaks hppa stub placement on hppa-unknown-linux-gnu
Status: NEW
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.22
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-07 23:56 UTC by John David Anglin
Modified: 2024-03-16 02:33 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2011-09-07 23:56:12 UTC
The cmake-next package build fails with the following error:

Linking CXX executable ../bin/ccmake
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/../../../../hppa2.0-unknown-linux-gnu/bin/ld:
libCMakeLib.a(cmGlobalGenerator.cxx.o)(.text._ZNSt8_Rb_treeIN5cmsys6StringESt4pairIKS1_iESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE16_M_insert_uniqueERKS4_[std::_Rb_tree<cmsys::String,
std::pair<cmsys::String const, int>,
std::_Select1st<std::pair<cmsys::String const, int> >,
std::less<cmsys::String>, std::allocator<std::pair<cmsys::String const,
int> > >::_M_insert_unique(std::pair<cmsys::String const, int>
const&)]+0xbc): cannot reach
00004abb__ZNSt8_Rb_treeIN5cmsys6StringESt4pairIKS1_iESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE8_S_rightEPSt18_Rb_tree_node_base+0,
recompile with -ffunction-sections
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/../../../../hppa2.0-unknown-linux-gnu/bin/ld:
libCMakeLib.a(cmGlobalGenerator.cxx.o)(.text._ZNSt8_Rb_treeIN5cmsys6StringESt4pairIKS1_iESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE16_M_insert_uniqueERKS4_[std::_Rb_tree<cmsys::String,
std::pair<cmsys::String const, int>,
std::_Select1st<std::pair<cmsys::String const, int> >,
std::less<cmsys::String>, std::allocator<std::pair<cmsys::String const,
int> > >::_M_insert_unique(std::pair<cmsys::String const, int>
const&)]+0xbc): cannot handle R_PARISC_PCREL17F for
std::_Rb_tree<cmsys::String, std::pair<cmsys::String const, int>,
std::_Select1st<std::pair<cmsys::String const, int> >,
std::less<cmsys::String>, std::allocator<std::pair<cmsys::String const,
int> > >::_S_right(std::_Rb_tree_node_base*)
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/../../../../hppa2.0-unknown-linux-gnu/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status

The R_PARISC_PCREL17F is close to the start of the cmGlobalGenerator.cxx.o
object.

I see that all the .text.* sections in the various cmake objects are
contained in comdat groups.

Linking with --unique='.text.*' results in a successful link, but I think
this hack probably breaks comdat group and discard support.

I'm not sure how to interpret the linker script when comdat groups are used:
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})

Also, shouldn't .stub be *.stub?