[PATCH] D125074: [ELF] Change (NOLOAD) type mismatch to use SHT_NOBITS instead of SHT_PROGBITS

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 6 03:52:23 PDT 2022


peter.smith accepted this revision.
peter.smith added a comment.
This revision is now accepted and ready to land.

>From doing some reading about NOLOAD, there is a use case for SHT_PROGBITS in NOLOAD. In an embedded system it can represent something like a ROM that is always present on the device at that address. This gets modelled as SHT_NOBITS so that addresses are calculated but not written to the file. Whomever writes the ZI initialization code will obviously have to make sure not to try and write that ZI.

References:
https://community.st.com/s/question/0D50X0000A7UjmzSQC/understanding-of-noload-directive-for-gnuld
https://software-dl.ti.com/ccs/esd/documents/sdto_cgt_linker_special_section_types.html (Strictly speaking this is TI's linker which has some extensions)
https://www.embeddedrelated.com/showthread/comp.arch.embedded/276222-1.php


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125074/new/

https://reviews.llvm.org/D125074



More information about the llvm-commits mailing list