This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Monday 26 September 2011 00:49:15 Kevin Cernekee wrote: > I ran into a couple of semi-obscure issues linking objects generated > from the mips-unknown-elf sample toolchain into a program built with > Sourcery G++ (now Sourcery CodeBench), and I wanted to pitch the idea of > including an SDE-compatible sample config in the release. > > I have not performed enough testing to be confident that I know about > all of the changes needed for 100% SDE compatibility, but maybe this > will get the ball rolling and somebody more knowledgeable can help fill > in the gaps... > > Problem #1: > > mips-unknown-elf uses SGI-compatible symbol ordering: [--SNIP--] > In SGI mode, sh_info in the symtab's section header entry points to line > 18. > > By contrast, a copy of binutils that had been built as an SDE or Linux > toolchain assumes that sh_info points to the first global symbol, and > that all local symbols (such as $LC0) have an index lower than sh_info > (in this case, 20): [--SNIP--] > A non-SGI ld may report the former case as a malformed object file: > > mipsel-linux-ld: error: _fixunssfsi-sgi.o contains a reloc > (0x0000000000001705) for section .text that references a non-existent > global symbol > mipsel-linux-ld: final link failed: Bad value > > Fix: use "sde" instead of "unknown" for CT_TARGET_VENDOR. If the tuple > is mips-sde-elf, binutils will disable the SGI/IRIX quirks. Oh, so we have a case where the vendor part of the tuple *is* actually meaningful. Sigh... > Problem #2: > > In my test runs, CT_CC_GCC_ENABLE_TARGET_OPTSPACE caused libgcc to be > built with the MIPS SDA data model. i.e. it assumes that $gp always > points to a "small data area" which can access items in the .sdata and > .sbss sections using just a signed 16-bit offset. Many embedded > programs do use SDA, but some do not and this could cause > incompatibilities. > > Fix: disable CT_CC_GCC_ENABLE_TARGET_OPTSPACE OK. Thank you for documenting all of this. :-) Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |