`
luozhonghua2014
  • 浏览: 62731 次
文章分类
社区版块
存档分类
最新评论

ld: warning: cannot find entry symbol _start; defaulting to 00000000080481d8

 
阅读更多

场景:

正常 经过 gcc -oloccheck loccheck.c

[root@luozhonghua 9]# ./loccheck
in main(),pooh=2 and &pooh=0xbfcfa31c
in main(),bah=5 and &bah=0xbfcfa318
------------------------
in main(),pooh=10 and &pooh=0xbfcfa2ec
in main(),bah=2 and &bah=0xbfcfa300


然后想看c中的&pooh地址值的变化

loccheck.c 经 gcc -S loccheck.c

汇编器汇编 as -gstabs -o locckeck1.o loccheck.s

连接器链接

[root@luozhonghua 9]# ld -dynamic-linker /lib/ld-linux.so.2 -lc -o loccheck1 locckeck1.o

ld: warning: cannot find entry symbol _start; defaulting to 00000000080481d8

[root@luozhonghua 9]# ./loccheck1

in main(),pooh=2 and &pooh=0xbfd209ec
in main(),bah=5 and &bah=0xbfd209e8
------------------------
in main(),pooh=10 and &pooh=0xbfd209bc
in main(),bah=2 and &bah=0xbfd209d0
Segmentation fault (core dumped)


警告表示汇编没有从_start开始 ,嗯看看

[root@luozhonghua 9]# cat loccheck.s
.file "loccheck.c"
.section .rodata
.align 4
.LC0:
.string "in main(),pooh=%d and &pooh=%p\n"
.LC1:
.string "in main(),bah=%d and &bah=%p\n"
.LC2:
.string "------------------------"
.text
.globl main
.type main, @function
main:
pushl %ebp
movl %esp, %ebp
andl $-16, %esp
subl $32, %esp
movl $2, 28(%esp)
movl $5, 24(%esp)
movl 28(%esp), %edx
movl $.LC0, %eax
leal 28(%esp), %ecx
movl %ecx, 8(%esp)
movl %edx, 4(%esp)
movl %eax, (%esp)
call printf
movl 24(%esp), %edx
movl $.LC1, %eax
leal 24(%esp), %ecx
movl %ecx, 8(%esp)
movl %edx, 4(%esp)
movl %eax, (%esp)
call printf
movl $.LC2, (%esp)
call puts
movl 28(%esp), %eax
movl %eax, (%esp)
call mikado
movl $0, %eax
leave
ret
.size main, .-main
.globl mikado
.type mikado, @function
mikado:
pushl %ebp
movl %esp, %ebp
subl $40, %esp
movl $10, -12(%ebp)
movl -12(%ebp), %edx
movl $.LC0, %eax
leal -12(%ebp), %ecx
movl %ecx, 8(%esp)
movl %edx, 4(%esp)
movl %eax, (%esp)
call printf
movl 8(%ebp), %edx
movl $.LC1, %eax
leal 8(%ebp), %ecx
movl %ecx, 8(%esp)
movl %edx, 4(%esp)
movl %eax, (%esp)
call printf
leave
ret
.size mikado, .-mikado
.ident "GCC: (GNU) 4.4.7 20120313 (Red Hat 4.4.7-4)"
.section .note.GNU-stack,"",@progbits


ok! 确实没有

使用gcc -S 把原始c汇编成汇编,确实少了_start 开始标志

但依然还是能汇编成正常的可执行文件且结果正常

因此,这里警告依然是没问题的,可忽略,这是工具gcc自身反汇编机制






分享到:
评论

相关推荐

    tomcat报错Unable to find 'struts multipart saveDir解决

    标题中的“tomcat报错Unable to find 'struts multipart saveDir'”是一个常见的问题,通常出现在使用Apache Struts框架,并且在处理multipart/form-data类型的请求时。这种类型的请求通常用于上传文件,而`saveDir`...

    analyzing_borrowers_risk_of_defaulting

    "analyzing_borrowers_risk_of_defaulting"这个项目可能是一个分析借款者违约可能性的案例研究或教程,旨在帮助金融机构、贷款平台或其他相关机构更好地理解并预测潜在客户的信用风险。 首先,我们要了解违约风险...

    netty-transport-native-epoll-4.1.36.Final-linux-x86_64.jar

    java运行依赖jar包

    五子棋 源码

    Defaulting to 0x0502 (Windows Server 2003) 正在编译... SetupDlg.cpp RecordDlg.cpp PenteDlg.cpp c:\documents and settings\kjl801\桌面\vc.net 五子棋源码\pentedlg.cpp(45) : warning C4101: 'szVer' : ...

    JAIN实现简单点对点聊天软件 sip聊天软件 JAIN-sip聊天软件

    eantruntime' was not set, defaulting to build.sysclasspath=last; set to false fo r repeatable builds BUILD SUCCESSFUL Total time: 0 seconds 3.执行命令: java -jar textclient.jar <username> <port> ...

    WSDD + TOMCAT 一键部署Webservices

    [javac] D:\java\wsdd\build.xml:16: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [javac] Compiling 5 source files to D:\java\...

    ActivitiDemo_LFP_HelloWorld实现

    2. SLF4J: Defaulting to no-operation (NOP) logger implementation 3. SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 4. 任务ID:5004 5. 任务名称:HelloWorld 6. ...

    peekaboo:用于主机服务的Onoff Rackspace负载平衡开关

    躲猫猫 用于主机服务的Rackspace负载平衡切换器。 目标:在Rackspace负载平衡器联机或脱机时自动连接和断开应用程序...2014/12/12 06:36:49 $APP_PORT not set, defaulting to 80 2014/12/12 06:36:51 Setting 10.184.

    Simplifying [removed] Writing Modern JavaScript with ES5, ES6, and Beyond pdf

    Select collections with clear goals instead of defaulting to objects or arrays. See how to simplify iterations from complex loops to single line array methods. Master techniques for writing flexible ...

    lammps导热系数计算方法,导热系数的计算,Unix_Linux

    19或许各位有疑问,诶,窝明明固体物理和热统学过啊,如果不计入格点间的非简谐相互作用(即关于位置变化量的3阶项及以上),非谐效应中的热膨胀和热传导是不存在的由于核心思路是通过热流和温度梯度在某段范围内...

    ModernGadgets_1.6.3.rmskin

    ModernGadgets is a set of sleek, minimalist, information-dense gadgets that are designed to fit right into your modern desktop....- Allows process filtering, defaulting to all system-re

    Java邮件开发Fundamentals of the JavaMail API

    If you're viewing this document online, you can click any of the topics below to link directly to that section. 1. Tutorial tips 2 2. Introducing the JavaMail API 3 3. Reviewing related ...

    Android代码-Prop-Editor

    Clicking 'Open File' button opens a [text box] file dialog, defaulting to the sdcard); enter the name of a build.prop type file on the sdcard. (cp /system/build.prop /sdcard/build.prop first) Opening ...

    build-custom-rpm:迪斯科里

    build-custom-rpm/hhvm (r2dev)$ make ... defaulting to Fedora release 20 (Heisenbug)Evia RPM Build RootName:hhvmSummary:HipHop VM (HHVM) is a virtual machine for executing programs written in PHPPackag

    android @override 报错解决方案

    现象: … java: 1801: method does not override a method from its superclass @Override… 原因: Eclipse is defaulting to Java 1.5 and you have classes implementing interface methods (which in Java 1.6 ...

    Linux下命令行安装运行weblogic10.3.6.docx

    Unable to instantiate GUI, defaulting to console mode. ``` 2. **选择安装目录:** - 指定“Middleware Home”目录,即WebLogic的核心安装位置。 ```bash "MiddlewareHome"=[/bea/weblogic] ``` - 如果...

    Lane-GCN代码(轨迹预测)

    LaneGCN,全称为Lane Graph Convolutional Network,是一种用于轨迹预测的深度学习模型,它在自动驾驶、智能交通等领域有着广泛的应用。轨迹预测是解决如何根据历史车辆或行人的运动轨迹,预测其未来可能的路径问题...

    SLF4J日志报错解决办法

    处理slf4j日志使用的基本错误,导入三个包,分别是slf4j-impl,slf4j-api和slf4j-log4j12

    archetype-catalog.xml

    Idea创建的Maven项目出现警告:No archetype found in remote catalog. Defaulting to internal catalog所需要的文件

    报错 代码 经验

    Form action defaulting to 'action' attribute's literal value. ``` **知识点解释:** 1. **问题描述:** - 在此例中,Struts框架未能找到指定的`fileUpLoad.action`配置。 - 这可能是因为配置文件中没有为该...

Global site tag (gtag.js) - Google Analytics