Re: [Arm] Remaining difference in crt0 code
Alexander Fedotov <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <CAN8C2CoCsYhkpJ1FGrk2Lkb4XtEuEYkhyEGwgfzwjo2ghMKXRQ@mail.gmail.com> |
Well, at first glance all the differences are related to semihosting v2. I think Tamar can help me with that (if he doesn't mind). Especially I do see his comment in https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=6d6a623e7d8eb9e521bdbd73a7eafdd482678cea "This patch does this, I have not updated newlib/libc/* as that is quite out of date already. A proper sync is needed in order to get things back in sync. A different patch for this would be best." I can say time " The time has come" :) Moreover Tamar has a commit rights so it can be done much faster. Alex On Mon, Apr 15, 2019 at 1:17 PM Alexander Fedotov <[email protected]> wrote: > > Ok, thanks. > > On Mon, Apr 15, 2019 at 12:14 PM Richard Earnshaw (lists) > <[email protected]> wrote: > > > > On 12/04/2019 21:42, Alexander Fedotov wrote: > > > Hello Richard > > > > > > There is still some difference in crt0.S code in libgloss and libc > > > respectively. Could you help me figure out what version is correct so > > > we can get rid of this. > > > > > > > I don't think we can clean this up file at a time. Trying to do so will > > likely create inconsistencies in the sources as some files will be > > patched and others not. > > > > "git blame" and "git show" will be your friends here... For example, > > taking the first hunk: > > > > > Differences are following: > > > > > > --- newlib/libc/sys/arm/crt0.S 2019-04-12 23:28:32.237488800 +0300 > > > +++ libgloss/arm/crt0.S 2019-04-12 23:28:32.237488800 +0300 > > > @@ -79,6 +79,19 @@ > > > .fnstart > > > #endif > > > > > > + /* __ARM_ARCH_PROFILE is defined from GCC 4.8 onwards, however > > > __ARM_ARCH_7A > > > + has been defined since 4.2 onwards, which is when v7-a support was added > > > + and hence 'A' profile support was added in the compiler. Allow for this > > > + file to be built with older compilers. We only call this for A profile > > > + cores. */ > > > +#if defined (__ARM_ARCH_7A__) || (__ARM_ARCH_PROFILE == 'A') > > > +/* The init hook does not use the stack and is called before the > > > stack has been set up. */ > > > +#ifdef ARM_RDI_MONITOR > > > + bl _rdimon_hw_init_hook > > > + .weak FUNCTION (_rdimon_hw_init_hook) > > > +#endif > > > +#endif > > > + > > > > "git blame" shows that this hunk is derived from two commits 99be2bc4ff > > and then shortly afterwards 639951dda7. "git show" can then be used to > > view these individual patches and you can also use the date information > > to identify the post to the newlib mailing list, which may contain > > additional information about the patch. > > > > Unwinding all of this is going to be a bit tedious, I fear, so I really > > appreciate any assistance you can give. > > > > R.