Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: newlib@sources.redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: ARM crt0.o: Add NULL to end of argv[]
Date: Mon, 18 Nov 2002 07:20:00 -0000	[thread overview]
Message-ID: <m3adk6zw3s.fsf@north-pole.nickc.cambridge.redhat.com> (raw)

Hi Guys,

  I am applying the patch below to fix a small bug in the ARM crt0.o
  file for newlib.  The code was creating an argv[] array from the
  command line, but it was not terminating the array with a NULL
  pointer.  This is required by the ISO C specification, and this
  patch fixes the problem.

Cheers
        Nick

2002-11-18  Nick Clifton  <nickc@redhat.com>

	* libc/sys/arm/crt0.S: Add NULL to end of argv array.

Index: newlib/libc/sys/arm/crt0.S
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/arm/crt0.S,v
retrieving revision 1.6
diff -c -3 -p -w -r1.6 crt0.S
*** newlib/libc/sys/arm/crt0.S	30 Apr 2002 18:23:38 -0000	1.6
--- newlib/libc/sys/arm/crt0.S	18 Nov 2002 15:19:11 -0000
*************** __change_mode:	
*** 181,186 ****
--- 181,193 ----
  	bhi	.LC13
  #endif
  
+ 	/* Push a NULL argument onto the end of the list.  */
+ 	mov	r2, #0
+ #ifdef __thumb__
+ 	push	{r2}
+ #else
+ 	stmfd	sp!, {r1}
+ #endif
  #endif
  
  #ifdef __USES_INITFINI__


             reply	other threads:[~2002-11-18 15:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-18  7:20 Nick Clifton [this message]
2002-11-18  7:50 ` Richard Earnshaw
2002-11-18  7:53   ` Richard Earnshaw
2002-11-18  8:30     ` Nick Clifton

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=m3adk6zw3s.fsf@north-pole.nickc.cambridge.redhat.com \
    --to=nickc@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=newlib@sources.redhat.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