gnu

1b and 1f in GNU assembly

末鹿安然 提交于 2019-12-03 07:37:50
I am analyzing a linux exception code. By the way I can't understand gnu assembly syntax. svc_preempt: mov r8, lr 1: bl preempt_schedule_irq @ irq en/disable is done inside ldr r0, [tsk, #TI_FLAGS] @ get new tasks TI_FLAGS tst r0, #_TIF_NEED_RESCHED moveq pc, r8 @ go again b 1b In this code, I can see "b 1b", but I can't find "1b" label anywhere. And, #ifdef CONFIG_NEON adr r6, .LCneon_thumb_opcodes b 2f #endif call_fpe: #ifdef CONFIG_NEON adr r6, .LCneon_arm_opcodes 2: ldr r7, [r6], #4 @ mask value cmp r7, #0 @ end mask? beq 1f and r8, r0, r7 ldr r7, [r6], #4 @ opcode bits matching in mask

LD_LIBRARY_PATH doesn't seem to work

好久不见. 提交于 2019-12-03 07:09:53
I'm trying to compile a test file: gcc -o test test.c -lg2c but I get the error: /usr/bin/ld: cannot find -lg2c If I use: gcc -o test test.c -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6 -lg2c then it works fine. So I added the path like so: LD_LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/3.4.6:$LD_LIBRARY_PATH and when I use $LD_LIBRARY_PATH it's listed there, but: gcc -o test test.c -lg2c still doesn't work, it gives the same error, I can't figure out why. I'm using CentOS (2.6.32-279.9.1.el6.x86_64), any help would be greatly appreciated. EDIT : compiler version: rpm -qa | grep gcc gcc-4.4.6-4

How can I record what process or kernel activity is using the disk in GNU/Linux?

我只是一个虾纸丫 提交于 2019-12-03 06:51:15
问题 On a particular Debian server, iostat (and similar) report an unexpectedly high volume (in bytes) of disk writes going on. I am having trouble working out which process is doing these writes. Two interesting points: Tried turning off system services one at a time to no avail. Disk activity remains fairly constant and unexpectedly high. Despite the writing, do not seem to be consuming more overall space on the disk. Both of those make me think that the writing may be something that the kernel

What are the differences between regular expression syntaxes for different tools? [closed]

不羁岁月 提交于 2019-12-03 06:23:28
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Different tools implement regular expressions differently. For example to match "foo" or "bar": printf "%s\n" foo bar baz food | grep -o '\<\(fo\+\|bar\)\>' printf "%s\n" foo bar baz food | awk '/\<(fo+|bar)\>/' printf "%s\n" foo bar baz food | sed -n '/\<\(fo\+\|bar\)\>/p' printf "%s\n" foo bar baz food | sed

How to get all fields in outer join with Unix join?

瘦欲@ 提交于 2019-12-03 06:20:52
Suppose that I have two files, en.csv and sp.csv , each containing exactly two comma-separated records: en.csv : 1,dog,red,car 3,cat,white,boat sp.csv : 2,conejo,gris,tren 3,gato,blanco,bote If I execute join -t, -a 1 -a 2 -e MISSING en.csv sp.csv the output I get is: 1,dog,red,car 2,conejo,gris,tren 3,cat,white,boat,gato,blanco,bote Notice that all the missing fields have been collapsed. To get a "proper" full outer join, I need to specify a format; thus join -t, -a 1 -a 2 -e MISSING -o 0,1.2,1.3,1.4,2.2,2.3,2.4 en.csv sp.csv yields 1,dog,red,car,MISSING,MISSING,MISSING 2,MISSING,MISSING

Get GNU C Compiler working on iOS 6.x

