From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 8B74D3839C45 for ; Mon, 28 Jun 2021 19:43:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8B74D3839C45 Received: by mail-ot1-x333.google.com with SMTP id 7-20020a9d0d070000b0290439abcef697so20037309oti.2 for ; Mon, 28 Jun 2021 12:43:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CotNSma0D/PjPumE1lPFaGYRuJG5xnhWJyA6oUd9ZDg=; b=ZkuKEa7sucUxbtJBfIw7tSPmuwxz4EaGrV/T4w2xdj3NeXU0cFmmOAascgjljnjDQn dHrJhdjUexOH9Jf09QavJzBEVqjHevKwDOLga2qMquyO6gjEUF7g0ks3KMpT5Upvn4Zq 3LPTW+AvzjuV4HdAORArYwHzp3nZ0n5dhlBfd1HDoRAJ14NC8JPaHGd3BW3UoDJ5WTgJ BehAdIHTeAyMg9tiqPHHsw+rPmSqgGa9UFd6zPcNiz24zwWBNDCZ81p9j8YnoZopnCbD HIn8oIm6GL+6uGXaQh20j5B5VUjk4q1azIM1Vh3Hy23su6xrYIoLfq4/GW8++GtW1CvM ONJQ== X-Gm-Message-State: AOAM533p0XskoV8YPBivZ0tTfjPR/nTXScTZIyqhTB9kenboh17jXQJy tyhXUy+RBH8g9tg9xj6QDmTsPZWEJeYWIOjJdOY= X-Google-Smtp-Source: ABdhPJx87EJWj/60l1NXK4yqPWC2cK6b1g21K1gYrrDqs5uoXqY9vuP+roznLz/ar5TPZUbFVhx6SrFMzV2rGjy3IU4= X-Received: by 2002:a9d:2781:: with SMTP id c1mr1074508otb.34.1624909382957; Mon, 28 Jun 2021 12:43:02 -0700 (PDT) MIME-Version: 1.0 References: <87pmwcxqsb.fsf@oldenburg.str.redhat.com> In-Reply-To: <87pmwcxqsb.fsf@oldenburg.str.redhat.com> From: George Hodgkins Date: Mon, 28 Jun 2021 13:42:52 -0600 Message-ID: Subject: Re: Diagnosing symbol conflicts in modified glibc build To: Florian Weimer Cc: George Hodgkins via Libc-help X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, 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 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 19:43:04 -0000 Unfortunately, that doesn't seem to resolve the issue. There are actually parts of our code that need to be linked into the loader, but as an experiment I tried wrapping all of our code in the macros you suggested. The same errors occurred. -George On Wed, Jun 23, 2021 at 2:35 PM Florian Weimer wrote: > * George Hodgkins via Libc-help: > > > With that extensive preamble, the actual problem we are facing is the > > failure of this command: > > ################# > > cc -nostdlib -nostartfiles -r -o /glibc-wsp/build/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,-(' /glibc-wsp/build/elf/dl-allobjs.os > > /glibc-wsp/build/libc_pic.a -lgcc '-Wl,-)' > > -Wl,-Map,/glibc-wsp/build/elf/librtld.mapT > > /glibc-wsp/build/libc_pic.a(getcwd.os): In function `__GI___getcwd': > > /glibc-wsp/src/io/../sysdeps/unix/sysv/linux/getcwd.c:47: multiple > > definition of `__getcwd' > > > /glibc-wsp/build/elf/dl-allobjs.os:/glibc-wsp/src/elf/../sysdeps/unix/sysv/linux/getcwd.c:47: > > first defined here > > This probably means that you are linking more into the dynamic loader > than you intend. You may have to cover your own additions with > #if IS_IN (libc) or #if !IS_IN (rtld). > > Thanks, > Florian > >