> On Wed 05 Dec 2007 at 09:48PM, Dennis Clarke wrote:
>> /*
>>  * Return the platform tag ("i86pc") for the invoking system.
>>  */
>> /*ARGSUSED*/
>> static PyObject *
>> arch_platform(PyObject *self, PyObject *args)
>> {
>>         char *buf = NULL;
>>         PyObject *robj;
>>
>>         buf = get_sysinfo(SI_PLATFORM);
>>         if (buf == NULL)
>>                 return (NULL);
>>
>>         robj = Py_BuildValue("s", buf);
>>         free(buf);
>>
>>         return (robj);
>> }
>
> I believe ("i86pc") is intended to be an example of the output.
>
> This function returns the same value as the output of 'uname -i', I
> believe.
>

I have not moved over to Sparc yet in any case. I think my primary concern
at the moment is trying to back port in a sane fashion to Solaris 8. With
Solaris 8 I see the following issue with elf.so ( compiled on a S10u4
machine ) :

$ uname -a
SunOS thor 5.8 Generic_117351-51 i86pc i386 i86pc

$ ldd ./i386/reloc/usr/lib/python2.5.1/vendor-packages/pkg/elf.so
        libelf.so.1 =>   /usr/lib/libelf.so.1
        libmd.so.1 =>    (file not found)
        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1

I go hunting through src/modules/elf.c to find the calls that require libmd
but it is not obvious. Either that .. or I simply don't know what to look
for.

It is quite frustrating.

By the way, as an aside, I spent some time trying to figure out how to
create an ELF binary that would return osabi of "none". I'm not too sure
what value that would be but it was mentioned in the source :

/*
 * Returns information about the ELF file in a dictionary
 * of the following format:
 *
 *  {
 *      type: exe|so|core|rel,
 *      bits: 32|64,
 *      arch: sparc|x86|ppc|other|none,
 *      end: lsb|msb,
 *      osabi: none|linux|solaris|other
 *  }
 *
 *  XXX: I have yet to find a binary with osabi set to something
 *  aside from "none."
 */
/*ARGSUSED*/
static PyObject *
get_info(PyObject *self, PyObject *args)


Dennis

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to