橙三吉。 提交于 2019-12-03 06:08:10
问题 I have a jailbroken (evasi0n) 4th generation iPad, with iOS 6.1 firmware. Through Cydia I've installed Mobile Terminal, version 520-2. Then, following this tutorial, I've downloaded and installed CSU, Link Identify Editor, LibGCC, GCC and Headers/Libraries. During installation there were not any problems. The tutorial and the project are updated respectively to Feb 15, 2012 and Feb 18, 2012, so they work fine till iOS 5.x (I've tested the procedure on my iPhone 4S, iOS 5.1.1 and it works, so

Bash arrays and negative subscripts, yes or no?

浪尽此生 提交于 2019-12-03 05:51:42
The GNU bash manual tells me An indexed array is created automatically if any variable is assigned to using the syntax name[subscript]=value The subscript is treated as an arithmetic expression that must evaluate to a number. If subscript evaluates to a number less than zero, it is used as an offset from one greater than the array’s maximum index (so a subcript of -1 refers to the last element of the array). So I figure I will give it a try and get the following result: $ muh=(1 4 'a' 'bleh' 2) $ echo $muh 1 $ echo ${muh[*]} 1 4 a bleh 2 # so far so good so now I'll try a negative ... $ echo $

GNU C和ANSI C函数库的区别

倖福魔咒の 提交于 2019-12-03 04:45:20
glibc和libc都是Linux下的C函数库, libc是Linux下的ANSI C的函数库; glibc是Linux下的GUN C的函数库; ANSI C和GNU C有什么区别呢? ANSI C是基本的C语言函数库,包含了C语言最基本的库函数。这个库可以根据 头文件划分为 15 个部分,其中包括: <ctype.h>:包含用来测试某个特征字符的函数的函数原型,以及用来转换大小写字母的函数原型; <errno.h>:定义用来报告错误条件的宏; 浮点常数 (<float.h>):包含系统的浮点数大小限制; 数学常数 (<math.h>):包含数学库函数的函数原型; 标准定义 (<stddef.h>:包含执行某些计算C所用的常见的函数定义; 标准 I/O (<stdio.h>):包含标准输入输出库函数的函数原型,以及他们所用的信息; 工具函数 (<stdlib.h>):包含数字转换到文本以及文本转换到数字的函数原型,还有内存分配、随机数字以及其他实用函数的函数原型; 字符串操作 (<string.h>)、:包含字符串处理函数的函数原型; 时间和日期 (<time.h>):包含时间和日期操作的函数原型和类型; 可变参数表 (<stdarg.h>):定义宏,用于处理未知数值和类型的函数的参数列表; 信号 (<signal.h>):包含函数原型和宏,用于处理程序执行期间可能出现的各种条件;

What GNU/Linux command-line tool would I use for performing a search and replace on a file?

青春壹個敷衍的年華 提交于 2019-12-03 04:34:12
What GNU/Linux command-line tool would I use for performing a search and replace on a file? Can the search text, and replacement, be specified in a regex format? Cristian Ciupitu sed 's/a.*b/xyz/g;' old_file > new_file GNU sed (which you probably have) is even more versatile: sed -r --in-place 's/a(.*)b/x\1y/g;' your_file Here is a brief explanation of those options: -i[SUFFIX], --in-place[=SUFFIX] edit files in place (makes backup if extension supplied) -r, --regexp-extended use extended regular expressions in the script. The FreeBSD version also supports these options. The NetBSD and OpenBSD

Could someone help me configure MinGW in SublimeText 3? (Newbie)

谁说我不能喝 提交于 2019-12-03 04:04:20
I downloaded MinGW following the first link here https://isocpp.org/get-started and now I need to configure it in SubimeText 3. I know I should go to Tools > Build System > New Build System... But what should I specify there? I use Win7x64. And MinGW is in C:\MinGW The complete reference for build systems is here . The first thing you need to do is make sure that the C:\MinGW\bin directory is in your PATH , then restart Sublime so the change gets picked up. Once you've done that, create a new build system with the following contents: { "cmd": ["gcc", "${file}", "-o", "${file_base_name}.exe"],