Lines Matching +full:on +full:- +full:die
2 # SPDX-License-Identifier: GPL-2.0
9 die "Format: $0 [-s <systemmap-file>] <vmlinux-file> <keyring-file>\n"
11 $#ARGV == 3 && $ARGV[0] ne "-s");
26 open FD, "objdump -h $vmlinux |" || die $vmlinux;
28 close(FD) || die $vmlinux;
34 …if ($line =~ /\s*([0-9]+)\s+(\S+)\s+([0-9a-f]+)\s+([0-9a-f]+)\s+([0-9a-f]+)\s+([0-9a-f]+)\s+2[*][*…
38 my $len = Math::BigInt->new("0x" . $3);
39 my $vma = Math::BigInt->new("0x" . $4);
40 my $lma = Math::BigInt->new("0x" . $5);
41 my $foff = Math::BigInt->new("0x" . $6);
55 # from a vmlinuz file with extract-vmlinux then the symbol table will be empty.
57 open FD, "nm $vmlinux 2>/dev/null |" || die $vmlinux;
59 close(FD) || die $vmlinux;
67 if ($line =~ /([0-9a-f]+)\s([a-zA-Z])\s(\S+)/
83 open FD, "<$sysmap" || die $sysmap;
85 close(FD) || die $sysmap;
89 die "No symbols available\n"
94 die "Can't find system certificate list"
98 my $start = Math::BigInt->new($symbols{"__cert_list_start"});
101 my $size_sym = Math::BigInt->new($symbols{"system_certificate_list_size"});
103 open FD, "<$vmlinux" || die $vmlinux;
108 my $s_name = $sec->{name};
109 my $s_vma = $sec->{vma};
110 my $s_len = $sec->{len};
111 my $s_foff = $sec->{foff};
117 die "Certificate list size was not found on the same section\n"
120 die "Cert object in multiple sections: ", $s_name, " and ", $s->{name}, "\n"
123 my $size_off = $size_sym -$s_vma + $s_foff;
125 die $vmlinux if (!defined(sysseek(FD, $size_off, SEEK_SET)));
132 die "Cert object partially overflows section $s_name\n"
138 die "Cert object not inside a section\n"
141 print "Certificate list in section ", $s->{name}, "\n";
143 my $foff = $start - $s->{vma} + $s->{foff};
147 die $vmlinux if (!defined(sysseek(FD, $foff, SEEK_SET)));
150 die "$vmlinux" if (!defined($len));
151 die "Short read on $vmlinux\n" if ($len != $size);
152 close(FD) || die $vmlinux;
154 open FD, ">$keyring" || die $keyring;
157 die "$keyring" if (!defined($len));
158 die "Short write on $keyring\n" if ($len != $size);
159 close(FD) || die $keyring;