Articles of GNU

如何比较Gasm(Gnu Assembler)中的string?

我需要使用gasm来计算string中的空间数量。 所以,我写了简单的程序,但比较不起作用。 .section .data str: .string " TEst string wit h spaces \n" .section .text .globl _start _start: movl $0,%eax # %eax – amount of spaces movl $0,%ecx # Starting our counter with zero loop_start: cmpl $32,str(,%ecx,1) # Comparison (this is never true) jne sp incl %eax # Programm never goes there incl %ecx jmp […]

在linux中,如何通过GNU ARM组件来完成系统调用

到目前为止,我只知道如何通过gnu arm assembly退出一个程序。 #exit(0) mov r0, #0 # return code mov r7, #1 # supervisor service number svc # call supervisor service 但是还有很多其他的系统调用,例如read,write,fork ……我想他们每个人都需要不同的服务号码,不同数量的寄存器作为参数,以及如何使用寄存器的不同规则。 我的问题是我可以从哪里获得关于为每个人编写程序集的信息。 我search谷歌,但信息是在这个话题较less。

gnuplot条件码解释

我知道 gnuplot> p 'filename' 会绘制图表 我想知道这个代码是如何运行的 gnuplot> p 'filename' u 10:(($3==4 && $9==1000)?$13:1/0) w lp

代码:块虽然安装,但无法检测到gfortran

我相信我的问题是类似于这个职位: Linux:无法findlgfortran虽然gfortran安装 。 但是,由于build议的答案并不能解决我的问题,除了再次提出这个问题之外,别无select,因为像我这样一个绝望的Linux新手。 这是问题。 我安装了GNU fortran编译器4.8.4,并可以在terminal中find它 $ which gfortran-4.8 /usr/bin/gfortran-4.8 和 $ locate gfortran /usr/bin/gfortran-4.7 /usr/bin/gfortran-4.8 /usr/bin/x86_64-linux-gnu-gfortran-4.7 /usr/bin/x86_64-linux-gnu-gfortran-4.8 /usr/lib/gcc/x86_64-linux-gnu/4.7/libgfortran.a /usr/lib/gcc/x86_64-linux-gnu/4.7/libgfortran.so /usr/lib/gcc/x86_64-linux-gnu/4.7/libgfortran.spec /usr/lib/gcc/x86_64-linux-gnu/4.7/libgfortranbegin.a /usr/lib/gcc/x86_64-linux-gnu/4.8/libgfortran.a /usr/lib/gcc/x86_64-linux-gnu/4.8/libgfortran.so /usr/lib/gcc/x86_64-linux-gnu/4.8/libgfortran.spec /usr/lib/gcc/x86_64-linux-gnu/4.8/libgfortranbegin.a /usr/lib/x86_64-linux-gnu/libgfortran.so.3 /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0 /usr/share/doc/gfortran-4.7 /usr/share/doc/gfortran-4.8 /usr/share/doc/libgfortran-4.7-dev /usr/share/doc/libgfortran-4.8-dev /usr/share/doc/libgfortran3 /usr/share/man/man1/gfortran-4.7.1.gz /usr/share/man/man1/gfortran-4.8.1.gz /usr/share/man/man1/x86_64-linux-gnu-gfortran-4.7.1.gz /usr/share/man/man1/x86_64-linux-gnu-gfortran-4.8.1.gz /var/cache/apt/archives/gfortran-4.7_4.7.3-12ubuntu1_amd64.deb /var/cache/apt/archives/gfortran-4.8_4.8.4-2ubuntu1~14.04_amd64.deb /var/cache/apt/archives/libgfortran-4.7-dev_4.7.3-12ubuntu1_amd64.deb /var/cache/apt/archives/libgfortran-4.8-dev_4.8.4-2ubuntu1~14.04_amd64.deb /var/cache/apt/archives/libgfortran3_4.8.4-2ubuntu1~14.04_amd64.deb /var/lib/dpkg/info/gfortran-4.7.list /var/lib/dpkg/info/gfortran-4.7.md5sums /var/lib/dpkg/info/gfortran-4.8.list /var/lib/dpkg/info/gfortran-4.8.md5sums /var/lib/dpkg/info/libgfortran-4.7-dev:amd64.list /var/lib/dpkg/info/libgfortran-4.7-dev:amd64.md5sums /var/lib/dpkg/info/libgfortran-4.8-dev:amd64.list /var/lib/dpkg/info/libgfortran-4.8-dev:amd64.md5sums /var/lib/dpkg/info/libgfortran3:amd64.list /var/lib/dpkg/info/libgfortran3:amd64.md5sums /var/lib/dpkg/info/libgfortran3:amd64.postinst /var/lib/dpkg/info/libgfortran3:amd64.postrm […]

本地GCC 5二进制文件太大(libexec)

