linker - GCC: Section names containing the / character -
Answer this question:
It feels great one. However, trying to use it, I see that the name of the section gets smaller when faced with a slash (/) character.
I end with this section name Happens: If I use your answer, then Using I get this: But you can see from preprocessor output that I should give a section name with file and line: __File____ contains the path to the file, and thus the / character linker drops everything while creating the name of a section like:
#define SEC_TEXT __attribute __ ((section (". Mytext.bl / ah.c")) Unsigned four SEC_TEXT poll (zero)
[8] .mytext.bl PROGBITS 00000000 000120 00003D 00 0 1
__ line __
and __ file __
:
#define __S) #s #define _S (s) __S (S ) #defi Ne SECTION __FILE__ "." _S (__ LINE__) #define SEC_MYTEXT __attribute __ ((section (". Mytext." Section)) Unsigned four SEC_MYTEXT poll (zero)
[8]. Mytext PROGRITS 00000000 000120 00003 D 00 0 1
< Code> Unsigned four __tystem __ ((Section ("Mytext." "/path/to/mycode/poll.c" "" 250 "))) Election
Any way Getting around this issue?
Hmm, this is the only free consultant graphics Intel (x86) compiler that indicates that behavior , Both 4.6.3 and 4.7.2. GCC 4.8.2, with Ubuntu 14.04, is okay to deal with slash in section names. So the Matter ARM compiler is 4.6.3.
Comments
Post a Comment