Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why Segments in Assembly file, are not recognized by the linker ?

5 views
Skip to first unread message

OM

unread,
Jan 16, 2008, 7:24:16 AM1/16/08
to
Hello

I use pSOSsystem 2.2.6 on X86 board.
My project is compiling and working already several years.

I wanted to make small "hello world" application that works with out
regulr custom made BSP.
The problem is that the build.mk (in configs/std) contain segments
that are "ours".
@echo
'CODE=CODE32,_CODE,MWASM_CODE,GRAFIX_DATA,DATA,INIT_DATA,OS_INIT_DATA,*TABLES,BSS),'>>ram.bld

So during the link phase it ask for _CODE,MWASM_CODE,GRAFIX_DATA
segments.

I wrote dummy.asm file contain empty segments and added it to the
makefile.
The file contain:
NAME dummy

MWASM_CODE SEGMENT PUBLIC DWORD USE32 ER
MWASM_CODE ENDS

GRAFIX_DATA SEGMENT PUBLIC DWORD USE32 RW
GRAFIX_DATA ENDS

_CODE SEGMENT PUBLIC DWORD USE32 ER
_CODE ENDS

END

It compiles well, but at the link phase I still get errors.

I looked at ram.map and those are the errors:
LINK386-E-ERROR257:entry _CODE not found
LINK386-E-ERROR257:entry _CODE not found
LINK386-E-ERROR257:entry MWASM_CODE not found
LINK386-E-ERROR257:entry MWASM_CODE not found
LINK386-E-ERROR257:entry GRAFIX_DATA not found
LINK386-E-ERROR257:entry GRAFIX_DATA not found

I also see things like
00000003H 0013EA78H ?
DUMMY_MODULE.DATA
00000003H 0013EA7CH ?
DUMMY_MODULE.DATA
00000003H 0013EA80H ?
DUMMY_MODULE.DATA
00000003H 0013EA84H ?
DUMMY_MODULE.DATA
00000003H 0013EA88H ?
DUMMY_MODULE.DATA

Can anyone tell me why is that ?

Thanks
Oran

0 new messages