mold icon indicating copy to clipboard operation
mold copied to clipboard

`mold -d` unsupported

Open rossburton opened this issue 3 years ago • 2 comments

When building glibc with mold:

aarch64-poky-linux-gcc  -march=armv8-a+crc  --sysroot=BUILD/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=BUILD=/usr/src/debug/glibc/2.34-r0 -fdebug-prefix-map=BUILD=/usr/src/debug/glibc/2.34-r0                      -fdebug-prefix-map=BUILD/recipe-sysroot=  -fdebug-prefix-map=BUILD/recipe-sysroot-native=  -fuse-ld=mold -Wl,-z,relro,-z,now  -nostdlib -nostartfiles -r -o BUILD/build-aarch64-poky-linux/libc_pic.os -Wl,-d -Wl,--whole-archive BUILD/build-aarch64-poky-linux/libc_pic.a -o BUILD/build-aarch64-poky-linux/libc_pic.os
mold: unknown command line option: -d

rossburton avatar Jan 27 '22 15:01 rossburton

Thanks. Here is an excerpt from GNU ld's manual.

       -d
       -dc
       -dp These three options are equivalent; multiple forms are supported
           for compatibility with other linkers.  They assign space to common
           symbols even if a relocatable output file is specified (with -r).
           The script command "FORCE_COMMON_ALLOCATION" has the same effect.

rui314 avatar Jan 27 '22 23:01 rui314

These options were legacy and we'd better avoid them. I have only seen the usage in very few pieces of software. At this point I have removed all I saw

  • grub: https://git.savannah.gnu.org/cgit/grub.git/commit/?h=b16257b51bc6b58b47b016d3f88f6bd1c6b39dcd
  • glibc (milestone: 2.36): https://sourceware.org/git/?p=glibc.git;a=commit;h=dbb0f06cc09784f6229cc1736c4af8caa687975f

MaskRay avatar Jun 26 '22 22:06 MaskRay