profile2linkerlist.pl (e5451c8f8330e03ad3cfa16048b4daf961af434f) | profile2linkerlist.pl (cb77f0d623ff33a7899cb945f4f5a4825fbb2ea1) |
---|---|
1#!/usr/bin/perl | 1#!/usr/bin/env perl |
2 3# 4# Takes a (sorted) output of readprofile and turns it into a list suitable for 5# linker scripts 6# 7# usage: 8# readprofile | sort -rn | perl profile2linkerlist.pl > functionlist 9# 10use strict; 11 12while (<>) { 13 my $line = $_; 14 15 $_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/; 16 17 print "*(.text.$1)\n" 18 unless ($line =~ /unknown/) || ($line =~ /total/); 19} | 2 3# 4# Takes a (sorted) output of readprofile and turns it into a list suitable for 5# linker scripts 6# 7# usage: 8# readprofile | sort -rn | perl profile2linkerlist.pl > functionlist 9# 10use strict; 11 12while (<>) { 13 my $line = $_; 14 15 $_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/; 16 17 print "*(.text.$1)\n" 18 unless ($line =~ /unknown/) || ($line =~ /total/); 19} |