From: Dukextra <mahuhta@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: Re: "causes a section type conflict"
Date: Thu, 25 Mar 2010 11:40:00 -0000 [thread overview]
Message-ID: <28024536.post@talk.nabble.com> (raw)
In-Reply-To: <mcr7hpce388.fsf@dhcp-172-17-9-151.mtv.corp.google.com>
Ian Lance Taylor-3 wrote:
>
>
> Thanks. Now for the rest of it. Please give us a complete standalone
> test case. Please show us the exact output of the linker.
>
>
Hi
I tried to do the linking so wrong way. I tried to put every C-code
implementations to same section with using __attribute__ command. And that
is wrong.
My orginal problem caused because I was trying to put variables and
functions to same section. I can continue compiling if I put variables to
different section than functions. And later I had to put also consts to
different sections. (My example doesnt show that problem because it doesnt
use attributed variable)
I think that better way to do this is to edit linker script to put defined
files to different memeory.
example:
.sdata :
{
*(EXCLUDE_FILE(*my_object.o) .sdata) /* put every object's .sdata sections
here but not my_object.o*/
} > ram
.sdata_my_section : AT (LOADADDR(.sdata)+SIZEOF(.sdata))
{
*my_object.o(.sdata) /* put only .sdata sections from my_object.o file*/
} > my_own_ram_section
And do this for every section... data, sdata, bss, etc...
BUT
Now I have new problem. How I can make symbols in linker script?
I want to list many files in one symbol like this:
__MY_OBJS = my_file1.o my_file2.o my_file3.o
SECTION
{
.sdata :
{
*(EXCLUDE_FILE(*__MY_OBJS) .sdata)
} > ram
.sdata_hal : AT (LOADADDR(.sdata)+SIZEOF(.sdata))
{
*__MY_OBJS(.sdata)
} > my_own_ram_section
}
Is there any way to do this?
Makefile style $(__MY_OBJS) could be better but that doesnt work too.
Dukex
--
View this message in context: http://old.nabble.com/%22causes-a-section-type-conflict%22-tp27847975p28024536.html
Sent from the gcc - Help mailing list archive at Nabble.com.
next prev parent reply other threads:[~2010-03-25 7:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-10 10:36 Dukextra
2010-03-10 16:39 ` Ian Lance Taylor
2010-03-10 16:50 ` Axel Freyn
2010-03-11 5:13 ` Dukextra
2010-03-16 14:48 ` Ian Lance Taylor
2010-03-25 11:40 ` Dukextra [this message]
2010-03-25 15:34 ` Ian Lance Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28024536.post@talk.nabble.com \
--to=mahuhta@gmail.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).