lkml.org 
[lkml]   [2004]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [2.6 patch] kill IN_STRING_C
On Mon, Nov 08, 2004 at 02:12:18PM -0500, linux-os wrote:
>
> On this compiler 3.3.3, -O2 will cause it to use strcpy().

Not for me:

.file "test.c"
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "%s"
.text
.p2align 4,,15
.globl test
.type test, @function
test:
pushl %ebp
movl %esp, %ebp
subl $12, %esp
movl %eax, 8(%esp)
movl $.LC0, %eax
movl %eax, 4(%esp)
movl $buf, (%esp)
call sprintf
movl %ebp, %esp
popl %ebp
ret
.size test, .-test
.globl buf
.bss
.align 32
.type buf, @object
.size buf, 128
buf:
.zero 128
.section .note.GNU-stack,"",@progbits
.ident "GCC: (GNU) 3.3.5 (Debian 1:3.3.5-2)"



Are you using exactly my example file?
Are you using the complete gcc command line as shown by "make V=1"?
Which gcc 3.3.3 are you using?


> Cheers,
> Dick Johnson

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.043 / U:1.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site