diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2005-10-17 16:19:34 +0300 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-10-17 09:57:24 +0000 |
commit | a0fd494844cc8648fdc5234c367fd018a12fdf3f (patch) | |
tree | 2b88e57b833d4c547dacfb6c74b5c2be4c1cba61 /symbian | |
parent | 5ca7f68ddac45dcdfd991dcc23e59792a9900482 (diff) | |
download | perl-a0fd494844cc8648fdc5234c367fd018a12fdf3f.tar.gz |
another Symbian update: Alan's fault :-)
Message-ID: <B356D8F434D20B40A8CEDAEC305A1F24E7A611@esebe105.NOE.Nokia.com>
p4raw-id: //depot/perl@25778
Diffstat (limited to 'symbian')
-rw-r--r-- | symbian/config.pl | 1 | ||||
-rw-r--r-- | symbian/find_writeable_data.pl | 73 | ||||
-rw-r--r-- | symbian/sisify.pl | 1 |
3 files changed, 74 insertions, 1 deletions
diff --git a/symbian/config.pl b/symbian/config.pl index d37a49e875..21e9b2826c 100644 --- a/symbian/config.pl +++ b/symbian/config.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl -w # Copyright (c) 2004-2005 Nokia. All rights reserved. +# This utility is licensed under the same terms as Perl itself. use strict; use lib "symbian"; diff --git a/symbian/find_writeable_data.pl b/symbian/find_writeable_data.pl new file mode 100644 index 0000000000..24bf298713 --- /dev/null +++ b/symbian/find_writeable_data.pl @@ -0,0 +1,73 @@ +#!/usr/bin/perl -w + +# +# find_writeable_data - find non-const data in Symbian object files +# +# Use this when PETRAN tells you "dll has (un)initialised data". +# Expects to find the Symbian (GNU) nm in the executable path. +# +# Copyright (c) 2004-2005 Nokia. All rights reserved. +# +# This utility is licensed under the same terms as Perl itself. +# + +use strict; + +BEGIN { + unless (exists $ENV{EPOCROOT}) { + die "$0: EPOCROOT unset\n"; + } + if (open(my $fh, "nm --version |")) { + unless (<$fh> =~ /^GNU nm .*-psion-.*/) { + die "$0: Cannot find the GNU nm from Symbian\n"; + } + close($fh); + } else { + die "$0: Cannot find any nm in the executable path: $!\n"; + } + unless (@ARGV && $ARGV[0] =~ /\.mmp$/i) { + die "$0: Must specify target mmp as the first argument\n"; + } +} + +use Cwd; +use File::Basename; + +my $dir = lc(getcwd()); +my $tgt = basename(shift @ARGV); + +$dir =~ s!/!\\!g; +$dir =~ s!^c:!c:$ENV{EPOCROOT}epoc32\\build!; +$dir .= "\\$tgt\\thumb\\urel"; + +print $dir, "\n"; + +unless (-d $dir) { + die "$0: No directory $dir\n"; +} + +my @o = glob("$dir\\*.o"); + +unless (@o) { + die "$0: No objects in $dir\n"; +} + +for my $o (@o) { + if (open(my $fh, "nm $o |")) { + my @d; + while (<$fh>) { + next if / [TURtr] /; + push @d, $_; + } + close($fh); + if (@d) { + $o =~ s!^\Q$dir\E\\!!; + print "$o:\n"; + print @d; + } + } else { + warn "$0: nm $o failed: $!\n"; + } +} + +exit(0); diff --git a/symbian/sisify.pl b/symbian/sisify.pl index 6edce4bd93..9a65d85770 100644 --- a/symbian/sisify.pl +++ b/symbian/sisify.pl @@ -4,7 +4,6 @@ # sisify.pl - package Perl scripts or Perl libraries into SIS files # # Copyright (c) 2004-2005 Nokia. All rights reserved. -# # The sisify.pl utility is licensed under the same terms as Perl itself. # |