scripts: process_gperf: upgrade the asso_values type to unsigned short
The gperf tool automatically selects the optimal data type for the asso_values table, depending on MAX_HASH_VALUE. However, there is a corner case when the tables generated on different stages of the build process have different data types, causing a link-time error. Upgrade the data type for the table from unsigned char to unsigned short to at least exclude this 8-bit to 16-bit transition. There is another potential issue with the 16-bit to 32-bit transition, but it seems not very likely to have 65k kernel objects anytime soon. Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
This commit is contained in:
parent
5be4aed620
commit
3068f668d9
1 changed files with 3 additions and 0 deletions
|
@ -126,6 +126,9 @@ def process_line(line, fp):
|
|||
# and just turn them into pointers
|
||||
line = re.sub(r'["].*["]', reformat_str, line)
|
||||
|
||||
# Use a bigger data type for the asso_values table to provide some margin
|
||||
line = re.sub(r'char asso_values', r'short asso_values', line)
|
||||
|
||||
fp.write(line)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue