During initialization, reject useless ARM64 "(A)" and "(a)" absolute

symbols that are below the text region.  Without the patch, several
recently-introduced absolute symbols have been introduced into the
kernel, which will be displayed by "sym -l" prior to the first kernel
virtual address symbol, and will show up in command output where
memory values are translated into kernel symbol references.
(anderson@redhat.com)
This commit is contained in:
Dave Anderson 2015-03-19 14:04:44 -04:00
parent eff086f2d4
commit 19d7200112

View File

@ -1,8 +1,8 @@
/*
* arm64.c - core analysis suite
*
* Copyright (C) 2012-2014 David Anderson
* Copyright (C) 2012-2014 Red Hat, Inc. All rights reserved.
* Copyright (C) 2012-2015 David Anderson
* Copyright (C) 2012-2015 Red Hat, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -243,6 +243,9 @@ arm64_verify_symbol(const char *name, ulong value, char type)
if (!name || !strlen(name))
return FALSE;
if (((type == 'A') || (type == 'a')) && (highest_bit_long(value) != 63))
return FALSE;
if ((value == 0) &&
((type == 'a') || (type == 'n') || (type == 'N') || (type == 'U')))
return FALSE;