AppImage / AppImage/AppImageKit

Use gcc feature __attribute__ section to create the custom sections on the runtime

未關閉
#947 2 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
沒有語言資料
星號
9.4k
分支
588
PR 合併指標
PR 指標待擷取

描述

While looking for a solution for https://github.com/AppImage/libappimage/issues/21 I found this nice gcc feature that will save us a lot of "fragile" cmake code at https://github.com/AppImage/AppImageKit/blob/master/src/build-runtime.cmake

Basically to create a 10 bites long section named `foo` we would use the code below
`char custom_section[10] __attribute__((section("foo"))) = {0x0};`

Documentation can be found here http://www.keil.com/support/man/docs/armcc/armcc_chr1359124982450.htm

Here is an example of how it's used to append metadata to the linux kernel modules:
https://www.bottomupcs.com/elf-sections-others.xhtml#modinfo_sections

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。