我编写了可以编译的汇编代码:
as power.s -o power.o
Run Code Online (Sandbox Code Playgroud)
当我链接power.o目标文件时出现问题:
ld power.o -o power
Run Code Online (Sandbox Code Playgroud)
为了在64位操作系统(Ubuntu 14.04)上运行,我.code32在power.s文件的开头添加了,但是我仍然得到错误:
分段故障(核心转储)
power.s:
.code32
.section .data
.section .text
.global _start
_start:
pushl $3
pushl $2
call power
addl $8, %esp
pushl %eax
pushl $2
pushl $5
call power
addl $8, %esp
popl %ebx
addl %eax, %ebx
movl $1, %eax
int $0x80
.type power, @function
power:
pushl %ebp
movl %esp, %ebp
subl $4, %esp
movl 8(%ebp), %ebx
movl 12(%ebp), %ecx
movl %ebx, -4(%ebp)
power_loop_start:
cmpl …Run Code Online (Sandbox Code Playgroud) 使用df -Th显示/文件夹使用率 100%:
[root@gridtb007 ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext4 60G 58G 0 100% /
tmpfs tmpfs 24G 0 24G 0% /dev/shm
/dev/sda1 ext4 1008M 62M 896M 7% /boot
/dev/sda6 ext4 183G 188M 173G 1% /scratch
/dev/sda5 ext4 9.7G 150M 9.0G 2% /var/cache/openafs
/dev/sdb1 ext4 917G 526G 346G 61% /data
AFS afs 8.6G 0 8.6G 0% /afs
Run Code Online (Sandbox Code Playgroud)
然后,我删除了/rootdir,但是df -TH仍然显示/文件夹使用率 100%。我使用lsof | grep …