undefined reference to `drm_fb_helper_fini'

Marc Kleine-Budde mkl at pengutronix.de
Tue Jan 21 12:06:48 UTC 2025


Hello,

while working on something completely different, I stumbled over this
linker problem, during final linking of the kernel.

- ARCH=arm64
- linux: v6.13
- gcc version 12.2.0 (Debian 12.2.0-14)
- GNU ld (GNU Binutils for Debian) 2.40
- .config is attached

| aarch64-linux-gnu-ld: Unexpected GOT/PLT entries detected!
| aarch64-linux-gnu-ld: Unexpected run-time procedure linkages detected!
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_fb_destroy':
| drivers/gpu/drm/drm_fbdev_shmem.c:62: undefined reference to `drm_fb_helper_fini'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.c:67: undefined reference to `drm_fb_helper_unprepare'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_fb_mmap':
| drivers/gpu/drm/drm_fbdev_shmem.c:45: undefined reference to `drm_gem_fb_get_obj'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_defio_imageblit':
| drivers/gpu/drm/drm_fbdev_shmem.c:37: undefined reference to `drm_fb_helper_damage_area'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_defio_copyarea':
| drivers/gpu/drm/drm_fbdev_shmem.c:37: undefined reference to `drm_fb_helper_damage_area'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_defio_fillrect':
| drivers/gpu/drm/drm_fbdev_shmem.c:37: undefined reference to `drm_fb_helper_damage_area'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_defio_write':
| drivers/gpu/drm/drm_fbdev_shmem.c:37: undefined reference to `drm_fb_helper_damage_range'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_driver_fbdev_probe':
| drivers/gpu/drm/drm_fbdev_shmem.c:171: undefined reference to `drm_fb_helper_alloc_info'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.c:177: undefined reference to `drm_fb_helper_fill_info'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.c:192: undefined reference to `drm_fb_helper_deferred_io'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `drm_fb_helper_deferred_io' which may bind externally can not be used when making a shared object; recompile with -fPIC
| drivers/gpu/drm/drm_fbdev_shmem.c:192:(.text+0x54c): dangerous relocation: unsupported relocation
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.c:192: undefined reference to `drm_fb_helper_deferred_io'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.c:202: undefined reference to `drm_fb_helper_release_info'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_get_page':
| drivers/gpu/drm/drm_fbdev_shmem.c:86: undefined reference to `drm_gem_fb_get_obj'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o:(.rodata+0x38): undefined reference to `drm_fb_helper_check_var'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o:(.rodata+0x40): undefined reference to `drm_fb_helper_set_par'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o:(.rodata+0x50): undefined reference to `drm_fb_helper_setcmap'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o:(.rodata+0x58): undefined reference to `drm_fb_helper_blank'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o:(.rodata+0x60): undefined reference to `drm_fb_helper_pan_display'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o:(.rodata+0x90): undefined reference to `drm_fb_helper_ioctl'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o:(.rodata+0xb8): undefined reference to `drm_fb_helper_debug_enter'
| aarch64-linux-gnu-ld: drivers/gpu/drm/drm_fbdev_shmem.o:(.rodata+0xc0): undefined reference to `drm_fb_helper_debug_leave'

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config-drm-broken.gz
Type: application/gzip
Size: 55205 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250121/8156456b/attachment-0001.gz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250121/8156456b/attachment-0001.sig>


More information about the dri-devel mailing list