I do have some doubts about __attribute__((section("name")) .What is the real use of defining a user defined .section? Is there any examples to shows how it is useful?
-
You might want to clarify if the question is directed at e.g. linux kernel code, otherwise it's a question more suited for stackoverflowTorin– Torin2020-02-03 10:41:45 +00:00Commented Feb 3, 2020 at 10:41
-
There are quite a few examples on sources.debian.org (but that doesn’t explain why it’s useful).Stephen Kitt– Stephen Kitt2020-02-03 11:43:12 +00:00Commented Feb 3, 2020 at 11:43
-
@Torin, I believe this is allowed in both kernel and user space code. If I understand correctly in kernel code, a whole section can be loaded and unloaded/destroyed from memory when not in use. This is one of the uses(?) . Or is there an another use with section?Franc– Franc2020-02-03 16:08:39 +00:00Commented Feb 3, 2020 at 16:08
-
This question with same topic is answered in stackoverflow. Thanks.Franc– Franc2020-02-04 05:44:01 +00:00Commented Feb 4, 2020 at 5:44
Add a comment
|