public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Siddhesh Poyarekar <siddhesh@gotplt.org>,
	"H.J. Lu" <hjl.tools@gmail.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH 00/20] RFC: Add the CPU run-time library for C
Date: Mon, 18 Jun 2018 13:42:00 -0000	[thread overview]
Message-ID: <57ec6b9e-ed17-f94d-0bdc-e225381e6a5a@redhat.com> (raw)
In-Reply-To: <db2d9c65-2544-b021-4d49-1eefeb51e38a@gotplt.org>

On 06/13/2018 04:19 PM, Siddhesh Poyarekar wrote:
> On 06/13/2018 06:55 PM, Florian Weimer wrote:
>> It would be another thing to build a static PIC string library from 
>> sources and link that both into libc.so and this new support library. 
>> Then the build process would at least be aligned.  But I don't think 
>> our current build system is up for that.
> 
> Why so?  Are there dependencies that avoid splitting out a 
> libstring_pic.a that builds only the string routines and then links that 
> into everything that needs it, i.e. libc.so, libc.a, libc-rt.so, etc.?

I don't think there are any actual obstacles in the code, or at least 
not that many.  It's just that it would be difficult to express this in 
the current build system, in a concise manner.

> Ideally I'd like to see something like this happen but it is a crazy 
> long term project:
> 
> 1. Put sysdeps for specific routines into their respective directories. 
> That is, elf/sysdeps, math/sysdeps, string/sysdeps, etc.
> 
> 2. Support building all of these as separate lib*_pic.a that then gets 
> integrated at the top
> 
> 3. Add a new target in string/Makefile that builds a libstring-rt.so 
> from its libstring_pic.a
> 
> 4. Pull string out into a separate project and make it a submodule of 
> the glibc repo.
> 
> This could even get used to replace libio in future, where 
> libio-3.0_pic.a gets linked in by default and libio-2.x_pic.a is built 
> into a libio_compat.so that can then be preloaded for programs that need 
> it.

Not sure if this is the right approach.  Another way of doing this would 
involve linking almost all of libc_pic.a (basically everything without 
initializers), while restricting symbol visibility to a subset of the 
symbols.  ld should discard all objects which define only unexported and 
otherwise unused symbols.

Thanks,
Florian

  reply	other threads:[~2018-06-18 13:42 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12 22:19 H.J. Lu
2018-06-12 22:19 ` [PATCH 02/20] libcpu-rt-c/x86: Add cacheinfo H.J. Lu
2018-06-12 22:19 ` [PATCH 03/20] libcpu-rt-c/x86: Add cpu-rt-tunables.c H.J. Lu
2018-06-12 22:19 ` [PATCH 07/20] libcpu-rt-c/x86-64: Add memrchr H.J. Lu
2018-06-12 22:19 ` [PATCH 08/20] libcpu-rt-c/x86-64: Add memset and wmemset H.J. Lu
2018-06-12 22:19 ` [PATCH 04/20] libcpu-rt-c/x86-64: Add memchr H.J. Lu
2018-06-12 22:20 ` [PATCH 17/20] libcpu-rt-c/x86-64: Add strncat H.J. Lu
2018-06-12 22:20 ` [PATCH 14/20] libcpu-rt-c/x86-64: Add strlen H.J. Lu
2018-06-12 22:20 ` [PATCH 10/20] libcpu-rt-c: Don't use IFUNC memcmp in init_cpu_features H.J. Lu
2018-06-12 22:20 ` [PATCH 19/20] libcpu-rt-c/x86-64: Add strncpy H.J. Lu
2018-06-12 22:20 ` [PATCH 18/20] libcpu-rt-c/x86-64: Add strncmp H.J. Lu
2018-06-12 22:20 ` [PATCH 13/20] libcpu-rt-c/x86-64: Add strcpy H.J. Lu
2018-06-12 22:20 ` [PATCH 05/20] libcpu-rt-c/x86-64: Add memcmp H.J. Lu
2018-06-12 22:20 ` [PATCH 09/20] libcpu-rt-c/i386: " H.J. Lu
2018-06-12 22:20 ` [PATCH 12/20] libcpu-rt-c/x86-64: Add strcmp H.J. Lu
2018-06-12 22:20 ` [PATCH 20/20] libcpu-rt-c/x86-64: Add strrchr H.J. Lu
2018-06-12 22:20 ` [PATCH 06/20] libcpu-rt-c/x86-64: Add memcpy, memmove and mempcpy H.J. Lu
2018-06-12 22:20 ` [PATCH 01/20] Initial empty CPU run-time library for C: libcpu-rt-c H.J. Lu
2018-06-12 23:21   ` Joseph Myers
2018-06-13 11:21     ` H.J. Lu
2018-06-12 22:20 ` [PATCH 11/20] libcpu-rt-c/x86-64: Add strchr H.J. Lu
2018-06-12 22:20 ` [PATCH 16/20] libcpu-rt-c/x86-64: Add strnlen H.J. Lu
2018-06-12 22:20 ` [PATCH 15/20] libcpu-rt-c/x86-64: Add strcat H.J. Lu
2018-06-13  6:50 ` [PATCH 00/20] RFC: Add the CPU run-time library for C Florian Weimer
2018-06-13 10:14   ` H.J. Lu
2018-06-13 12:03     ` Adhemerval Zanella
2018-06-13 12:31       ` H.J. Lu
2018-06-13 13:25     ` Florian Weimer
2018-06-13 13:41       ` H.J. Lu
2018-06-13 14:20       ` Siddhesh Poyarekar
2018-06-18 13:42         ` Florian Weimer [this message]
2018-06-19  8:20           ` Siddhesh Poyarekar
2018-06-18 17:09 ` Carlos O'Donell

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=57ec6b9e-ed17-f94d-0bdc-e225381e6a5a@redhat.com \
    --to=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=siddhesh@gotplt.org \
    /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).