http://www.llvm.org/bugs/show_bug.cgi?id=6364
Summary: gcc option -fno-toplevel-reorder separates top level
inline asm which affects eglibc
Product: libraries
Version: trunk
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: enhancement
Priority: P5
Component: Common Code Generator Code
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Estimated Hours: 0.0
Created an attachment (id=4261)
--> (http://www.llvm.org/bugs/attachment.cgi?id=4261)
source used to create crt code in eglibc
-fno-toplevel-reorder option is used with by eglibc library (libc/csu) to
generate init/fini code for ctr*.
> llvm-gcc initfini.c -c -std=gnu99 -fgnu89-inline -O0 -Wall -Winline
> -Wwrite-strings -fmerge-all-constants -Wstrict-prototypes
> -mpreferred-stack-boundary=4 -DHAVE_INITFINI -S -g0 -fPIC
> -fno-inline-functions -fno-toplevel-reorder -fno-section-anchors
> -finhibit-size-directive -fno-exceptions -o initfini.s
C source file comes with inlined asm having special markup. C is compiled into
asm and then gawk is used to strip different parts for different crt* files.
However, llvm outputs all top level inlined asm separately in
AsmPrinter::doInitialization, and after it outputs all functions. Which results
in eglibc fail to build with llvm.
initfini.c fragment:
asm (".section " ".init" );
extern void __attribute__ ((section (".init"))) _init (void);
void
_init (void)
{
call_gmon_start ();
asm ("ALIGN");
asm("END_INIT");
asm ("\n/*...@_init_prolog_ends*/");
asm ("\n/*...@_init_epilog_begins*/");
asm (".section " ".init" );
}
asm ("END_INIT");
asm ("\n/*...@_init_epilog_ends*/");
asm ("\n/*...@_fini_prolog_begins*/");
--
Configure bugmail: http://www.llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are watching all bug changes.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs