[Mplayer-dev-eng] Porting Question

Felix Buenemann atmosfear at users.sourceforge.net
Fri Aug 3 16:07:20 CEST 2001


On Friday,  3. August 2001 14:13, you wrote:
> Hi, Felix Buenemann!
>
> On 2001-08-03 09:04:53 you wrote:
> >On Friday,  3. August 2001 12:35, you wrote:
> >> Hi, Felix Buenemann!
> >>
> >> On 2001-08-03 08:22:46 you wrote:
> >> >On Friday,  3. August 2001 11:33, you wrote:
> >> >> Hi, Arpi!
> >> >>
> >> >> On 2001-08-02 21:42:34 you wrote:
> >> >> >Hi,
> >> >> >
> >> >> >>   while cygwin patched sources (not in cvs yet), compile fine now,
> >> >> >> I have a problem in the linking stage, all external assembler
> >> >> >> functions are reported as undefined references. Does anyone have a
> >> >> >> clue how to fix it?
> >> >> >
> >> >> >they are not 'all', and not assembler.
> >> >> >3 problems are:
> >> >> >
> >> >> >- missing DLL loader stuff ( you don't link loader/libloader.a)
> >> >> >- missing shared memory functions (maybe -mno-cygwin kill these
> >> >> >compatibility functions)
> >> >> >- i don't know what's teh prob with libMP3, maybe soem files aren't
> >> >> > well compiled or some broken #ifdefs
> >> >>
> >> >> It is because cygwin (as any other DOS-Win32 compiler) generates
> >> >> assembler function with underscore, but our assembler doesn't contain
> >> >> leading underscore before function names. (It still one reason - why
> >> >> I choose inline assembler against external).
> >> >
> >> >Thanks, so I understood right that changing functionname to
> >> > _functionname solves the prob? (and do this both in C and asm file or
> >> > only in C?)
> >>
> >> Only in ASM, but it will make assembler stuff incompatible with
> >> Linux-Unix
> >>
> >> :( Only solution in this case is rewrite all .S files through inline
> >>
> >> assembler of "C". In this case compiler will generate correct function
> >> name automatically.
> >
> >hmm, I can simply change function names in asm sources and do some #ifdef
> >__CYGWIN__ #else stuff in C sources.
> >Or I write some little sed script that does the dirty work only on win32
> >systems.
>
> Yes! But it's requires to rewrite a lot of sourcelines.
> I could get only such workable stuff:
>
> #ifdef LINUX
> #define ASMLINKAGE(x) _##x
> #else
> #define ASMLINKAGE(x) x
> #endif
>
> extern void ASMLINKAGE(func)( void );
> #define FUNC ASMLINKAGE(func)
>
> void my_func( void ) { FUNC(); }
>
> As you see - function call should be rewritten too!
> Or you have better solution?
>
> But idea with rewritting of assembler stuff with using inline assembler
> is much better since allows to optimize function prologue and epilogue
> and probably some other stuff
>
yes, but it's a lot of work then!

> Best regards! Nick (2001-08-03 12:03:05)
>

-- 
Best Regards,
   Felix


_______________________________________________
Mplayer-dev-eng mailing list
Mplayer-dev-eng at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list