Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

efivar-38: ld.lld: error: unable to insert .data after .data #219

Closed
nvinson opened this issue Jun 18, 2022 · 1 comment
Closed

efivar-38: ld.lld: error: unable to insert .data after .data #219

nvinson opened this issue Jun 18, 2022 · 1 comment

Comments

@nvinson
Copy link

nvinson commented Jun 18, 2022

The guids.lds contains the line insert .data after .data which causes ld.lld to fail to link. The build log is below:

clang -Og  -g3 -Wall -Wextra  -Werror  -std=gnu11 -funsigned-char -fvisibility=hidden   -L.   -Wl,--build-id -Wl,--no-allow-shlib-undefined -Wl,--no-undefined-version -Wl,-z,now -Wl,-z,muldefs -Wl,-z,relro -Wl,--fatal-warnings -rtlib=compiler-rt    -DLIBEFIVAR_VERSION=38 -D_GNU_SOURCE -I/data/nvinson/efivar/src/include/  -shared -Wl,-soname,libefivar.so.1 -Wl,--version-script=libefivar.map  \
	-T guids.lds \
	-o libefivar.so crc32.o dp.o dp-acpi.o dp-hw.o dp-media.o dp-message.o efivarfs.o error.o export.o guid.o guid-symbols.o lib.o vars.o time.o -ldl 
ld.lld: error: unable to insert .data after .data
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [/data/nvinson/efivar/src/include/rules.mk:39: libefivar.so] Error 1
make[1]: Leaving directory '/data/nvinson/efivar/src'
make: *** [Makefile:14: all] Error 2

Removing the -T guids.lds allows the build to succeed. This can be achieved by ensuring LD_DASH_T in workarounds.mk is unset.

@frozencemetery
Copy link
Member

Hopefully fixed with #222.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants