Results 1 to 2 of 2
Hi
I have problem with GNU linker.
I will show you simple example how it appears. But basically if I have set one function to specified memory section and try ...
- 03-09-2010 #1Just Joined!
- Join Date
- Mar 2010
- Posts
- 1
Linker script conflict error
Hi
I have problem with GNU linker.
I will show you simple example how it appears. But basically if I have set one function to specified memory section and try to call function with string parameter. then linker says "causes a section type conflict".
So what is that error message? Google didnt find any solve for this.Code:char FooBar __attribute__((section(".defined_section"))); char TestFunction __attribute__((section(".defined_section"))); char FooBar(char * s) { if(s) return 1; else return 0; } void TestFunction(void) { FooBar(1); // This works fine FooBar("1") // This doesnt work, linker script says: " TestFunction causes a section type conflict" }
- 03-10-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
The string literal "1" is const, whereas the signature of the function is non-const. Change the definition of FooBar to use a const char* instead of a char* as an argument.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote