This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Fwd: crt0.S: How to submit updates, what else to change etc.?]


Nick Clifton wrote:

Hi Toralf,



Just subscribed to this list...



Welcome to the wonderful world of newlib.




1. Where do I submit newlib patches?



To the newlib mailing list. (ie the one you are talking on now).


Yes, that's sort of what I assumed, after subscribing.



2. Why is the generic start code for a CPU-type sometimes found in
libgloss, sometimes in newlib/sys? The one I'm talking about came
from newlib, but after my changes it may resemble some of the ones
found in libgloss more closely.



The reasons are mostly historical. For example in the case of the ARM
port, libgloss did not exist at the time the port was first created.


I see...

These days all startup code ought to be in libgloss, and in fact there
is an ARM port in libgloss.


Yes. However, as far as I can tell, it relies on external software - namely, redboot - and I want a "plain" version that uses no OS or any other software in addition to newlib itself (except I except to provide low-level read/write routines, of course), and I need to look in newlib/sys for that, I think.

Based on what you say, I think maybe the files on newlib/sys/arm should be moved to libgloss/arm, but I'm not sure if I want to make such an update right now. Maybe I'll concentrate on getting the actual modifications right first...



3. The update changes requirements to the linker scripts. Which files
should I edit to reflect these?



It depends - if you want to change the built-in scripts used by the
GNU linker, then you need to generate and submit a separate patch.
This should go to the binutils project (binutils@sources.redhat.com)
and the files you will need to change are in
<binutils-sources>/ld/scriptempl.


OK

On the other hand if you are creating your own linker script and using
the -T linker command line switch to use it, then you can just add
the script to the appropriate subdirectory of libgloss.


Well, I'm using a custom (-T) linker script, but I've also modified crt0.S in a way that might make it incompatible with the built-in scripts, so maybe I ought to provide a version of those that would actually work.

The idea is simply to allow the linker script to provide details e.g. on the stack setup, like it can for some of the other supported platforms.



4. Anything else I ought to update to keep the setup consistent?



ChangeLog(s) to document the changes.


If your patch is adding support for a new target environment then you
ought to create a new target triplet for the configure scripts.  This
will involve newlib, binutils, gcc and gdb changes.



Do you have an FSF copyright assignment that covers newlib (and
binutils if necessary ?) If not then please try to get one. Your
changes might be small enough to be considered as "obvious" and so not
need an assignment, but we always try to encourage contributors to
have an assignment in place whenever possible.


OK

Thanks.

- Toralf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]