Jump to content
    

SECTIONS(linker) VS .sections(asm)


Здравствуйте!

 

Подскажите пожалуйста, присутствует ли связь адресная между одноименными секциями выходными линкера и секциями директивами ассемблера

 

Если да, то поясните на пальцах, а то я немного не догоняю

 

Спасибо!

Share this post


Link to post
Share on other sites

у линкера (например gcc) есть входные секции (объявленные в файлах C / ASM и те которые по умолчанию типа .text) и выходные, которые засовываются в память по адресам и присутствуют в исполняемых файлах типа elf и т.п.

а в скрипте линкера собственно и указывается как входные секции слинковать в выходные

.text : { /* This is the output section .text */

*(.text) /* This matches all .text sections in all input files */

*(.text*) /* This matches all .text* sections in all input files */

}

это какой-то пример из сети по gnu linker

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...