flat assembler
Message board for the users of flat assembler.

Index > Linux > Do ld linkers generate same executable file with fasm?

Author
Thread Post new topic Reply to topic
kerr



Joined: 24 Feb 2016
Posts: 156
kerr 29 Feb 2016, 05:39
I have a question is use ld linkers generate executable file with fasm directly generate executable file not the same?
Quote:

test code:

ELF header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS / ABI: UNIX - System V
ABI Version: 0
Type: EXEC (executable file)
Machine: Intel 80386
Version: 0x2
Entry Point Address: 0x8048080
Program head start: 52 (bytes into file)
Start of section headers: 200 (bytes into file)
Flag: 0x0
The size of the head: 52 (bytes)
Program header size: 32 (bytes)
Number of program headers: 2
Section Head Size: 40 (bytes)
Section Head Number: 4
The section header string table index: 3

Section head:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[0] NULL 00000000 000000 000000 00 0 0 0
[1] .text PROGBITS 08048080 000080 000022 00 AX 0 0 16
[2] .data PROGBITS 080490a4 0000a4 00000c 00 WA 0 0 4
[3] .shstrtab STRTAB 00000000 0000b0 000017 00 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)

There are no section groups in this file.

Program head:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x08048000 0x08048000 0x000a2 0x000a2 R E 0x1000
LOAD 0x0000a4 0x080490a4 0x080490a4 0x0000c 0x0000c RW 0x1000

Section to Segment mapping:
Segments ...
00 .text
01 .data

There is no dynamic section in this file.

The file does not relocations.

The decoding of unwind sections for machine type Intel 80386 is not currently supported.

No version information found in this file.



Quote:

test1 code:
ELF header:
Magic: 7f 45 4c 46 01 01 01 03 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS / ABI: UNIX - GNU
ABI Version: 0
Type: EXEC (executable file)
Machine: Intel 80386
Version: 0x1
Entry Point Address: 0x8048074
Program head start: 52 (bytes into file)
Start of section headers: 0 (bytes into file)
Flag: 0x0
The size of the head: 52 (bytes)
Program header size: 32 (bytes)
Number of program headers: 2
Section Head Size: 40 (bytes)
Section head: 0
Section header string table index: 0

No section of this document.

There are no sections to group in this file.

Program head:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
INTERP 0x000074 0x08048074 0x08048074 0x0001f 0x0001f RWE 0x1
[Requesting program interpreter:?]
LOAD 0x000093 0x08048093 0x08048093 0x0000d 0x0000d RW 0x1000

There is no dynamic section in this file.

The file does not relocations.

The decoding of unwind sections for machine type Intel 80386 is not currently supported.

Dynamic symbol information is not available for displaying symbols.

No version information found in this file.


test code use ld linkers generate , test1 is fasm directly generate!
fasm direct generate executable file Missing permissions! is why?

_________________
I hope we will be good friends.
Post 29 Feb 2016, 05:39
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.