build_vm_def.sh broken on macosx?

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Thu Jan 21 14:01:22 UTC 2016


On 2016-01-21 11:37, Magnus Ihse Bursie wrote:
> Hi,
>
> It seems that build_vm_def.sh is broken on macosx. The script lists 
> all from *.o using nm, and filters them using this awk expression:
> '{ if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 }'
>
> However, the typical output from nm on macosx looks like this:
> __ZTV10methodOper
> __ZTV11MachNopNode
>
> That is, only a single column, and two leading underscore. The awk 
> expression will fail to match anything, and an empty vm.def will be 
> produced.
>
> If I modify the script to:
> '{ if ($1 ~ /^__ZTV/ || $1 ~ /^_gHotSpotVM/) print "\t" $1 }'
> then it will match and print these symbols.

However, then the linker will fail, spewing out tons of
ld: warning: cannot export hidden symbol vtable for sarI_mem_1Node from 
ad_x86_64_misc.o

I believe this is the result of compiling with -fvisibility=hidden, but 
I have not dug any further into the issue.

/Magnus


>
> The build_vm_def.sh script has not been modified since 2013, so if 
> this ever worked, then most likely the nm output has changed in Xcode 
> at some point.
>
> My main concern here is the new hotspot build. Does this mean that the 
> vm.def fills no purpose on the macosx build, and that the whole 
> process of running nm on all object files can be skipped? Or is this a 
> bug that has not been discovered? If so, it should be fixed in the old 
> build.
>
> /Magnus




More information about the hotspot-dev mailing list