Questions tagged [assembly]
Tag for questions regarding the wide family of assembly languages both low and high level. It should be used for both the languages themselves as well as their assemblers.
77 questions
1 vote
0 answers
66 views
What is the difference between the ELF Visibility Values STV_INTERNAL and STV_HIDDEN?
I was trying to understand Visibility values in ELF file , and I couldn't Understand the difference between STV_HIDDEN and STV_INTERNAL . After some reseach I found that this may be related to how ...
0 votes
1 answer
142 views
GNU assembler alternatives
I am trying to build my system from scratch, since I really like the idea of atomicity of each program in unix-like approach, I would like to preserve it as much as possible in my build. Since GNU ...
0 votes
1 answer
95 views
Checking the build of each executable, disassembling all the .o files. How to hunt down the xz kind of backdoor elsewhere in Linux distributions? [closed]
You might have read about the backdoor that was released with the xz command (versions 5.6.0 and 5.6.1). A malevolent committer gained the trust of his maintainer, and achieved to insert at build time ...
4 votes
1 answer
281 views
Audio playback from assembly language in Unix?
Looking for a simple audio interface for Unix For fun, I'm learning x86 assembly language by porting an old game. The trickiest part is finding a way to play simple sounds (square waves, mostly). The ...
2 votes
1 answer
439 views
Why does the Linux kernel have its own bootloader
I am trying to work my way through Linux kernel code, and in this file there seems to be a full blown bootloader that bios is expected to run. I was under the impression that generally, grub will be ...
1 vote
0 answers
281 views
perf instruction count
so i've been playing with perf and assembly i have the following program: .intel_syntax noprefix .global _start _start: mov cl, 2 mov ebx, 0b101 shr ebx, cl and bl, 1 je do_stuff ...
0 votes
0 answers
132 views
Linking problem in assembly code
Here is my assembly code: .section .data mystring: .asciz "Hello world\n" .section .text .globl _start _start: pushl $0 pushl $mystring call printf pushl $0 call exit ...
0 votes
0 answers
62 views
Why does AIX on Power require that the svc instruction must be preceded by an unconditional branch or a CR instruction?
The IBM AIX Documentation for the svc (Supervisor Call) instruction has a note that states To ensure correct operation, an svc instruction must be preceded by an unconditional branch or a CR ...
0 votes
1 answer
237 views
Terminal syscalls in Assembly
I would like to write a chess engine for Linux. It will be in pure X64 Assembly language without any C/C++ or any other high level languages external libraries. It will run in full screen text/console/...
1 vote
1 answer
119 views
How do unix systems call into an application?
I am currently implementing a C runtime library for the Arm64 platform, and I am unsure which assumptions I can make about the environment at the precise point that the application is executed (what ...
0 votes
1 answer
58 views
How can I en- and decompress a bootable image?
I have a bootable kernel image, that I had created with MinGW Toolchain's that available for Microsoft Windows 11. The Project is in size tiny, but I would know: "How can I shrink the image, if ...
0 votes
2 answers
2k views
Assembly code that print to screen without syscall
Is it possible, in Linux, to write an x86 assembly program that print a character to the screen (standard output) without the use of any system call? I think that it is not possible because, in x86 ...
0 votes
1 answer
92 views
as .*s does not work like gcc .*c
when i run gcc -c *.c, it runs:- gcc -c file1.c -o file1.o gcc -c file2.c -o file2.o gcc -c file3.c -o file3.o ... but as *.s runs:- as file1.s -o a.out as file2.s -o a.out as file3.s -o a.out ... ...
0 votes
2 answers
698 views
A better disassembler than `objdump -d`?
I notice when using objdump -d, it outputs the assembly (in either Intel syntax or AT&T syntax), the binary opcode encodings and the address numbers. In my case, I just want the disassembler to ...
0 votes
1 answer
68 views
Why does assembler called from script not create a certain file when run from crontab?
I'm using this script to build and package some applications I developed. Full content of the script is listed at the end. It is called by this crontab entry: 50 23 * * * nice $HOME/update-dl-wwwecm $...