public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67834] New: [5 Regression] Local references inside comdat groups
@ 2015-10-03 21:39 danglin at gcc dot gnu.org
2015-10-05 22:16 ` [Bug c++/67834] " danglin at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: danglin at gcc dot gnu.org @ 2015-10-03 21:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67834
Bug ID: 67834
Summary: [5 Regression] Local references inside comdat groups
Product: gcc
Version: 5.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: danglin at gcc dot gnu.org
Target Milestone: ---
Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
Build: hppa-unknown-linux-gnu
Created attachment 36442
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36442&action=edit
Preprocessed source
With the switch to gcc-5 on Debian, we are seeing a number of c++ packages
fail to build with the following error:
_ZXXX referenced in section `.data.rel.ro.local' of YYY: defined in discarded
section `.text._ZXXX
Here is the assembler code for _ZN3uhd9transport3sphL19handle_overflow_nopEv:
.section
.text._ZN3uhd9transport3sphL19handle_overflow_nopEv,"axG",@progbits,_ZN3uhd9transport3sph19recv_packet_handler6resizeEj,comdat
.align 4 .type _ZN3uhd9transport3sphL19handle_overflow_nopEv,
@function
.LFB8296:
.file 6
"/home/dave/debian/uhd/uhd-3.9.1/host/lib/usrp/usrp1/../../transport/super_recv_packet_handler.hpp"
.loc 6 61 0
.cfi_startproc
_ZN3uhd9transport3sphL19handle_overflow_nopEv:
.PROC
.CALLINFO FRAME=0,NO_CALLS
.ENTRY
bv,n %r0(%r2)
.EXIT
.PROCEND .cfi_endproc
.LFE8296:
.size _ZN3uhd9transport3sphL19handle_overflow_nopEv,
.-_ZN3uhd9transport3sphL19handle_overflow_nopEv
Subsequently, there is a reference from a plabel in .data.rel.ro.local:
.section .data.rel.ro.local
.align 4
.LC135:
.word P%_ZN3uhd9transport3sphL19handle_overflow_nopEv
COMDAT group section [ 10] `.group'
[_ZN3uhd9transport3sph19recv_packet_handler6resizeEj] contains 2 sections:
[Index] Name
[ 581] .text._ZN3uhd9transport3sphL19handle_overflow_nopEv
[ 1282] .text._ZN3uhd9transport3sph19recv_packet_handler6resizeEj
It is my understanding that local references into COMDAT groups are not
allowed.
HPPA is probably particularly sensitive to this because of the "P" PLABEL32
reloc.
Compile command:
/usr/bin/c++ -DHAVE_CONFIG_H -DIHEX_USE_STDBOOL -DUHD_DLL_EXPORTS
-DUHD_IMAGES_DIR=OFF -DUHD_VERSION=30901 -g -O2 -Wformat
-Werror=format-security -D_FORTIFY_SOURCE=2 -fvisibility=hidden
-fvisibility-inlines-hidden -fPIC
-I/home/dave/debian/uhd/uhd-3.9.1/build/include
-I/home/dave/debian/uhd/uhd-3.9.1/host/include
-I/home/dave/debian/uhd/uhd-3.9.1/build/lib/ic_reg_maps
-I/home/dave/debian/uhd/uhd-3.9.1/host/lib/convert
-I/home/dave/debian/uhd/uhd-3.9.1/build/lib/convert
-I/home/dave/debian/uhd/uhd-3.9.1/build/lib/transport/nirio/lvbitx
-I/usr/include/libusb-1.0 -I/home/dave/debian/uhd/uhd-3.9.1/host/lib/usrp
-I/home/dave/debian/uhd/uhd-3.9.1/host/lib/usrp/cores
-I/home/dave/debian/uhd/uhd-3.9.1/host/../firmware/fx2/common
-I/home/dave/debian/uhd/uhd-3.9.1/host/lib/usrp/common
-I/home/dave/debian/uhd/uhd-3.9.1/host/lib/usrp/common/ad9361_driver -Wall
-Wextra -Wsign-compare -o CMakeFiles/uhd.dir/usrp/usrp1/io_impl.cpp.o -c
/home/dave/debian/uhd/uhd-3.9.1/host/lib/usrp/usrp1/io_impl.cpp
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/67834] [5 Regression] Local references inside comdat groups
2015-10-03 21:39 [Bug c++/67834] New: [5 Regression] Local references inside comdat groups danglin at gcc dot gnu.org
@ 2015-10-05 22:16 ` danglin at gcc dot gnu.org
2015-10-05 22:29 ` danglin at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: danglin at gcc dot gnu.org @ 2015-10-05 22:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67834
--- Comment #1 from John David Anglin <danglin at gcc dot gnu.org> ---
This issue now breaks gcc build:
`.LC2' referenced in section
`.gnu.linkonce.t._ZN21mem_alloc_descriptionI9mem_us
ageED1Ev' of build/hash-table.o: defined in discarded section
`.gnu.linkonce.r._
ZN10hash_tableIN8hash_mapIPKv14mem_usage_pairI9mem_usageE21simple_hashmap_traits
I19default_hash_traitsIS2_EEE10hash_entryE11xcallocatorE6expandEv.str1.4' of
bui
ld/hash-table.o
This is with trunk revision 228461. Occurs in stage2.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/67834] [5 Regression] Local references inside comdat groups
2015-10-03 21:39 [Bug c++/67834] New: [5 Regression] Local references inside comdat groups danglin at gcc dot gnu.org
2015-10-05 22:16 ` [Bug c++/67834] " danglin at gcc dot gnu.org
@ 2015-10-05 22:29 ` danglin at gcc dot gnu.org
2015-10-11 22:08 ` danglin at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: danglin at gcc dot gnu.org @ 2015-10-05 22:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67834
--- Comment #2 from John David Anglin <danglin at gcc dot gnu.org> ---
Re comment #2, this is with --disable-comdat added to configure command:
../gcc/configure --with-gnu-as --with-gnu-ld --enable-shared --enable-multiarch
--enable-linker-build-id --build=hppa-linux-gnu --host=hppa-linux-gnu
--target=hppa-linux-gnu --prefix=/home/dave/opt/gnu/gcc/gcc-6
--with-local-prefix=/home/dave/opt/gnu --disable-comdat --enable-threads=posix
--enable-__cxa_atexit --build=hppa-linux-gnu --enable-clocale=gnu
--enable-java-gc=boehm
--enable-languages="c,c++,objc,fortran,obj-c++,java,ada,lto"
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/67834] [5 Regression] Local references inside comdat groups
2015-10-03 21:39 [Bug c++/67834] New: [5 Regression] Local references inside comdat groups danglin at gcc dot gnu.org
2015-10-05 22:16 ` [Bug c++/67834] " danglin at gcc dot gnu.org
2015-10-05 22:29 ` danglin at gcc dot gnu.org
@ 2015-10-11 22:08 ` danglin at gcc dot gnu.org
2015-10-12 14:27 ` danglin at gcc dot gnu.org
2015-10-16 8:28 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: danglin at gcc dot gnu.org @ 2015-10-11 22:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67834
John David Anglin <danglin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #3 from John David Anglin <danglin at gcc dot gnu.org> ---
The ELF specification says "To facilitate removing a group without leaving
dangling references and with only minimal processing of the symbol table, the
following rules are followed.
References to the sections comprising a group from sections outside of the
group must be made through symbol table entries with STB_GLOBAL or STB_WEAK
binding and section index SHN_UNDEF."
The label _ZN3uhd9transport3sphL19handle_overflow_nopEv is not globalized.
Probably, TREE_PUBLIC is not being set or there needs to be an addition
check added to assemble_start_function to globalize COMDAT functions. Jason,
could you take a look?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/67834] [5 Regression] Local references inside comdat groups
2015-10-03 21:39 [Bug c++/67834] New: [5 Regression] Local references inside comdat groups danglin at gcc dot gnu.org
` (2 preceding siblings ...)
2015-10-11 22:08 ` danglin at gcc dot gnu.org
@ 2015-10-12 14:27 ` danglin at gcc dot gnu.org
2015-10-16 8:28 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: danglin at gcc dot gnu.org @ 2015-10-12 14:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67834
--- Comment #4 from John David Anglin <danglin at gcc dot gnu.org> ---
I suppose this is a package bug but it is present in a number
of packages:
static inline void handle_overflow_nop(void){}
class recv_packet_handler{
public:
...
private:
vrt_unpacker_type _vrt_unpacker;
size_t _header_offset_words32;
double _tick_rate, _samp_rate;
bool _queue_error_for_next_call;
size_t _alignment_faulure_threshold;
rx_metadata_t _queue_metadata;
struct xport_chan_props_type{
xport_chan_props_type(void):
packet_count(0),
handle_overflow(&handle_overflow_nop),
fc_update_window(0)
{}
get_buff_type get_buff;
issue_stream_cmd_type issue_stream_cmd;
size_t packet_count;
handle_overflow_type handle_overflow;
handle_flowctrl_type handle_flowctrl;
size_t fc_update_window;
};
...
};
Should there be a warning about a potential dangling reference?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/67834] [5 Regression] Local references inside comdat groups
2015-10-03 21:39 [Bug c++/67834] New: [5 Regression] Local references inside comdat groups danglin at gcc dot gnu.org
` (3 preceding siblings ...)
2015-10-12 14:27 ` danglin at gcc dot gnu.org
@ 2015-10-16 8:28 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-10-16 8:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67834
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |5.3
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-16 8:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-03 21:39 [Bug c++/67834] New: [5 Regression] Local references inside comdat groups danglin at gcc dot gnu.org
2015-10-05 22:16 ` [Bug c++/67834] " danglin at gcc dot gnu.org
2015-10-05 22:29 ` danglin at gcc dot gnu.org
2015-10-11 22:08 ` danglin at gcc dot gnu.org
2015-10-12 14:27 ` danglin at gcc dot gnu.org
2015-10-16 8:28 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).