public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Fangrui Song <maskray@google.com>
Cc: libc-alpha@sourceware.org,  "H . J . Lu" <hjl.tools@gmail.com>
Subject: Re: [PATCH] elf: Remove __libc_init_secure
Date: Tue, 19 Apr 2022 11:25:56 +0200	[thread overview]
Message-ID: <8735i95srf.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20220418234738.3170499-1-maskray@google.com> (Fangrui Song's message of "Mon, 18 Apr 2022 16:47:38 -0700")

* Fangrui Song:

> After 73fc4e28b9464f0e13edc719a5372839970e7ddb,
> __libc_enable_secure_decided is always 0 and a statically linked
> executable may overwrite __libc_enable_secure with a value not
> considering AT_SECURE.
>
> The __libc_enable_secure has been correctly initialized in _dl_aux_init,
> so just remove __libc_enable_secure_decided and __libc_init_secure.
> This allows us to remove some linux/i386 functions from
> 22b79ed7f413cd980a7af0cf258da5bf82b6d5e5.

This causes a build failure on Hurd:

/home/bmg/install/compilers/i686-gnu/lib/gcc/i686-glibc-gnu/11.2.1/../../../../i686-glibc-gnu/bin/ld: /home/bmg/build/glibcs/i686-gnu/glibc/libc.a(init-first.o):/home/bmg/src/glibc/csu/../sysdeps/mach/hurd/i386/init-first.c:42: multiple definition of `__libc_enable_secure'; /home/bmg/build/glibcs/i686-gnu/glibc/libc.a(enbl-secure.o):/home/bmg/src/glibc/elf/enbl-secure.c:30: first defined here

I think you need to remove the definition from init-first.c.

You can also remove the startup_get*id definitions from
sysdeps/generic/startup.h because they are unused after these changes.

Thanks,
Florian


      reply	other threads:[~2022-04-19  9:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18 23:47 Fangrui Song
2022-04-19  9:25 ` Florian Weimer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735i95srf.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=maskray@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).