Skip to content

clang keeps frame pointers by default on linux x86_64 #11938

@llvmbot

Description

@llvmbot
Bugzilla Link 11566
Resolution DUPLICATE
Resolved on Dec 14, 2011 13:34
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor
CC @efriedma-quic

Extended Description

given

void g(void);
void f(void) {
g();
g();
}

"gcc -c foo.c -Os -o foo.o" will produce

push %rax
callq 6 <f+0x6>
pop %rdx
jmpq c <f+0xc>

(no idea what gcc is doing with rax/rdx).

"clang -c foo.c -Os -o foo.o" produces

push %rbp
mov %rsp,%rbp
callq 9 <f+0x9>
pop %rbp
jmpq f <f+0xf>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:driver'clang' and 'clang++' user-facing binaries. Not 'clang-cl'duplicateResolved as duplicate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions