Skip to content

MC-COFF: GlobalAlias is not emitted #8623

Closed
@llvmbot

Description

@llvmbot
Bugzilla Link 8251
Resolution FIXED
Resolved on Oct 07, 2010 01:30
Version trunk
OS All
Reporter LLVM Bugzilla Contributor
CC @Bigcheese

Extended Description

clang++ emits aliases for dtors.
(eg. __ZN4llvm5RegexD1Ev and __ZN4llvm5RegexD2Ev)
and compilation fails with -integrated-as.

define void @​foo() {
entry:
ret void
}

@​bar =global i32 zeroinitializer

@​qux = alias void ()* @​foo
@​quux = alias i32* @​bar

$ llc -mtriple=i686-mingw32 -filetype=obj (incorrect)

SYMBOL TABLE:
[ 0](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .text
AUX scnlen 0x4 nreloc 0 nlnno 0 checksum 0x0 assoc 1 comdat 0
[ 2](sec 2)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .data
AUX scnlen 0x4 nreloc 0 nlnno 0 checksum 0x0 assoc 2 comdat 0
[ 4](sec 1)(fl 0x00)(ty 200)(scl 2) (nx 0) 0x00000000 _foo
[ 5](sec 2)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 _bar

$ llc -mtriple=i686-mingw32

    .globl  _qux

_qux = _foo
.globl _quux
_quux = _bar

$ as (mingw's GNU as; correct)

SYMBOL TABLE:
[ 0](sec -2)(fl 0x00)(ty 0)(scl 103) (nx 1) 0x00000000 fake
File
[ 2](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .text
AUX scnlen 0x1 nreloc 0 nlnno 0
[ 4](sec 2)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .data
AUX scnlen 0x4 nreloc 0 nlnno 0
[ 6](sec 3)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .bss
AUX scnlen 0x0 nreloc 0 nlnno 0
[ 8](sec 1)(fl 0x00)(ty 200)(scl 2) (nx 0) 0x00000000 _foo
[ 9](sec 2)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 _bar
[ 10](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 _qux
[ 11](sec 2)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 _quux

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions