cat /etc/redhat-release看到操作系统是CentOS Linux release 7.6.1810,uname -r看到内核版本是3.10.0-957.el7.x86_64,as --version看到as的版本是2.27-34.base.el7,ld --version看到ld的版本是2.27-34.base.el7。

absCallWithStart.s里边的代码如下:
.section .data
.global _start
.section .text
_start:
movq $-5,%rdi
call abs
movq %rax,%rdi
movq $0x3c,%rax
syscall
这一段代码主要是求-5的绝对值。
as absCallWithStart.s -o absCallWithStart.o进行汇编。
ld absCallWithStart.o -static -lc -o absCallWithStart进行链接,报错ld: cannot find -lc。

sudo yum install -y glibc-static安装glibc-static。

ld absCallWithStart.o -static -lc -o absCallWithStart再次进行链接,./absCallWithStart进行执行,echo $?查看一下返回值。




![自然语言处理文本分割[Text segmentation]:PoNet算法使用多粒度Pooling结构替代attention的网络](https://img-blog.csdnimg.cn/d553c7dadca54bdb82a3a234befb74d8.png#pic_center)















