From: "Madhavan T. Venkataraman" <madvenka@linux.microsoft.com>
To: libc-help@sourceware.org
Subject: Questions on glibc submission for a new project
Date: Thu, 15 Oct 2020 14:05:19 -0500 [thread overview]
Message-ID: <b44725bb-4f86-0ef0-d726-fa222327fc04@linux.microsoft.com> (raw)
Hi all,
I am planning to submit an RFC for a glibc project. This is my first time. So, I have some
questions.
Description of the project
--------------------------
I am developing some API functions to create and use trampolines so that applications and
libraries don't have to each implement them (often using dynamic code).
void *tramp_alloc(int flags);
void tramp_set_parms(void *tramp, void *code, void *data);
void *tramp_get_addr(void *tramp);
void tramp_free(void *tramp);
int tramp_supported(void);
I will provide a full justification in the RFC. For now, I just have some questions.
Copyright assignment
--------------------
I am developing these functions under Linux. I see that the files under sysdeps/unix/sysv/linux
have a "GNU Lesser General Public License". It appears that I should just use that and not need
to apply for a new FSF Copyright assignment.
Am I correct in my assumption?
If I need to apply for something, could you please advise me on what exactly I need to do?
Placement of the code
----------------------
I have the following files in the project:
- tramp.h (contains the function prototypes of the API functions)
- tramp.c (contains the common code for creating and managing trampolines)
- tramp_arch.c (contains architecture-specific C code)
- tramp_code.S (contains architecture-specific assembly code)
It looks like I must place the files here:
sysdeps/unix/sysv/linux/tramp.c
sysdeps/unix/sysv/linux/tramp.h
sysdeps/unix/sysv/linux/x86/tramp_arch.c (etc for each arch)
sysdeps/unix/sysv/linux/x86/tramp_code.S (etc for each arch)
Did I get that right?
Other OSes
----------
These functions can potentially be implemented for other OSes as well. There are,
however, some OS-specific details such as mmap() details and traversing the list of
mapped objects in an address space.
I have two options:
1. Implement it for Linux. In the future, when it is implemented for another OS,
deal with the changes required.
2. Implement it from the beginning as a common feature and provide OS-specific code
for Linux.
Which one would you recommend? If it is (2), could you point me to an example within
glibc that I can follow for how to organize the code for a multi-OS feature?
Documentation
-------------
I do plan to submit a Linux manpage. Do I have to do that after my final patch gets accepted into
glibc? When exactly do I need to do that?
Self-tests
----------
I do plan to submit tests along with the patch. But do I need to submit tests for the RFC?
Or, is it enough for me to submit tests along with the actual patch later?
mailing list
-------------
I will send out my RFC (and an actual patch later) to libc-alpha. Do I need to include
anyone else in the review? How about folks for each architecture?
Public header
-------------
tramp.h would be a public header file. Is there any specific process I need to follow for
introducing a public header file?
Architecture support
--------------------
I will be introducing support for X86 and ARM, 32-bit and 64-bit. Is there any special
process I need to follow if my changes contain architecture-specific changes?
Thank you all in advance for your guidance. Much appreciated.
Madhavan
next reply other threads:[~2020-10-15 19:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-15 19:05 Madhavan T. Venkataraman [this message]
2020-10-15 20:22 ` Carlos O'Donell
2020-10-16 21:20 ` Madhavan T. Venkataraman
2020-10-20 18:25 ` Madhavan T. Venkataraman
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=b44725bb-4f86-0ef0-d726-fa222327fc04@linux.microsoft.com \
--to=madvenka@linux.microsoft.com \
--cc=libc-help@sourceware.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).