LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1085 - Section printed into .ll file
Summary: Section printed into .ll file
Status: RESOLVED FIXED
Alias: None
Product: tools
Classification: Unclassified
Component: llvm-g++ (show other bugs)
Version: trunk
Hardware: PC Linux
: P normal
Assignee: Chris Lattner
URL:
Keywords: compile-fail
Depends on:
Blocks: 1067
  Show dependency tree
 
Reported: 2007-01-06 15:56 PST by Anton Korobeynikov
Modified: 2018-11-07 00:17 PST (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments
Preprocessed source (84.98 KB, application/octet-stream)
2007-01-06 15:57 PST, Anton Korobeynikov
Details
Resulted .ll (4.52 KB, application/octet-stream)
2007-01-06 15:58 PST, Anton Korobeynikov
Details
Slightly reduced source (1.44 KB, text/plain)
2007-01-06 18:11 PST, Anton Korobeynikov
Details
x86-linux bytecode for test case (5.21 KB, application/octet-stream)
2007-01-08 11:14 PST, Reid Spencer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Korobeynikov 2007-01-06 15:56:13 PST
Attached source (from Qt) will cause sections of form "gnu.linkonce.t" to be
printed into resulting LLVM bytecode (e.g. when compiling with -emit-llvm -S).

This causes misc linker problems.

A quick workaround was introduced:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070101/042142.html

It should be reverted after this bug fixed.
Comment 1 Anton Korobeynikov 2007-01-06 15:57:52 PST
Created attachment 543 [details]
Preprocessed source
Comment 2 Anton Korobeynikov 2007-01-06 15:58:14 PST
Created attachment 544 [details]
Resulted .ll
Comment 3 Anton Korobeynikov 2007-01-06 18:11:06 PST
Created attachment 545 [details]
Slightly reduced source

llvm-g++ -S -emit-llvm test.ii -o - | grep "gnu.linkonce.t"
Comment 4 Chris Lattner 2007-01-06 18:33:57 PST
This is a ELF-specific bug in the C++ FE.  Patch sent to llvm-commits, testcase here:
Regression/C++Frontend/2007-01-06-ELF-Thunk-Sections.cpp

-Chris
Comment 5 Anton Korobeynikov 2007-01-06 18:47:31 PST
Workaround was removed as well.
Comment 7 Reid Spencer 2007-01-07 23:06:50 PST
This is not fixed. The Regression/C++Frontend/2007-01-06-ELF-Thunk-Sections.cpp
test case fails on Linux at least. The "not grep" part of it is failing.

Comment 8 Anton Korobeynikov 2007-01-08 08:49:38 PST
Hmm. Strange. I've got linker errors due to presense of such sections. Now:

1. Sections go away
2. There are no linker errors.

Will check the testcase.
Comment 9 Anton Korobeynikov 2007-01-08 10:35:31 PST
Reid, could you please attach the LLVM bytecode generated by llvm-g++ from the
testcase?
Comment 10 Reid Spencer 2007-01-08 11:14:35 PST
Created attachment 549 [details]
x86-linux bytecode for test case

This bytecode file provides the output of llvm-gcc for x86-linux where the test
case fails.
Comment 11 Chris Lattner 2007-01-08 15:01:36 PST
This fixes the fix.  Reid, plz verify and remove the xfail from the testcase if ok now.

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070108/042246.html

Thanks,

-Chris
Comment 12 Reid Spencer 2007-01-08 18:06:14 PST
Works now.