Staging
v0.5.1
https://github.com/torvalds/linux
Raw File
Tip revision: dee2b702bcf067d7b6b62c18bdd060ff0810a800 authored by Gustavo A. R. Silva on 14 November 2021, 00:57:25 UTC
kconfig: Add support for -Wimplicit-fallthrough
Tip revision: dee2b70
profile2linkerlist.pl
#!/usr/bin/env perl
# SPDX-License-Identifier: GPL-2.0

#
# Takes a (sorted) output of readprofile and turns it into a list suitable for
# linker scripts
#
# usage:
#	 readprofile | sort -rn | perl profile2linkerlist.pl > functionlist
#
use strict;

while (<>) {
  my $line = $_;

  $_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/;

  print "*(.text.$1)\n"
      unless ($line =~ /unknown/) || ($line =~ /total/);
}
back to top