Recent Posts

Pages: 1 ... 4 5 [6] 7 8 ... 10
51
Programming with NASM / Re: gdb and debug symbols
« Last post by decuser on March 02, 2024, 09:51:33 PM »
I don't have "Code" anywhere. I have a .text section.
52
Programming with NASM / Re: gdb and debug symbols
« Last post by Frank Kotler on March 02, 2024, 09:22:38 PM »

""Code" is not a "known  section name". Try changing it to .text
Best,
Frank

53
Programming with NASM / Re: Learning Assembler
« Last post by decuser on March 02, 2024, 03:02:22 PM »
I used Jorgensen before I purchased Duntemann's x64 Assembly Language Programming on Linux book. Both are great books for x64 on Linux. As a new learner, I found Duntemann's book to be phenomenal. Jorgensen's is not as in depth, but it is very good. I asked the author if he had an updated version and he sent me one.

Both work with my system (Linux Mint 21.3 "Virginia") pretty much verbatim and both give enough hints to work through system differences if there are any (I used them both for FreeBSD, where the only thing I had a hard time with was the System Calls and Calling Conventions, but I expected that). I don't use SASM, which is featured prominently in Duntemann's book, but all of the examples work fine in gdb. Jorgensen uses ddd, which works fine.
54
Programming with NASM / Re: gdb and debug symbols
« Last post by decuser on March 02, 2024, 02:47:47 PM »
and I've tried it with no -F, -F stabs, and -Fdwarf, same result.
55
Programming with NASM / Re: gdb and debug symbols
« Last post by decuser on March 02, 2024, 02:46:18 PM »
Ok. I've since learned a lot more about what I'm doing with this stuff (assembly on Linux). I still have the same issue though.

I've tried adding nop as the first executable instruction:

Code: [Select]
section .data
EOLs: db 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10

section .text

global _start
_start:
    nop

When I fire up gdb, I'm able to debug fine. I can set breakpoints at my labels, step through code, display memory contents with x/, etc. But, if I try to use:

Code: [Select]
info address EOLs
I get

Code: [Select]
Symbol "EOLs" is at 0x402000 in a file compiled without debugging.
Sure enough EOLs is at 0x402000:

Code: [Select]
(gdb) x/16bx &EOLs
0x402000 <EOLs>:        0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a
0x402008:       0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a
(gdb) x/16bx 0x402000
0x402000 <EOLs>:        0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a
0x402008:       0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a    0x0a

Why does it report that it's in a file compiled without debugging?
56
Programming with NASM / Re: Learning Assembler
« Last post by AntonPotapov on February 29, 2024, 05:56:30 PM »
I think I've found what I need. this link was on wikipedia ( https://en.wikipedia.org/wiki/Assembly_language )

Jorgensen, Ed. "x86-64 Assembly Language Programming with Ubuntu" (PDF)
http://www.egr.unlv.edu/~ed/assembly64.pdf
57
Programming with NASM / Learning Assembler
« Last post by AntonPotapov on February 28, 2024, 03:37:16 PM »
Are there any good sites for comprehensive instruction in assembly language? In documents NASM There is only information on how to use the compiler and preprocessor (chips for convenience). I'm looking for something like: https://www.learncpp.com/. Assembly language only.

Off-topic. I started learning assembler, but then gave up. Now I'm back at it again
58
Example Code / Assembly x86_64 Linux Web API
« Last post by Rodrigo Robles on February 14, 2024, 04:14:51 AM »
I wrote a POC of a x86_64 Assembly Web API to test its viability, got carried away and ended up with five Assembly Web APIs testing different possible architectures.

This is probably the fastest Web API of the world.

I wrote a paper draft about this experiment: https://drive.google.com/uc?id=18fSnr4ZVtPJbnq9v8xogodC_jklb75xf&export=download

In the paper I explain in detail the architectures I tested:
1. asmapi-monoproc (single process): https://gitlab.com/RodrigoRobles/asmapi-monoproc
2. asmapi (multi process): https://gitlab.com/RodrigoRobles/asmapi
3. asmapi-threadpool: https://gitlab.com/RodrigoRobles/asmapi-threadpool
4. asmapi-threadpool-futex: https://gitlab.com/RodrigoRobles/asmapi-threadpool-futex
5. asmapi-lateaccept (thread pool w/ preforking): https://gitlab.com/RodrigoRobles/asmapi-lateaccept

The five APIs use a 0 dependency architecture, not depending on any external library, neither libc, only talking directly with the kernel.
59
Programming with NASM / Re: gdb and debug symbols
« Last post by Frank Kotler on February 04, 2024, 12:13:20 AM »
It may help to tell Nasm  "-F dwar"
Start your cide wuth a singke byte opcode  I like
"nop

st,
BeFrank

60
Other Discussion / Re: NASM or YASM in the modern era (or something else)
« Last post by Frank Kotler on February 03, 2024, 11:53:38 PM »
From what little I know of Yasm, it offers the option of AT$T syntax. if that's an advantagea.
Fasm is another nice assembler. Their forum might be more acive.
I don' thonk any of them will leave yo in the dark ages.

Best,
Franl

t
Pages: 1 ... 4 5 [6] 7 8 ... 10