ARM cross compile - one last problem

"Martin v. Löwis" martin at v.loewis.de
Wed Jun 20 01:20:35 EDT 2007


> Alright, I looked into this a little more, and those symbols
> definitely exist in my compiled python executable. How are extensions
> linked to the python interpreter?

Python assumes that extension modules can be linked against the
executable, i.e. that *at run-time* those symbols will get
resolved. This works fine for the Unix ELF binary format, but
may require certain linker flags, such as --export-dynamic.
It doesn't work for Windows PE32, therefore, on Windows,
Python compiles the run-time as a DLL (pythonXY.dll), and
extension modules link to that.

I would expect that Linux on ARM also uses ELF, so dynamic
lookup of symbols from the executable should be possible.
Do "nm -D --defined-only python" to see whether the symbols
are in the *dynamic* symbol table. If not, use the proper
linker flag to make them so.

Regards,
Martin



More information about the Python-list mailing list