Skip to content

llvm-ld does not support linking archives with mixed .bc and .o objects #2282

@llvmbot

Description

@llvmbot
Bugzilla Link 1910
Resolution WONTFIX
Resolved on Oct 15, 2008 11:31
Version unspecified
OS Linux
Attachments file 1, file 2, file 3
Reporter LLVM Bugzilla Contributor

Extended Description

Given the three attached files, this sequence of commands should show the problem:

[tomas@myhost llbug1]$ llvm-as bug1.ll
[tomas@myhost llbug1]$ llvm-as bug2.ll
[tomas@myhost llbug1]$ gcc bug.c -c
[tomas@myhost llbug1]$ llvm-ld -native -o=first bug1.bc bug2.bc bug.o
[tomas@myhost llbug1]$ ./first
42 123
[tomas@myhost llbug1]$ llvm-ar rsv bug.a bug2.bc bug.o
llvm-ar: creating bug.a
[tomas@myhost llbug1]$ llvm-ld -native -o=second bug1.bc bug.a
/tmp/ccy317Eb.o: In function main': (.text+0x5): undefined reference to getint_c'
collect2: ld returned 1 exit status
llvm-ld:
[tomas@myhost llbug1]$

would be really nice if this worked!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillawontfixIssue is real, but we can't or won't fix it. Not invalid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions