Commit ID f4d984e4b92aaeb67f9c8f72082542f6d979a330
![]() |
Contributor: | wilco | Files Modified | 5 |
Date: | 16-October-2019 at 14:24 | Lines Added: | 27 | |
Repository: | git://gcc.gnu.org/git/gcc.git master | Lines Removed: | 22 | |
Commit Comment: | [AArch64] Fix symbol offset limit In aarch64_classify_symbol symbols are allowed large offsets on relocations. This means the offset can use all of the +/-4GB offset, leaving no offset available for the symbol itself. This results in relocation overflow and link-time errors for simple expressions like &global_array + 0xffffff00. To avoid this, unless the offset_within_block_p is true, limit the offset to +/-1MB so that the symbol needs to be within a 3.9GB offset from its references. For the tiny code model use a 64KB offset, allowing most of the 1MB range for code/data between the symbol and its references. gcc/ * config/aarch64/aarch64.c (aarch64_classify_symbol): Apply reasonable limit to symbol offsets. testsuite/ * gcc.target/aarch64/symbol-range.c: Improve testcase. * gcc.target/aarch64/symbol-range-tiny.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@277068 138bc75d-0d04-0410-961f-82ee72b054a4 |
Language | Code Added | Code Removed | Comments Added | Comments Removed | Blanks Added | Blanks Removed | |
---|---|---|---|---|---|---|---|
C | 14 | 13 | 9 | 9 | 4 | 0 |
File | Language | Code Added | Code Removed | Comments Added | Comments Removed | Blanks Added | Blanks Removed | |
---|---|---|---|---|---|---|---|---|
gcc/ChangeLog | No source code was detected in this file. | |||||||
gcc/config/aarch64/aarch64.c | C | 8 | 7 | 7 | 7 | 4 | 0 | |
gcc/testsuite/ChangeLog | No source code was detected in this file. | |||||||
gcc/testsuite/gcc.target/aarch64/symbol-... | C | 3 | 3 | 1 | 1 | 0 | 0 | |
gcc/testsuite/gcc.target/aarch64/symbol-... | C | 3 | 3 | 1 | 1 | 0 | 0 |