Questions tagged [nasm]

6 questions
5
votes
1 answer

What are difference between the ELF symbol visibility levels?

The NASM docs on "elf Extensions to the GLOBAL Directive" say, Optionally, you can control the ELF visibility of the symbol. Just add one of the visibility keywords: default, internal, hidden, or protected. The default is default of course. Where…
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
2
votes
1 answer

-bash: ./ex1: cannot execute binary file: Exec format error (on Ubuntu installed through Windows 10 app store, 64 bit)

I am trying to start out with some assembly but I run into this error from the outset. Here are the details: I've written the file myself (following a video) so its not some import: global _start _start: mov eax, 1 …
x iLeon
  • 39
  • 4
2
votes
1 answer

Compile shared library from asm code with current sources

I just did some basic functions in asm that I compile in a shared library. Like : BITS 64 global foo section .text foo: mov rax, 1 ret I compiled with : nasm -f elf64 foo.S -o foo.o && gcc -shared…
OOM
  • 133
  • 1
  • 3
0
votes
1 answer

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 $HOME | tee -a $HOME/build-dl-wwwecm/log For…
ecm
  • 133
  • 5
0
votes
0 answers

How to disassemble floppy disk?

I want to disassemble floppy disk and assemble it again with nasm -f bin command. For example, I want to disassemble MS-DOS .img files and assemble it again with nasm -f bin command. I tried to use ndisasm command: ndisasm -b 16 File.img
sbh
  • 63
  • 1
  • 9
0
votes
1 answer

Running a custom-compiled executable returns "No such file or directory"

I have an executable but when I run it I get "No such file or directory" $ chmod a+x bin $ file bin bin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld64.so.1, not stripped $ ./bin bash: ./bin: No…
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290