共享库与反汇编

#include <stdlib.h> #include <stdio.h>
void hello(const char* name)
{
    printf("Hello %s!\n", name);
}

static char *hello_global = "hello global";

void helloGlobal(void)
{
	printf("%s\n",hello_global);
}

void helloLocal(void)
{
	static char *hello_local = "hello local";

	printf("%s\n",hello_local);
}
000003bc <hello>:
 3bc:	4601      	mov	r1, r0
 3be:	4802      	ldr	r0, [pc, #8]	; (3c8 <hello+0xc>)
 3c0:	4478      	add	r0, pc
 3c2:	f000 b813 	b.w	3ec <sub+0x4>
 3c6:	bf00      	nop
 3c8:	00000058 	andeq	r0, r0, r8, asr r0

000003cc <helloGlobal>:
 3cc:	4801      	ldr	r0, [pc, #4]	; (3d4 <helloGlobal+0x8>)
 3ce:	4478      	add	r0, pc
 3d0:	f000 b814 	b.w	3fc <sub+0x14>
 3d4:	00000055 	andeq	r0, r0, r5, asr r0

000003d8 <helloLocal>:
 3d8:	4801      	ldr	r0, [pc, #4]	; (3e0 <helloLocal+0x8>)
 3da:	4478      	add	r0, pc
 3dc:	f000 b80e 	b.w	3fc <sub+0x14>
 3e0:	00000056 	andeq	r0, r0, r6, asr r0

转载于:https://my.oschina.net/rinehart/blog/148939

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值