Does anyone meet this strange error about generating library in linux? lazarus / 21-General ---------------------------------------------------------------------- TYDQ · 2024-06-26 11:58 I was trying to generate an dynamic library without using fpc.cfg and standard library.I want to run bash test.sh to generate the linux dynamic library (*.so) to use as a middle file to generate uefi application by using GenFw(EDK2 provided this tool).However,I discovered that my linux dynamic library linked is too tiny(One of My pascal code files is larger than it,Does my shell code wrong?) to generate an uefi application.my linux dynamic library is only 13.6 kb size,and using every method I can't know its function and entry inside.Does I use fpc command line with mistake? When I use readelf,it tells me that There are no section groups in this file. My file is attached in this topic,Everyone who can discover my mistake can download it. ---------------------------------------------------------------------- TYDQ · 2024-06-26 15:31 If I replace -XXs with -Xs,the library could be bigger but It can't boot when convert elf to efi using GenFw. Is it the error of fpc -XXs or me? ---------------------------------------------------------------------- Thaddy · 2024-06-26 15:34 You. stripping information from libraries is not a good idea. From executables it is usually OK. ---------------------------------------------------------------------- TYDQ · 2024-06-26 15:44 Quote from: Thaddy on June 26, 2024, 05:34:11 pmYou. stripping information from libraries is not a good idea. From executables it is usually OK. If I add -XX to the fpc,The generated library will be too tiny to be convert.Whenever I add -O- or -O4,Whenever I add -Xs. So do you have the idea to compile library with reasonable size? ---------------------------------------------------------------------- Thaddy · 2024-06-26 15:53 YOU are resonsible for that: libraries need to be compiled with ALL code in place, otherwise they can not be used. It is a matter of discipline. So the answer is: write better code and just exclude the debug info. -Xs is not allowed... ---------------------------------------------------------------------- TYDQ · 2024-06-27 01:42 Quote from: Thaddy on June 26, 2024, 05:53:13 pmYOU are resonsible for that: libraries need to be compiled with ALL code in place, otherwise they can not be used. It is a matter of discipline. So the answer is: write better code and just exclude the debug info. -Xs is not allowed... OK,I will try this,if I meet any error,I will report to you.