flat assembler
Message board for the users of flat assembler.

Index > Linux > [ELF64] auto-grow of section alignment, STT_FUNC with a size

Author
Thread Post new topic Reply to topic
sylware



Joined: 23 Oct 2020
Posts: 228
Location: Marseille/France
sylware 20 Jan 2023, 12:15
ELF section alignment is not grown automatically by inner alignments, expected?

It seems the way to select an ELF symbol type is if of 0-size it is a STT_FUNC, if non-0-size it is a STT_OBJECT. I am suspicious as I have the feeling that the size of a STT_FUNC symbol is pertinent to build shared libs. Did I dream it?
Post 20 Jan 2023, 12:15
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8103
Location: Kraków, Poland
Tomasz Grysztar 20 Jan 2023, 13:28
With ELF object output you cannot align more than the alignment of the section, and you need to enlarge it explicitly in the SECTION statement.

With ELF executable output all addresses are absolute, so you're free to align to whatever boundary.

The fasm's ELF formatters are pretty minimalistic, with fasmg you do not have to limit yourself to the fasm-compatible ones.
Post 20 Jan 2023, 13:28
View user's profile Send private message Visit poster's website 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-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.