Skip to content

MC-COFF: GlobalAlias is not emitted #8623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
llvmbot opened this issue Sep 28, 2010 · 5 comments
Closed

MC-COFF: GlobalAlias is not emitted #8623

llvmbot opened this issue Sep 28, 2010 · 5 comments
Assignees
Labels
backend:X86 bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Member

llvmbot commented Sep 28, 2010

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

@llvmbot
Copy link
Member Author

llvmbot commented Sep 28, 2010

assigned to @Bigcheese

@llvmbot
Copy link
Member Author

llvmbot commented Sep 28, 2010

Workaround: disable -mconstructor-aliases in clang/lib/Driver/Tools.cpp

@Bigcheese
Copy link
Contributor

Simple fix for the problem.
This seems to fix the problem, however, there may be subtle bugs due to the "real" symbol data being changed later in the object writer.

@llvmbot
Copy link
Member Author

llvmbot commented Oct 7, 2010

Simple fix for the problem.

It seems to work for me. Linking passes.

Although I could close this now, I saw some problems around MC-COFF,
and I cannot confirm it would be really right.

I am trying bootstrapping clang/cygming.
It goes good without -integrated-as.

This seems to fix the problem, however, there may be subtle bugs due to the
"real" symbol data being changed later in the object writer.

I have not met it yet, indeed.

@Bigcheese
Copy link
Contributor

Fixed in r115909.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
Michael137 pushed a commit to Michael137/llvm-project that referenced this issue Apr 30, 2024
…progress-reports

[lldb][progress] Mitigate non-specific LLDB progress reports in Swift
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:X86 bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

2 participants