小编jas*_*son的帖子

如何修复“危险的搬迁:不受支持的搬迁”

我正在编译 linux-4.19(gcc-8.2 bintutils-2.31),但是它总是失败并出现如下错误:

aarch64-oe-linux-ld.bfd: drivers/platform/gsi/gsi.o: relocation R_AARCH64_ABS32 against `__crc_gsi_write_channel_scratch' can not be used when making a shared object
aarch64-oe-linux-ld.bfd: drivers/platform/gsi/gsi.o:/usr/src/kernel/drivers/platform/gsi/gsi.c:4383:(.data+0x0): dangerous relocation: unsupported relocation
aarch64-oe-linux-ld.bfd: drivers/platform/gsi/gsi.o:(.data+0x28): dangerous relocation: unsupported relocation
aarch64-oe-linux-ld.bfd: drivers/platform/gsi/gsi.o:(.data+0x50): dangerous relocation: unsupported relocation
aarch64-oe-linux-ld.bfd: drivers/platform/gsi/gsi.o:(__verbose+0x0): dangerous relocation: unsupported relocation
aarch64-oe-linux-ld.bfd: drivers/platform/gsi/gsi.o:(__verbose+0x8): dangerous relocation: unsupported relocation
Run Code Online (Sandbox Code Playgroud)

我尝试了以下解决方案,但这些都不起作用。

  1. -fPIC向驱动程序添加标志
  2. 使用 gcc-7.3 (binutils-2.31)
  3. 使用 binutils-2.33 (gcc-8.2)

c linux gcc

5
推荐指数
1
解决办法
2571
查看次数

标签 统计

c ×1

gcc ×1

linux ×1