blob: 9e50cb041ec1c8c5c61cdf967dc9cefbfc87d1f8 [file] [log] [blame]
use strict;
my @target_lib=("el1", "tstm_meta",
"edsphwram", "el1d", "el1d_agc", "el1d_ext", "el1d_pub", "el1d_tpc",
"mml1", "mml1_pcore", "mml1_rf", "mml1_rf_ext_pcore", "mml1_rf_pcore",
"nl1", "nl1_pub",
"mml1_agc", "mml1_rxdfe", "mml1_tpc", "mml1_txdfe");
open INPUT_FD, "<$ARGV[0]";
open OUT_FD, ">$ARGV[1]";
my @obj_list;
while(<INPUT_FD>)
{
if (/Allocating common symbols/)
{
last;
}
for(my $i=0; $i <= $#target_lib;$i++)
{
my $lib_str="lib".$target_lib[$i].".a";
if (/$lib_str\((\S+)\.obj\)/)
{
my $obj_name = $1.".obj";
push (@obj_list, $obj_name);
last;
}
}
}
for(my $i = 0; $i <= $#obj_list; $i++)
{
my $lds_sec = "*".$obj_list[$i]." (.text*)";
print OUT_FD "$lds_sec\n";
}
close INPUT_FD;
close OUT_FD;