<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi everyone,<div class=""><br class=""></div><div class="">I have created a custom section in an ELF file with the following code:<br class=""></div><div class=""><br class=""></div><div class=""><i class="">GlobalVariable* glob = new GlobalVariable(*mod, type, true, GlobalValue::ExternalLinkage, “test", “myGlobal”);</i></div><div class=""><i class="">glob->setSection(“.custom”);</i></div><div class=""><br class=""></div><div class="">This works great but I have two questions:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>- Can I pass more parameters to the section (like the elf type, the elf flag, etc.). In a macho, you can add information like <i class="">cstring_literals</i> or <i class="">no_dead_strip</i>. I did not find anything like it for ELF.</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>- When i used the flag <i class="">-Wl,—gc-sections</i> on Linux, my section is deleted, can I bypass this?</div><div class=""><br class=""></div><div class="">Greetings,</div><div class=""><br class=""></div><div class="">Johan</div></body></html>