diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-07-07 17:44:41 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-07-07 17:44:41 +0200 |
commit | 1e0429e5f39ec219cbef3af2752528b8a29bc1be (patch) | |
tree | 5bd94e532ac57fca37699a5e810087ffc39ee914 /linux/src/include/asm-i386/segment.h | |
parent | ba76c46181ca2bcbdf99bca0e2c23cc9e484de0d (diff) |
Fix build with -O0
* linux/src/include/linux/string.h (strcpy, strncpy, strcat, strncat,
strchr, strrchr, strlen, strnlen, strcmp, strncmp, memmove,
memscan): Comment out extern declarations.
* linux/dev/include/asm-i386/string.h (strcpy, strncpy, strcat, strncat,
strcmp, strncmp, strchr, strrchr, strlen, __memcpy, __constant_memcpy,
memmove, memchr, __memset_generic, __constant_c_memset, strnlen,
__constant_c_and_count_memset, memscan): Turn extern inline into static
inline.
* linux/dev/include/linux/fs.h (mark_buffer_uptodate): Likewise.
* linux/src/include/asm-i386/bitops.h (set_bit, clear_bit, change_bit,
test_and_set_bit, test_and_clear_bit, test_and_change_bit, test_bit,
find_first_zero_bit, find_next_zero_bit, ffz, ffs): Likewise.
* linux/src/include/asm-i386/io.h (virt_to_phys, phys_to_virt, __out##s,
__in##s, ins##s, outs##s): Likewise.
* linux/src/include/asm-i386/semaphore.h (down, down_interruptible, up):
Likewise.
* linux/src/include/asm-i386/segment.h [!__OPTIMIZE]: Emit an ud2 instruction
instead of an undefined reference.
Diffstat (limited to 'linux/src/include/asm-i386/segment.h')
-rw-r--r-- | linux/src/include/asm-i386/segment.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/src/include/asm-i386/segment.h b/linux/src/include/asm-i386/segment.h index 5f8af99..d23aa17 100644 --- a/linux/src/include/asm-i386/segment.h +++ b/linux/src/include/asm-i386/segment.h @@ -60,7 +60,11 @@ static inline void __attribute__((always_inline)) __put_user(unsigned long x, vo :"ir" (x), "m" (*__sd(y))); break; default: +#ifdef __OPTIMIZE__ bad_user_access_length(); +#else + asm volatile("ud2"); +#endif } } @@ -85,7 +89,11 @@ static inline unsigned long __attribute__((always_inline)) __get_user(const void :"m" (*__const_sd(y))); return result; default: +#ifdef __OPTIMIZE__ return bad_user_access_length(); +#else + asm volatile("ud2"); +#endif } } |