This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: broken non-BFD assembler
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Jan Beulich <JBeulich at novell dot com>
- Cc: binutils at sources dot redhat dot com, Alan Modra <amodra at bigpond dot net dot au>
- Date: Mon, 07 Feb 2005 17:54:19 +0000
- Subject: Re: broken non-BFD assembler
- Organization: Codesourcery LLC
- References: <s2036f0a.048@emea1-mh.id2.novell.com>
Jan Beulich wrote:
* as.h (seg_not_empty_p): Declare.
* subsegs.c (seg_not_empty_p): New predicate.
The use of bfd_boolean here breaks non-BFD assemblers. If only used in
such, declaration and definition should be bounded by #if
BFD_ASSEMBLER.
I've installed the attached obvious patch.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
2005-02-07 Nathan Sidwell <nathan@codesourcery.com>
* as.h (seg_not_empty_p): Return int, not bfd_boolean.
* subsegs.c (seg_not_empty_p): Likewise.
Index: gas/as.h
===================================================================
RCS file: /cvs/src/src/gas/as.h,v
retrieving revision 1.41
diff -c -3 -p -r1.41 as.h
*** gas/as.h 27 Jan 2005 16:33:46 -0000 1.41
--- gas/as.h 7 Feb 2005 17:47:58 -0000
*************** segT subseg_new (const char *, subsegT
*** 577,583 ****
segT subseg_force_new (const char *, subsegT);
void subseg_set (segT, subsegT);
int subseg_text_p (segT);
! bfd_boolean seg_not_empty_p (segT);
void start_dependencies (char *);
void register_dependency (char *);
void print_dependencies (void);
--- 577,583 ----
segT subseg_force_new (const char *, subsegT);
void subseg_set (segT, subsegT);
int subseg_text_p (segT);
! int seg_not_empty_p (segT);
void start_dependencies (char *);
void register_dependency (char *);
void print_dependencies (void);
Index: gas/subsegs.c
===================================================================
RCS file: /cvs/src/src/gas/subsegs.c,v
retrieving revision 1.19
diff -c -3 -p -r1.19 subsegs.c
*** gas/subsegs.c 27 Jan 2005 16:33:47 -0000 1.19
--- gas/subsegs.c 7 Feb 2005 17:47:58 -0000
*************** subseg_text_p (segT sec)
*** 601,607 ****
fr_fix == 0 one still contributes data. Think of this as
seg_definitely_not_empty_p. */
! bfd_boolean
seg_not_empty_p (segT sec)
{
segment_info_type *seginfo = seg_info (sec);
--- 601,607 ----
fr_fix == 0 one still contributes data. Think of this as
seg_definitely_not_empty_p. */
! int
seg_not_empty_p (segT sec)
{
segment_info_type *seginfo = seg_info (sec);