所以我在一个旧的CentOS 6.6发行版,并从源代码编译GCC 5.2。 当我安装它时,它创build了libexec下的5.2.0子文件夹,但是二进制文件cc1和cc1 plus是巨大的! 这是我如何build立它 Using built-in specs. COLLECT_GCC=./gcc COLLECT_LTO_WRAPPER=/usr2/libexec/gcc/i686-redhat-linux-gnu/5.2.0/lto-wrapper Target: i686-redhat-linux-gnu Configured with: ../configure –prefix=/usr2 –disable-multilib –enable-languages=c,c++ –enable-gnu-unique-object –disable-dssi –enable-libstdcxx-threads –enable-libstdcxx-time –enable-shared –enable-__cxa_atexit –disable-libunwind-exceptions –disable-libada –host=i686-redhat-linux-gnu –build=i686-redhat-linux-gnu –target=i686-redhat-linux-gnu –with-default-libstdcxx-abi=gcc4-compatible –with-arch=i686 –enable-linker-build-id –with-system-zlib –with-default-libstdcxx-abi=gcc4-compatible Thread model: posix gcc version 5.2.0 (GCC) 这是发行版4.4.7的ls -rwxr-xr-x 1 root root 8566416 Jul 23 00:19 cc1 -rwxr-xr-x 1 root […]

awk匹配行中的多个正则expression式string和数字

我试图匹配httpd日志文件中的每一行中的多个项目。 线条看起来像这样: 192.168.0.1 – – [06/Apr/2016:16:35:42 +0100] "-" "100" "GET /breacher/gibborum.do?firstnumber=1238100121135&simple=1238100121135&protocol=http&_super=telco1 HTTP/1.1" 200 161 "-" "NING/1.0" 192.168.0.1 – – [06/Apr/2016:16:35:44 +0100] "-" "00" "GET /breacher/gibborum.do?firstnumber=1237037630256&simple=1237037630256&protocol=http&_super=telco1 HTTP/1.1" 200 136 "-" "NING/1.0" 192.168.0.1 – – [06/Apr/2016:16:35:44 +0100] "-" "00" "GET /breacher/gibborum.do?firstnumber=1238064400578&simple=1238064400578&protocol=http&_super=telco1 HTTP/1.1" 200 136 "-" "NING/1.0" 我想提取数字,时间戳和_supervariables的值。 到目前为止,我可以提取数字和时间戳: awk '{match ($0, /123([0-9]+)/, arr); print $4, arr[0]}' 请如何在_super […]

在make规则中使用时,如何让MAKEFILE在string中保留反斜杠序列?

这是我在Stackoverflow的第一个问题,所以请原谅我,如果我问任何可笑的:D。 问题: 假设我想编译一个在“my dir /”目录下的程序,里面有一个空格。 说程序的path是“我的dir / test.c”。 以下是我正在尝试的示例makefile: CC = gcc DIR = my\ dir $(DIR)/test.out: $(DIR)/test.c # $(CC) $< -o $@ $(CC) $(DIR)/test.c -o $(DIR)/test.out 正如你所看到的,在最后一行(第5行)中,我已经分别直接写入了源文件和输出文件的path名,分别写在前提条件和目标文件中。 这样做的工作正常,因为它产生的命令: gcc my \ dir / test.c -o my \ dir / test.out 这是一种将文件名(包含空格)传递给gcc或任何其他shell命令的语法正确的方法。 第二行(第四行)是问题所在(注释行)。 我已经使用自动variables$ @(目标)和$ <(第一个也是唯一的先决条件)产生gcc的文件名参数,我希望是 我的\ dir / test.out和我的\ dir / test.c ,分别。 但是在这里,出于某种原因,生成的文件名是我的dir […]

所有用户名的Postfix别名?

有什么你可以放在/ etc /别名,这将使后缀发送所有的邮件给一个用户,不pipe用户名是什么?

Bash脚本:如何重命名文件以删除数字字符?

mv命令不接受类似grep的模式匹配! 什么是处理这种类似的操作的好方法?

有关GNU链接器编辑器“ld”的问题?

我有2个与GNU汇编的obj文件,它们是: 敖:我的主要节目 bo:一些实用function ao没有入口点。 最终的链接文件将被加载到内存中,并且执行将跳转到其开始加载的地址,其中第一个指令是 现在我想用GNU ld把它们连起来。 我想在最后的文件中出现在bo之前。 我怎么能控制这个? 我是否必须制作一个自定义部分,并在链接器脚本中写入如下内容: SECTIONS { . = 0x7c00; .text : { *(.text) } .my_custom_section : { *(.my_custom_section) } .data : { *(.data) } .bss : { *(.bss) } } OUTPUT_FORMAT(binary) 更新 这个问题有什么问题吗? 我发错了吗? 如果是这样,请让我知道,伙计们。 非常感谢。 目前,我发现input文件的命令行序列似乎是相关的。 如果我这样做: ld ao bo -o final.bin 来自ao的内容将在bo之前出现 如果我这样做: ld bo ao -o […]