|
|
|
Re: [linux-assembly] Declare strings on stack, gas | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
When a local array of char is declared in C, i.e. something like:
void foo()
{
char s[] = "hello world";
}
The compiler does just the same thing as you by MOVL, and when the
string is rather long, the compiler would place the string in .data and
call memcpy() to copy it to stack.
On 04/18/2012 10:58 PM, Daniel Hilst wrote:
Is possible to declare strings on stack? I'm using mov + ebp offsets to do something like that.. Is there an easier way to do it? Here is an sample off how I'm doing it: http://sprunge.us/UUZI The hex numbers are a "Hello World" string.. I have tried .assci without success :( Thanks in advance!
-- Regards, Zhongye -- To unsubscribe from this list: send the line "unsubscribe linux-assembly" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
[Kernel Newbies] [Security] [Linux C Programming] [Linux for Hams] [DCCP] [Netfilter] [Bugtraq] [Photo] [Yosemite] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux RAID] [Linux Admin] [Samba] [Video 4 Linux]
![]() |