This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/18403] statically linked app uses
- From: "dave at sr71 dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 12 May 2015 15:22:08 +0000
- Subject: [Bug libc/18403] statically linked app uses
- Auto-submitted: auto-generated
- References: <bug-18403-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18403
--- Comment #1 from Dave Hansen <dave at sr71 dot net> ---
I have a small application:
int main() {
int i;
char msg[] = "hello dave\n";
write(1, msg, sizeof(msg));
sleep(9999);
return 0;
}
Which I compile like this, and run under gdb:
gcc -static -g -o hellodave hellodave.c
I've indicated in comments where the FPU gets used and provided disassembly and
a backtrace.
(gdb) break strlen
Breakpoint 1 at 0x41b2c0
(gdb) start
Temporary breakpoint 2 at 0x400e06: file hellodave.c, line 19.
Starting program: /root/hellodave
Breakpoint 1, 0x000000000041b2c0 in strlen ()
# at this point the FPU is not in use
(gdb) stepi
0x000000000041b2c5 in strlen ()
# The FPU has now been used
(gdb) disassemble strlen
Dump of assembler code for function strlen:
0x000000000041b2c0 <+0>: pxor %xmm8,%xmm8
=> 0x000000000041b2c5 <+5>: pxor %xmm9,%xmm9
0x000000000041b2ca <+10>: pxor %xmm10,%xmm10
...
(gdb) bt
#0 0x000000000041b2c5 in strlen ()
#1 0x00000000004074a6 in getenv ()
#2 0x0000000000439f9e in _dl_non_dynamic_init ()
#3 0x000000000043ad18 in __libc_init_first ()
#4 0x000000000040102c in __libc_start_main ()
#5 0x0000000000400d09 in _start ()
(gdb)
--
You are receiving this mail because:
You are on the CC list for the bug.