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