Question/Problem about binutils

Brendan Simon brendan@dgs.monash.edu.au
Thu Jul 22 00:21:00 GMT 1999


"David Müller (ELSOFT AG)" wrote:

> Hello
>
> I'm sorry, if anyone has to read this for the
> second time. ;-)
>
> I'm using binutils-2.9.1.0.19a / egcs-1.1.2 as a
> Linux -> PPC (MPC8xx) cross develop environment.
>
> 1.
> In the ppc-opc.c file, there are definitions for
> the simplified mnemonics like "mfimmr, mfcmpa, ...".
> But there are no definitions for the counterparts like
> "mtimmr, mtcmpa, ...", at least not in binutils-2.9.1.0.19a
> and earlier.
>
> Is there a "good" reason for this??
>
> 2.
> To link my project, i have written the following linker
> script.
>
> ROMSTART = 0xFFF00000 ;
>
> MEMORY {
>         ROM : ORIGIN = ROMSTART, LENGTH = 128K /*1M*/
> }
>
> SECTIONS {
>         .text ROMSTART : AT (0x0) {
>                 __s_text = ABSOLUTE(.) ;
>                 *(.text);
>                 __e_text = ABSOLUTE(.) ;
>         } > ROM
>
> [rest deleted]
>
> ld reports the error "nonconstant expression for origin" in the
> "ROM" definition, but has no problems with "ROMSTART" in
> the ".text" section definition.
>
> Is this a bug in ld or am i missing something??

I have also noticed that the MEMORY section does not seem to be able to
use symbols.  I'm not sure if it is an ld bug or whether there is a good
reason why symbols can't be used.  I was using a powerpc cross-compiler
so I can't tell you if it is powerpc specific issue or a common gcc
issue.  I guess one could try the Linux x86 compilers to find out :)

Brendan Simon.



More information about the Binutils mailing list