Fixed.

If anybody discovers a problem and can provide a reproducing case like this,
I'd appreciate it if you'd document it in a bug tracker item.   I use that
to correlate material in the regression repository with the commit logs so
future maintainers have a chance to know why something was done.

Peter

On Thu, Mar 31, 2011 at 7:17 PM, Peter Jansen <pwjan...@yahoo.com> wrote:

> Hi Peter,
>
> I found another issue, I think with binutils this time.
>
> I have multiple object files, linked into a final elf file, when I do the
> final
> link, the final file looses the flag saying its MSP430X architecture. This
> causes objdump to disassemble without the extended instructions.
>
> the header from the intermediate files is (msp430-objdump -x output)
>
> main.o:     file format elf32-msp430
> main.o
> architecture: msp430:430X, flags 0x00000011:
> HAS_RELOC, HAS_SYMS
> start address 0x00000000
>
> From the final main elf file,
>
> main:     file format elf32-msp430
> main
> architecture: msp430:430, flags 0x00000112:
> EXEC_P, HAS_SYMS, D_PAGED
> start address 0x00005c00
>
> This is binutils version
>
> peter@shed:~/msp430/test$ msp430-ld --version
> GNU ld (GNU Binutils) 2.21.51.20110205
>
> gcc version
>
> peter@shed:~/msp430/test$ msp430-gcc --version
> msp430-gcc (GCC) 4.5.2
>
> Probably not that hard to track down, but I don't know where to start.
>
> Cheers,
>
> Peter Jansen
>
> -------------------------- main.c
>
> #include <stdio.h>
>
> extern int func(int);
>
> int putchar(int c)
> {
>    return 0;
> }
>
>
> int main(void)
> {
>    int b = 3;
>    int f;
>
>    f = func(b);
>
>    printf("b %d fun(b) %d\n", b, f);
>
>    return 0;
> }
>
> ---------- func.c
> #include <stdlib.h>
>
> int func(int a)
> {
>    return a * 4;
> }
>
> ----------- Makefile
> CC=msp430-gcc
> CFLAGS=-g -mmcu=msp430f5438
>
> main: main.o func.o
>    $(CC) $(CFLAGS) -o $@ $^
>
> main.o: main.c
>    $(CC) $(CFLAGS) -c -o $@ $<
>
> func.o: func.c
>    $(CC) $(CFLAGS) -c -o $@ $<
>
>
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to