From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by sourceware.org (Postfix) with ESMTPS id 29962387087C for ; Fri, 29 Jan 2021 14:38:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 29962387087C Received: by mail-qk1-x730.google.com with SMTP id 19so8866531qkh.3 for ; Fri, 29 Jan 2021 06:38:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=tSovPct33B3liUG5XWtG/p9KAJlrrD3SA+JPQuHTl7Q=; b=mK5KZ284SpunBFcLIAjhZbuUdXPKgjAX81hBjND2GhkMbOCsl2uaLpVLyMSC2AYfqd pX29BrMpLlHBqsWN1DH43VtubSitBkpm2ycfMro2/8AwTgCZFCmRKyw5T8TruYP334cx XCnH3mMnKhZ+qjzV1JaVu06RItddExY0tr6XISNjGeHzle34pTMiE1kxSz3LAExcyg9a ShMA3VT3YZTSkjMce/5CEKNYCIm+pNv9pesHZWd7RVJNVOnBOiTEMsWe/x4+tgK34Afv JPjIxNqNBNN7m6h+wuwP5/8h/1jc6AXA1CD8LNFh/SB1wVga9FwYYqQ+Ste6VyHYNxfZ RKkQ== X-Gm-Message-State: AOAM532ePbkN1kJcOJu5ihmydb0y8exx/nEq2YzKPkMgDwMkbmf/ouw9 gQyKHk57MNCV7WZl6UJzAMUY3lVhmO4HDQ== X-Google-Smtp-Source: ABdhPJx1jAQtGPQ3P/8T1DOTklRh7XN5jmJtflaA9M6RQeizyi634xDWMYNLjGiIxaEbLOcDO6ppbg== X-Received: by 2002:a37:544:: with SMTP id 65mr4354464qkf.407.1611931136712; Fri, 29 Jan 2021 06:38:56 -0800 (PST) Received: from [192.168.1.4] ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id v18sm6115410qkv.62.2021.01.29.06.38.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Jan 2021 06:38:56 -0800 (PST) Subject: Re: [PATCH 2/3] elf: Replace a --defsym trick with an object file to be compatible with lld To: =?UTF-8?B?RsSBbmctcnXDrCBTw7JuZw==?= , Florian Weimer Cc: GNU C Library References: <20201228194855.510315-1-maskray@google.com> <20201228194855.510315-3-maskray@google.com> From: Adhemerval Zanella Autocrypt: addr=adhemerval.zanella@linaro.org; prefer-encrypt=mutual; keydata= mQINBFcVGkoBEADiQU2x/cBBmAVf5C2d1xgz6zCnlCefbqaflUBw4hB/bEME40QsrVzWZ5Nq 8kxkEczZzAOKkkvv4pRVLlLn/zDtFXhlcvQRJ3yFMGqzBjofucOrmdYkOGo0uCaoJKPT186L NWp53SACXguFJpnw4ODI64ziInzXQs/rUJqrFoVIlrPDmNv/LUv1OVPKz20ETjgfpg8MNwG6 iMizMefCl+RbtXbIEZ3TE/IaDT/jcOirjv96lBKrc/pAL0h/O71Kwbbp43fimW80GhjiaN2y WGByepnkAVP7FyNarhdDpJhoDmUk9yfwNuIuESaCQtfd3vgKKuo6grcKZ8bHy7IXX1XJj2X/ BgRVhVgMHAnDPFIkXtP+SiarkUaLjGzCz7XkUn4XAGDskBNfbizFqYUQCaL2FdbW3DeZqNIa nSzKAZK7Dm9+0VVSRZXP89w71Y7JUV56xL/PlOE+YKKFdEw+gQjQi0e+DZILAtFjJLoCrkEX w4LluMhYX/X8XP6/C3xW0yOZhvHYyn72sV4yJ1uyc/qz3OY32CRy+bwPzAMAkhdwcORA3JPb kPTlimhQqVgvca8m+MQ/JFZ6D+K7QPyvEv7bQ7M+IzFmTkOCwCJ3xqOD6GjX3aphk8Sr0dq3 4Awlf5xFDAG8dn8Uuutb7naGBd/fEv6t8dfkNyzj6yvc4jpVxwARAQABtElBZGhlbWVydmFs IFphbmVsbGEgTmV0dG8gKExpbmFybyBWUE4gS2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kvA+gNqSaK1NM9tY0eQ4iJpo+aoX8HAcn4sZzt2pfUB9vQMTBJ2d4+m/qO6+ cFTAceXmIoFsN8+gFN3i8Is3u12u8xGudcBPvpoy4OoG Message-ID: <4c4b4d3b-6265-7575-d1e8-879471121511@linaro.org> Date: Fri, 29 Jan 2021 11:38:53 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2021 14:39:00 -0000 On 27/01/2021 22:03, Fāng-ruì Sòng via Libc-alpha wrote: > On Wed, Jan 20, 2021 at 10:51 AM Fāng-ruì Sòng wrote: >> >> On Tue, Jan 19, 2021 at 4:31 AM H.J. Lu wrote: >>> >>> On Tue, Jan 19, 2021 at 12:50 AM Fāng-ruì Sòng wrote: >>>> >>>> On Mon, Jan 18, 2021 at 4:04 PM H.J. Lu wrote: >>>>> >>>>> On Mon, Dec 28, 2020 at 11:50 AM Fangrui Song via Libc-alpha >>>>> wrote: >>>>>> >>>>>> The existing code specifies -Wl,--defsym=malloc=0 and other malloc.os >>>>>> definitions before libc_pic.a so that libc_pic.a(malloc.os) is not >>>>>> fetched. This trick is used to avoid multiple definition errors which >>>>>> would happen as a chain result: >>>>>> >>>>>> dl-allobjs.os has an undefined __libc_scratch_buffer_set_array_size >>>>>> __libc_scratch_buffer_set_array_size fetches libc_pic.a(scratch_buffer_set_array_size.os) >>>>>> libc_pic.a(scratch_buffer_set_array_size.os) has an undefined free >>>>>> free fetches libc_pic.a(malloc.os) >>>>>> libc_pic.a(malloc.os) has an undefined __libc_message >>>>>> __libc_message fetches libc_pic.a(libc_fatal.os) >>>>>> >>>>>> libc_fatal.os will cause a multiple definition error (__GI___libc_fatal) >>>>>> >>> defined at dl-fxstatat64.c >>>>>> >>> /tmp/p/glibc/Release/elf/dl-allobjs.os:(__GI___libc_fatal) >>>>>> >>> defined at libc_fatal.c >>>>>> >>> libc_fatal.os:(.text+0x240) in archive /tmp/p/glibc/Release/libc_pic.a >>>>>> >>>>>> lld processes --defsym after all input files, so this trick does not >>>>>> suppress multiple definition errors with lld. Split the step into two >>>>>> and use an object file to make the intention more obvious and make lld >>>>>> work. >>>>>> >>>>>> This is conceptually more appropriate because --defsym defines a SHN_ABS >>>>>> symbol while a normal definition is relative to the image base. >>>>>> >>>>> >>>>> This is irrelevant since --defsym was used to create a temporary file which was >>>>> removed immediately after it was created: >>>>> >>>>> /usr/bin/gcc -nostdlib -nostartfiles -r -o >>>>> /export/users/hjl/build/gnu/tools-build/glibc-gitlab/build-x86_64-linux/elf/librtld.map.o >>>>> -Wl,--defsym=calloc=0 -Wl,--defsym=free=0 -Wl,--defsym=malloc=0 >>>>> -Wl,--defsym=realloc=0 -Wl,--defsym=__stack_chk_fail=0 >>>>> -Wl,--defsym=__stack_chk_fail_local=0 \ >>>>> '-Wl,-(' >>>>> /export/users/hjl/build/gnu/tools-build/glibc-gitlab/build-x86_64-linux/elf/dl-allobjs.os >>>>> /export/users/hjl/build/gnu/tools-build/glibc-gitlab/build-x86_64-linux/libc_pic.a >>>>> -lgcc '-Wl,-)' -Wl,-Map,/export/users/hjl/build/gnu/tools-build/glibc-gitlab/build-x86_64-linux/elf/librtld.mapT >>>>> rm -f /export/users/hjl/build/gnu/tools-build/glibc-gitlab/build-x86_64-linux/elf/librtld.map.o >>>>> mv -f /export/users/hjl/build/gnu/tools-build/glibc-gitlab/build-x86_64-linux/elf/librtld.mapT >>>>> /export/users/hjl/build/gnu/tools-build/glibc-gitlab/build-x86_64-linux/elf/librtld.map >>>>> >>>>>> --- >>>>>> elf/Makefile | 11 ++++------- >>>>>> 1 file changed, 4 insertions(+), 7 deletions(-) >>>>>> >>>>>> diff --git a/elf/Makefile b/elf/Makefile >>>>>> index 0b4d78c874..299bf24b49 100644 >>>>>> --- a/elf/Makefile >>>>>> +++ b/elf/Makefile >>>>>> @@ -524,10 +524,6 @@ rtld-stubbed-symbols = \ >>>>>> malloc \ >>>>>> realloc \ >>>>>> >>>>>> -# The GCC arguments that implement $(rtld-stubbed-symbols). >>>>>> -rtld-stubbed-symbols-args = \ >>>>>> - $(patsubst %,-Wl$(comma)--defsym=%=0, $(rtld-stubbed-symbols)) >>>>>> - >>>>>> ifeq ($(have-ssp),yes) >>>>>> # rtld is not built with the stack protector, so these references will >>>>>> # go away in the rebuilds. >>>>>> @@ -536,9 +532,10 @@ endif >>>>>> >>>>>> $(objpfx)librtld.map: $(objpfx)dl-allobjs.os $(common-objpfx)libc_pic.a >>>>>> @-rm -f $@T >>>>>> - $(reloc-link) -o $@.o $(rtld-stubbed-symbols-args) \ >>>>>> - '-Wl,-(' $^ -lgcc '-Wl,-)' -Wl,-Map,$@T >>>>>> - rm -f $@.o >>>>>> + echo '$(patsubst %,.globl %;,$(rtld-stubbed-symbols)) $(patsubst %,%:,$(rtld-stubbed-symbols))' | \ >>>>>> + $(CC) -o $@T.o $(ASFLAGS) -c -x assembler - >>>>> >>>>> Please generate >>>>> >>>>> .globl symbol; >>>>> symbol = 0; >>>>> >>>>> to make it closer to -Wl,--defsym=symbol=0. >>>> >>>> If symbol: and symbol = 0; work, isn't symbol: slightly better because >>>> it looks more normal? >>>> Or is the intention here using SHN_ABS to make it clear these symbols >>>> are special? >>> >>> Generate machine independent assembly codes is tricky. We should >>> make before and after the change as close as possible to avoid ANY >>> surprises. BTW, you need to check HAVE_ASM_SET_DIRECTIVE >>> to decide using ".set" vs "=". >>> >>> -- >>> H.J. >> >> Thanks for the tip. In this case I think the patch as is (sticking >> with `foo:`, don't use `foo = 0` or set) is better. >> foo: works everywhere. > > Ping. I think the patch as-is is better than the alternative approach > using either `=` or `.set`. The patch breaks both arc-linux-gnuhf and hppa-linux-gnu with recent ld.bfd 2.26, as below. We will need to sort these out. arc-linux-gnuhf: make[2]: Entering directory '/home/azanella/glibc/glibc-git/elf' echo '.globl calloc; .globl free; .globl malloc; .globl realloc; .globl __stack_chk_fail; .globl __stack_chk_fail_local; calloc: free: malloc: realloc: __stack_chk_fail: __stack_chk_fail_local:' | \ /home/azanella/toolchain/install/compilers/arc-linux-gnuhf/bin/arc-glibc-linux-gnuhf-gcc -o /home/azanella/glibc/build/arc-linux-gnuhf/elf/librtld.mapT.o -g -Werror=undef -Wa,--noexecstack -c -x assembler - /home/azanella/toolchain/install/compilers/arc-linux-gnuhf/bin/arc-glibc-linux-gnuhf-gcc -nostdlib -nostartfiles -r -o /home/azanella/glibc/build/arc-linux-gnuhf/elf/librtld.map.o /home/azanella/glibc/build/arc-linux-gnuhf/elf/librtld.mapT.o '-Wl,-(' /home/azanella/glibc/build/arc-linux-gnuhf/elf/dl-allobjs.os /home/azanella/glibc/build/arc-linux-gnuhf/libc_pic.a -lgcc '-Wl,-)' -Wl,-Map,/home/azanella/glibc/build/arc-linux-gnuhf/elf/librtld.mapT /home/azanella/toolchain/install/compilers/arc-linux-gnuhf/lib/gcc/arc-glibc-linux-gnuhf/10.2.1/../../../../arc-glibc-linux-gnuhf/bin/ld: /home/azanella/glibc/build/arc-linux-gnuhf/libc_pic.a(sbrk.os): in function `__GI___sbrk': /home/azanella/glibc/glibc-git/misc/sbrk.c:37: multiple definition of `__sbrk'; /home/azanella/glibc/build/arc-linux-gnuhf/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/../misc/sbrk.c:37: first defined here /home/azanella/toolchain/install/compilers/arc-linux-gnuhf/lib/gcc/arc-glibc-linux-gnuhf/10.2.1/../../../../arc-glibc-linux-gnuhf/bin/ld: /home/azanella/glibc/build/arc-linux-gnuhf/libc_pic.a(libc_fatal.os): in function `__GI___libc_fatal': /home/azanella/glibc/glibc-git/libio/../sysdeps/posix/libc_fatal.c:161: multiple definition of `__GI___libc_fatal'; /home/azanella/glibc/build/arc-linux-gnuhf/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/dl-minimal.c:267: first defined here /home/azanella/toolchain/install/compilers/arc-linux-gnuhf/lib/gcc/arc-glibc-linux-gnuhf/10.2.1/../../../../arc-glibc-linux-gnuhf/bin/ld: /home/azanella/glibc/build/arc-linux-gnuhf/libc_pic.a(libc_fatal.os): in function `__GI___libc_fatal': /home/azanella/glibc/glibc-git/libio/../sysdeps/posix/libc_fatal.c:161: multiple definition of `__libc_fatal'; /home/azanella/glibc/build/arc-linux-gnuhf/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/dl-minimal.c:267: first defined here /home/azanella/toolchain/install/compilers/arc-linux-gnuhf/lib/gcc/arc-glibc-linux-gnuhf/10.2.1/../../../../arc-glibc-linux-gnuhf/bin/ld: /home/azanella/glibc/build/arc-linux-gnuhf/libc_pic.a(_itoa.os): in function `_itoa': /home/azanella/glibc/glibc-git/stdio-common/_itoa.c:196: multiple definition of `_itoa'; /home/azanella/glibc/build/arc-linux-gnuhf/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/dl-minimal.c:323: first defined here /home/azanella/toolchain/install/compilers/arc-linux-gnuhf/lib/gcc/arc-glibc-linux-gnuhf/10.2.1/../../../../arc-glibc-linux-gnuhf/bin/ld: /home/azanella/glibc/build/arc-linux-gnuhf/libc_pic.a(getcwd.os): in function `__GI___getcwd': /home/azanella/glibc/glibc-git/io/../sysdeps/unix/sysv/linux/getcwd.c:50: multiple definition of `__getcwd'; /home/azanella/glibc/build/arc-linux-gnuhf/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/../sysdeps/unix/sysv/linux/getcwd.c:50: first defined here /home/azanella/toolchain/install/compilers/arc-linux-gnuhf/lib/gcc/arc-glibc-linux-gnuhf/10.2.1/../../../../arc-glibc-linux-gnuhf/bin/ld: /home/azanella/glibc/build/arc-linux-gnuhf/libc_pic.a(dl-error.os): in function `__GI__dl_signal_exception': /home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:91: multiple definition of `_dl_signal_exception'; /home/azanella/glibc/build/arc-linux-gnuhf/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:91: first defined here /home/azanella/toolchain/install/compilers/arc-linux-gnuhf/lib/gcc/arc-glibc-linux-gnuhf/10.2.1/../../../../arc-glibc-linux-gnuhf/bin/ld: /home/azanella/glibc/build/arc-linux-gnuhf/libc_pic.a(dl-error.os): in function `__GI__dl_signal_error': /home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:109: multiple definition of `_dl_signal_error'; /home/azanella/glibc/build/arc-linux-gnuhf/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:109: first defined here /home/azanella/toolchain/install/compilers/arc-linux-gnuhf/lib/gcc/arc-glibc-linux-gnuhf/10.2.1/../../../../arc-glibc-linux-gnuhf/bin/ld: /home/azanella/glibc/build/arc-linux-gnuhf/libc_pic.a(dl-error.os): in function `__GI__dl_catch_exception': /home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:175: multiple definition of `_dl_catch_exception'; /home/azanella/glibc/build/arc-linux-gnuhf/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:175: first defined here /home/azanella/toolchain/install/compilers/arc-linux-gnuhf/lib/gcc/arc-glibc-linux-gnuhf/10.2.1/../../../../arc-glibc-linux-gnuhf/bin/ld: /home/azanella/glibc/build/arc-linux-gnuhf/libc_pic.a(dl-error.os): in function `__GI__dl_catch_error': /home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:225: multiple definition of `_dl_catch_error'; /home/azanella/glibc/build/arc-linux-gnuhf/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:225: first defined here collect2: error: ld returned 1 exit status make[2]: *** [Makefile:538: /home/azanella/glibc/build/arc-linux-gnuhf/elf/librtld.map] Error 1 hppa-linux-gnu: echo '.globl calloc; .globl free; .globl malloc; .globl realloc; calloc: free: malloc: realloc:' | \ /home/azanella/toolchain/install/compilers/hppa-linux-gnu/bin/hppa-glibc-linux-gnu-gcc -o /home/azanella/glibc/build/hppa-linux-gnu/elf/librtld.mapT.o -g -Werror=undef -c -x assembler - /home/azanella/toolchain/install/compilers/hppa-linux-gnu/bin/hppa-glibc-linux-gnu-gcc -nostdlib -nostartfiles -r -o /home/azanella/glibc/build/hppa-linux-gnu/elf/librtld.map.o /home/azanella/glibc/build/hppa-linux-gnu/elf/librtld.mapT.o '-Wl,-(' /home/azanella/glibc/build/hppa-linux-gnu/elf/dl-allobjs.os /home/azanella/glibc/build/hppa-linux-gnu/libc_pic.a -lgcc '-Wl,-)' -Wl,-Map,/home/azanella/glibc/build/hppa-linux-gnu/elf/librtld.mapT /home/azanella/toolchain/install/compilers/hppa-linux-gnu/lib/gcc/hppa-glibc-linux-gnu/10.2.1/../../../../hppa-glibc-linux-gnu/bin/ld: /home/azanella/glibc/build/hppa-linux-gnu/libc_pic.a(sbrk.os): in function `__GI___sbrk': /home/azanella/glibc/glibc-git/misc/sbrk.c:37: multiple definition of `__sbrk'; /home/azanella/glibc/build/hppa-linux-gnu/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/../misc/sbrk.c:37: first defined here /home/azanella/toolchain/install/compilers/hppa-linux-gnu/lib/gcc/hppa-glibc-linux-gnu/10.2.1/../../../../hppa-glibc-linux-gnu/bin/ld: /home/azanella/glibc/build/hppa-linux-gnu/libc_pic.a(libc_fatal.os): in function `__GI___libc_fatal': /home/azanella/glibc/glibc-git/libio/../sysdeps/posix/libc_fatal.c:161: multiple definition of `__GI___libc_fatal'; /home/azanella/glibc/build/hppa-linux-gnu/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/dl-minimal.c:268: first defined here /home/azanella/toolchain/install/compilers/hppa-linux-gnu/lib/gcc/hppa-glibc-linux-gnu/10.2.1/../../../../hppa-glibc-linux-gnu/bin/ld: /home/azanella/glibc/build/hppa-linux-gnu/libc_pic.a(libc_fatal.os): in function `__GI___libc_fatal': /home/azanella/glibc/glibc-git/libio/../sysdeps/posix/libc_fatal.c:161: multiple definition of `__libc_fatal'; /home/azanella/glibc/build/hppa-linux-gnu/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/dl-minimal.c:268: first defined here /home/azanella/toolchain/install/compilers/hppa-linux-gnu/lib/gcc/hppa-glibc-linux-gnu/10.2.1/../../../../hppa-glibc-linux-gnu/bin/ld: /home/azanella/glibc/build/hppa-linux-gnu/libc_pic.a(_itoa.os): in function `_itoa': /home/azanella/glibc/glibc-git/stdio-common/_itoa.c:196: multiple definition of `_itoa'; /home/azanella/glibc/build/hppa-linux-gnu/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/dl-minimal.c:323: first defined here /home/azanella/toolchain/install/compilers/hppa-linux-gnu/lib/gcc/hppa-glibc-linux-gnu/10.2.1/../../../../hppa-glibc-linux-gnu/bin/ld: /home/azanella/glibc/build/hppa-linux-gnu/libc_pic.a(getcwd.os): in function `__GI___getcwd': /home/azanella/glibc/glibc-git/io/../sysdeps/unix/sysv/linux/getcwd.c:50: multiple definition of `__getcwd'; /home/azanella/glibc/build/hppa-linux-gnu/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/../sysdeps/unix/sysv/linux/getcwd.c:50: first defined here /home/azanella/toolchain/install/compilers/hppa-linux-gnu/lib/gcc/hppa-glibc-linux-gnu/10.2.1/../../../../hppa-glibc-linux-gnu/bin/ld: /home/azanella/glibc/build/hppa-linux-gnu/libc_pic.a(dl-error.os): in function `__GI__dl_signal_exception': /home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:91: multiple definition of `_dl_signal_exception'; /home/azanella/glibc/build/hppa-linux-gnu/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:91: first defined here /home/azanella/toolchain/install/compilers/hppa-linux-gnu/lib/gcc/hppa-glibc-linux-gnu/10.2.1/../../../../hppa-glibc-linux-gnu/bin/ld: /home/azanella/glibc/build/hppa-linux-gnu/libc_pic.a(dl-error.os): in function `__GI__dl_signal_error': /home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:109: multiple definition of `_dl_signal_error'; /home/azanella/glibc/build/hppa-linux-gnu/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:109: first defined here /home/azanella/toolchain/install/compilers/hppa-linux-gnu/lib/gcc/hppa-glibc-linux-gnu/10.2.1/../../../../hppa-glibc-linux-gnu/bin/ld: /home/azanella/glibc/build/hppa-linux-gnu/libc_pic.a(dl-error.os): in function `__GI__dl_catch_exception': /home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:175: multiple definition of `_dl_catch_exception'; /home/azanella/glibc/build/hppa-linux-gnu/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:175: first defined here /home/azanella/toolchain/install/compilers/hppa-linux-gnu/lib/gcc/hppa-glibc-linux-gnu/10.2.1/../../../../hppa-glibc-linux-gnu/bin/ld: /home/azanella/glibc/build/hppa-linux-gnu/libc_pic.a(dl-error.os): in function `__GI__dl_catch_error': /home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:225: multiple definition of `_dl_catch_error'; /home/azanella/glibc/build/hppa-linux-gnu/elf/dl-allobjs.os:/home/azanella/glibc/glibc-git/elf/dl-error-skeleton.c:225: first defined here collect2: error: ld returned 1 exit status