[oi-dev] mapfile and RESERVE_SEGMENT or CAPABILITY

stes@PANDORA.BE stes at telenet.be
Sun Aug 8 09:27:36 UTC 2021


Back in March 2021 there was an interesting post by Alan Coopersmith about the address space layout diagrams for the AMD64 ABI.

This was related in March to firefox, spidermonkey and so-called tagged pointers.

He described various strategies, some were adding a ld link editor mapfile using either RESERVE_SEGMENT or CAPABILITY.

However I fear that the OpenIndiana ld has no support for RESERVE_SEGMENT.

I have ran into a new issue in the very latest versions of OpenSmalltalk cog-spur where apparently new code in OpenSmalltalk expects the Linux address space layout - not the OpenIndiana layout.

The issue is that new code when ran under a debugger seems to set 

   endOfJITZone = 0xffff80ffbcecf000

instead of

   endOfJITZone = 0x7fffbe400000

as on Linux.  The OpenIndiana layout seems to use the full 64bit pointer range while Linux does not seem to do that but unfortunately it appears that OpenSmalltalk now expects the Linux layout.  A few weeks ago that was not the case so I already raised the issue with the OpenSmalltalk developers.

I am trying now to use a ld -M mapfile on OI as workaround.

There are some examples in :

 /usr/lib/ld 

and 

 /usr/lib/ld/amd64

These examples are : map.default, map.below4G and map.above4G

Has anyone - perhaps for spidermonkey ? - created a mapfile for simulating the Linux address space layout ?

Something like:   /usr/lib/ld/amd64/map.linux ?

Thanks
David Stes



More information about the oi-dev mailing list