This is sources Bugzilla
Bugzilla Version 2.17.5
Bugzilla Bug 246
  Can't mix comdat group with linkonce section Last modified: 2004-07-02 14:33
     Query page      Enter new bug
Bug#: 246   Hardware:   Reporter: H.J. Lu <hjl.tools@gmail.com>
Host: Target: Build:
Product:     Add CC:
Component:   Version:   CC:
Remove selected CCs
Status: RESOLVED   Priority:  
Resolution: DUPLICATE of bug 161   Severity:  
Assigned To: unassigned@sources.redhat.com   Target Milestone:  
Summary:
Keywords:

Attachment Description Type Created Actions
bug.tar.gz A testcase application/octet-stream 2004-06-30 18:15 Edit None
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 246 depends on: Show dependency tree
Show dependency graph
Bug 246 blocks:

Additional Comments:


Leave as RESOLVED DUPLICATE
Reopen bug
Mark bug as VERIFIED

View Bug Activity   |   Format For Printing


Description:   Last confirmed: 0000-00-00 00:00 Opened: 2004-06-30 18:13
If gcc is modified to use comdat group instead of linkonce section. It
may generate code like:

        .section        .text,"axG",@progbits,.__i686.get_pc_thunk.bx,comdat
.globl __i686.get_pc_thunk.bx
        .hidden __i686.get_pc_thunk.bx
        .type   __i686.get_pc_thunk.bx, @function
__i686.get_pc_thunk.bx:

instead of

        .section        .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
.globl __i686.get_pc_thunk.bx
        .hidden __i686.get_pc_thunk.bx
        .type   __i686.get_pc_thunk.bx,@function
__i686.get_pc_thunk.bx:

The new gcc should work with the libraris compiled with the
oldler gcc. But the current linker doesn't support mixing
comdat group with linkonce section. I think the linker should
match a member of a COMDAT group with a single member with a
linkonce section.

------- Additional Comment #1 From H.J. Lu 2004-06-30 18:15 -------
Created an attachment (id=122)
A testcase

[hjl@gnu 1]$ make
LD=/export/build/gnu/binutils-debug/build-i686-linux/ld/ld-new/export/build/gnu/binutils-debug/build-i686-linux/ld/ld-new
-o 1a.o x1.o y1.o
y1.o(.text[.__i686.get_pc_thunk.bx]+0x0): In function `__i686.get_pc_thunk.bx':

: multiple definition of `__i686.get_pc_thunk.bx'
x1.o(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): first defined here
/export/build/gnu/binutils-debug/build-i686-linux/ld/ld-new: warning: cannot
find entry symbol _start; defaulting to 08048074
make: [1a.o] Error 1 (ignored)
/export/build/gnu/binutils-debug/build-i686-linux/ld/ld-new -r -o 1a.o x1.o
y1.oy1.o(.text[.__i686.get_pc_thunk.bx]+0x0): In function
`__i686.get_pc_thunk.bx':
: multiple definition of `__i686.get_pc_thunk.bx'
x1.o(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): first defined here
make: *** [1a.o] Error 1

------- Additional Comment #2 From H.J. Lu 2004-07-02 14:33 -------

*** This bug has been marked as a duplicate of 161 ***

     Query page      Enter new bug
Actions: New | Query | bug # | Reports | Requests   New Account | Log In