[Bug gas/991] operands mismatch on correct m68040 instruction

2005-06-08 Thread tom at hukatronic dot cz

--- Additional Comments From tom at hukatronic dot cz  2005-06-08 10:05 
---
Proposed fix also fixed the problem reported in
http://lists.gnu.org/archive/html/bug-binutils/2005-06/msg0.html

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=991

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/994] section switch in function causes segfault

2005-06-08 Thread nickc at redhat dot com

--- Additional Comments From nickc at redhat dot com  2005-06-08 15:46 
---
Created an attachment (id=510)
 --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=510&action=view)
Fix seg fault by checking for a NULL pointer


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=994

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


Re: Error in _fixunsdfsi for m68040

2005-06-08 Thread Nick Clifton

Hi Mario,


I can't build a 68k C cross compiler under cygwin starting from:
 
binutils-2.16

newlib-1.13.0
gcc-4.0.0
 
because an error compiling libgcc2.c in function _fixunsdfsi for M68040
Using binutils-2.15 there is no more error and the generated 68k cross 
compiler works properly.


This should now work if you use the very latest binutils sources from 
the mainline of the binutils CVS repository.  It was reported as bug 991 
and I have just checked in the patch that was submitted to fix it.


Cheers
  Nick


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/991] operands mismatch on correct m68040 instruction

2005-06-08 Thread nickc at redhat dot com

--- Additional Comments From nickc at redhat dot com  2005-06-08 17:04 
---
Hi Tom,

  Thanks for reporting this problem and submit the patches to fix it.  I have
checked them in, with a little tidying up of the formatting and a few comments
added, and I also created this ChangeLog entry:

2005-06-08  Tomas Hurka  <[EMAIL PROTECTED]>

PR991
* config/tc-m68k.c (m68k_ip): Test for insn compatiblity using a
temporary copy of the operands array so that changes can be safely
backed out if the insn does not match.
(m68k_compare_opcode): Shortcut the test when the parameters are
the same.  Return 1 if the names match but the second opcode is
further on in the array than the first.

Cheers
  Nick



-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://sources.redhat.com/bugzilla/show_bug.cgi?id=991

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/994] section switch in function causes segfault

2005-06-08 Thread nickc at redhat dot com

--- Additional Comments From nickc at redhat dot com  2005-06-08 15:45 
---
Hi Richard,

  Agreed, the assembler should not crash.  I am applying the patch in the
attachmrnt to stop the seg fault hapeening.

Cheers
  Nick

gas/ChangeLog
2005-06-08  Nick Clifton  <[EMAIL PROTECTED]>

PR 994
* config/tc-ia64.c (slot_index): Check for a NULL first_frag.

-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://sources.redhat.com/bugzilla/show_bug.cgi?id=994

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/996] New: Linking requires one open file per object file

2005-06-08 Thread jepler at sds2 dot com
The script below works when the linker is "GNU ld version 2.13.90.0.18 20030206"
(RedHat 9) but not when it is "GNU ld version 2.16.91 20050608" (CVS HEAD).  In
both cases, the compiler used is "gcc version 3.2.2 20030222 (Red Hat Linux
3.2.2-5)".

The reason is that the new ld keeps one file open for each object file, while
the old ld did not---it only ever opened about 15 files.

To switch between linkers, I copied ld-new to /tmp/test/ld and used
COMPILER_PATH=/tmp/test.

I believe this worked (did not regress) with binutils CVS from around 20040924,
but I don't have that tree any longer to test.

My application links in approximately 6000 objects, specifying them through a
single linker script to avoid the kernel command-line limit.

#--
#!/bin/sh

set -ex

mkdir /tmp/linker_test_$$
cd /tmp/linker_test_$$

echo > dummy.c

n=1
while [[ $n -lt 100 ]]
do
gcc -c dummy.c -o dummy$n.o
n=$(($n+1))
done

echo "main() {}" > main.c

ulimit -n 25 
gcc main.c dummy*.o
#--

-- 
   Summary: Linking requires one open file per object file
   Product: binutils
   Version: 2.17 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: jepler at sds2 dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: i686-pc-linux
  GCC host triplet: i686-pc-linux
GCC target triplet: i686-pc-linux


http://sources.redhat.com/bugzilla/show_bug.cgi?id=996

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/994] section switch in function causes segfault

2005-06-08 Thread wilson at specifixinc dot com

--- Additional Comments From wilson at specifixinc dot com  2005-06-08 
18:48 ---
Nick's patch avoids the assembler core dump, but results in corrupted unwind
info.  IMHO, this is worse, since it converted an obvious error into a silent 
one.

I'm thinking the assembler should emit a warning (or perhaps an error) when this
problem is seen.  Also, the IA-64 compiler should emit a warning (or perhaps an
error) when the -freorder-blocks-and-partition option is used, which will say
that the option isn't supported for IA-64.

It is exactly because of these kinds of problems why I keep saying that section
switching should be a hard error.  It will be so hard to modify the assembler to
get this case right that it likely isn't worth the trouble.  I think it is
better is to fix the compiler to avoid constructs like this.  It will probably
take a lot of compiler work too though.  The .text.unlikely code needs to be
emitted after the function end.  Also, you either need to guarantee that you
will never put any code in .text.unlikely that can throw an exception, or else
you need to emit proper unwind info for it.  Emitting proper unwind info for it
may require info about the context in which it is being called, in case we need
something more than just a body region.  Better might be to avoid such cases,
which means we need to avoid putting any function returns in a .text.unlikely
section, and we need to avoid putting any shrink wrapped prologue/epilogue code
in there, etc.

This is likely to be a big mess, even if implemented by someone who understands
IA-64 code.

On second thought, if this is a big enough mess in the compiler, then it might
be worthwhile to try to make this work in the assembler.  Getting this right in
the assembler means that a lot of the assembler internal data in tc-ia64.c needs
to be put in a structure and maintained separately for every text region, so
that we can handle nested text regions, pushing/popping text regions, etc, and
then still be able to sort everything out at the end.  My worry here though
would be that there are so few people who both understand the inner details of
how IA-64 code works, and are willing to do binutils work, that we may not be
able to find a competent volunteer to do this work.

-- 
   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |


http://sources.redhat.com/bugzilla/show_bug.cgi?id=994

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/995] strip fails on archive with mixed files

2005-06-08 Thread hjl at lucon dot org

--- Additional Comments From hjl at lucon dot org  2005-06-08 18:56 ---
A patch is posted at

http://sourceware.org/ml/binutils/2005-06/msg00185.html

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=995

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/994] section switch in function causes segfault

2005-06-08 Thread wilson at specifixinc dot com

--- Additional Comments From wilson at specifixinc dot com  2005-06-08 
19:55 ---
Created an attachment (id=511)
 --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=511&action=view)
Warn for section switch that corrupts unwind info.

This is my fix for the problem.  It does two things:
1) It emits a warning when this problem is detected.
tmp.s:21: Warning: Corrupted unwind info due to unsupported section switching
2) It tries to get the unwind info as correct as possible.  With Nick's patch,
the trailing body region has a length that is a large number computed from an
address returned by malloc.  With my patch, it is the correct number for this
testcase.  However, it is only the correct number if it is guaranteed that
there is no code after the .text.unlikely section switch.  This is not
guaranteed to be true in general.  So we still need the warning, or code to
check for this special case.  It isn't immediately obvious how to check for
this, or whether we can even check for it without changes to the machine
independent parts of the assembler, so I have made no attempt to write code for
this check.  I simply emit the warning unconditionally.

-- 
   What|Removed |Added

 Attachment #510 is|0   |1
   obsolete||
 AssignedTo|unassigned at sources dot   |wilson at specifixinc dot
   |redhat dot com  |com
 Status|REOPENED|ASSIGNED


http://sources.redhat.com/bugzilla/show_bug.cgi?id=994

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/994] section switch in function causes segfault

2005-06-08 Thread wilson at specifixinc dot com

--- Additional Comments From wilson at specifixinc dot com  2005-06-08 
20:09 ---
I should point out that while my patch does get the unwind info correct for the
.text section (assuming no additional code in .text after the section switch),
the .text.unlikely section unwind info is still missing, and hence the code is
still broken.  Thus the warning may still be useful even if we check for the
case where there is no more code in .text after the section switch.

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=994

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/994] section switch in function causes segfault

2005-06-08 Thread wilson at specifixinc dot com

--- Additional Comments From wilson at specifixinc dot com  2005-06-08 
20:00 ---
Richard, is my solution (a warning) acceptable?  Or do you have another 
suggestion?

It might be possible to do better, either add more code to get the unwind info
correct in this case, or add code to determine when the warning is not necessary
(as in this case), but I'm not motivated to try either, as I don't believe this
assembler construct should be valid in the first place.


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=994

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/996] Linking requires one open file per object file

2005-06-08 Thread jepler at sds2 dot com

--- Additional Comments From jepler at sds2 dot com  2005-06-08 20:05 
---
I believe I isolated the change that causes the problem.  It seems to have been
made less than two days ago.  Since I hadn't looked at binutils cvs in so long,
I'm astounded that it turned out to be so recent a change.  Anyway, when I
update my tree like this:
$ cvs update -A; cvs update -D20050607 bfd/opncls.c bfd/bfd-in2.h
it works.  I think the problem may be due to this change:
2005-06-07  Mark Mitchell  <[EMAIL PROTECTED]>

   * opncls.c (bfd_fopen): New API.
   (bfd_openr): Use it.
   (bfd_fdopenr): Likewise.
   * bfd-in2.h: Regenerated.


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=996

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/997] New: invalid error messages, and internal error abort

2005-06-08 Thread larson at w6yx dot stanford dot edu
azp:44% cat h.s
.data

msg:.asciz  "hello world.\n"
msglen = .-msg-1
msglen=msglen & 0xff
azp:45% as -a h.s -o h.o
h.s: Assembler messages:
h.s:5: Error: symbol definition loop encountered at `msglen'
h.s:5: Error: undefined symbol `msglen' in operation setting `msglen'
h.s:5: Internal error, aborting at
/usr/src/gnu/usr.bin/binutils/as/i386-freebsd/../../../../../contrib/binutils/gas/symbols.c
line 1166 in resolve_symbol_value
Please report this bug.
azp:46% as h.s -o h.o

Interesting that it doesn't crash with -a flag.

-- 
   Summary: invalid error messages, and internal error abort
   Product: binutils
   Version: 2.12.1
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: larson at w6yx dot stanford dot edu
CC: bug-binutils at gnu dot org
  GCC host triplet: Freebsd i386
GCC target triplet: i386


http://sources.redhat.com/bugzilla/show_bug.cgi?id=997

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/994] section switch in function causes segfault

2005-06-08 Thread rth at gcc dot gnu dot org

--- Additional Comments From rth at gcc dot gnu dot org  2005-06-08 20:19 
---
Yes, your warning solution is acceptable.

I may look into disabling the section switching stuff for ia64.  I'm unconvinced
it's worth the effort it would take to get all the unwind info correct.  This is
"solved" for other platforms by disabling section switching if -fexceptions, but
ia64 folk have a habit of using unwind info even without that switch.

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=994

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/998] New: generates non-optimal instruction...

2005-06-08 Thread larson at w6yx dot stanford dot edu
Computed lengths are used as 32 bit values, even when they are less
than 128.  Symbols assigned values less than 128 and used generate
a one byte immediate in pushl $value, while symbols with computed
lengths appear as 4 byte immediate values, even though they have the
same small value.

Alan




azp:68% cat b.s ; as -a b.s -o b.o
.text

msg:.asciz  "hello world.\n"
msglen = .-msg-1# determine length, an absolute value
#msglen=msglen & 0xff   # this crashes the assembler if included
foo = 13

pushl   $13 # this generates a 2 byte instruction
pushl   $msglen # this generates 4 bytes for the same
pushl   $foo# but this generates 2 bytes
pushl   msg
GAS LISTING b.s page 1


   1.text
   2
   3  68656C6C  msg:.asciz  "hello world.\n"
   3  6F20776F
   3  726C642E
   3  0A00
   4msglen = .-msg-1# determine length, an
absolute value
   5#msglen=msglen & 0xff   # this crashes the
assembler if included
   6foo = 13
   7
   8 000e 6A0D  pushl   $13 # this generates a 2
byte instruction
   9 0010 680D  pushl   $msglen # this generates 4 bytes
for the same
   9  00
  10 0015 6A0D  pushl   $foo# but this generates 2 
bytes
  11 0017 FF35  pushl   msg
  11  8D76
  11  00

GAS LISTING b.s page 2


DEFINED SYMBOLS
 b.s:3  .text: msg
*ABS*:000d msglen
*ABS*:000d foo

NO UNDEFINED SYMBOLS

-- 
   Summary: generates non-optimal instruction...
   Product: binutils
   Version: 2.12.1
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: larson at w6yx dot stanford dot edu
CC: bug-binutils at gnu dot org
  GCC host triplet: Freebsd i386
GCC target triplet: i386


http://sources.redhat.com/bugzilla/show_bug.cgi?id=998

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/994] section switch in function causes segfault

2005-06-08 Thread wilson at specifixinc dot com

--- Additional Comments From wilson at specifixinc dot com  2005-06-08 
21:12 ---
Fixed by my patch, which has already been checked in.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://sources.redhat.com/bugzilla/show_bug.cgi?id=994

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/996] Linking requires one open file per object file

2005-06-08 Thread mark at codesourcery dot com

--- Additional Comments From mark at codesourcery dot com  2005-06-08 22:02 
---
Oh, and, meanwhile, I'll be trying to reproduce this myself.  Thanks!

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=996

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/996] Linking requires one open file per object file

2005-06-08 Thread mark at codesourcery dot com

--- Additional Comments From mark at codesourcery dot com  2005-06-08 22:01 
---
I'm not sure why you're seeing, but it is indeed very plausible that it's my 
fault.

BFD has an open-file cache, and should close files and reopen them as necessary.
 Do you have any idea what's different after my change?

Also, are you able to try restoring the previous implementation of bfd_openr
(leaving the changes to bfd_fdopenr) and see if that helps?  If so, that
suggests that something in the shared code is confused.

Thanks!

-- 
   What|Removed |Added

 CC||mark at codesourcery dot com
 AssignedTo|unassigned at sources dot   |mark at codesourcery dot com
   |redhat dot com  |
 Status|NEW |ASSIGNED


http://sources.redhat.com/bugzilla/show_bug.cgi?id=996

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/996] Linking requires one open file per object file

2005-06-08 Thread mark at codesourcery dot com

--- Additional Comments From mark at codesourcery dot com  2005-06-08 22:38 
---
Subject: Re:  Linking requires one open file per object file

mark at codesourcery dot com wrote:
> --- Additional Comments From mark at codesourcery dot com  2005-06-08 
> 22:01 ---
> I'm not sure why you're seeing, but it is indeed very plausible that it's my 
> fault.

The following patch should fix the problem.

Would you please confirm that it works for you?

Index: opncls.c
===
RCS file: /cvs/src/src/bfd/opncls.c,v
retrieving revision 1.37
diff -c -5 -p -r1.37 opncls.c
*** opncls.c8 Jun 2005 03:51:32 -   1.37
--- opncls.c8 Jun 2005 22:35:41 -
*** DESCRIPTION
*** 222,232 
  */
  
  bfd *
  bfd_openr (const char *filename, const char *target)
  {
!   return bfd_fopen (filename, target, FOPEN_RB, -1);
  }
  
  /* Don't try to `optimize' this function:
  
 o - We lock using stack space so that interrupting the locking
--- 222,236 
  */
  
  bfd *
  bfd_openr (const char *filename, const char *target)
  {
!   bfd *nbfd;
!   nbfd = bfd_fopen (filename, target, FOPEN_RB, -1);
!   if (nbfd)
! bfd_set_cacheable (nbfd, TRUE);
!   return nbfd;
  }
  
  /* Don't try to `optimize' this function:
  
 o - We lock using stack space so that interrupting the locking


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=996

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/1000] [Regression]: "nm -l" no longer works on assembly file

2005-06-08 Thread hjl at lucon dot org

--- Additional Comments From hjl at lucon dot org  2005-06-09 01:13 ---
Created an attachment (id=513)
 --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=513&action=view)
A testcase

This test case shows the -l outputs before and after the patch in bug 806.

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=1000

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/1000] New: [Regression]: "nm -l" no longer works on assembly file

2005-06-08 Thread hjl at lucon dot org
"nm -l" used to work on assembly file compiled with "-gdwarf-2". With
the patch in bug 806, it no longer works.

-- 
   Summary: [Regression]: "nm -l" no longer works on assembly file
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: hjl at lucon dot org
CC: bug-binutils at gnu dot org,fnf at specifixinc dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://sources.redhat.com/bugzilla/show_bug.cgi?id=1000

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/1000] [Regression]: "nm -l" no longer works on assembly file

2005-06-08 Thread hjl at lucon dot org

--- Additional Comments From hjl at lucon dot org  2005-06-09 06:09 ---
A patch is posted at

http://sourceware.org/ml/binutils/2005-06/msg00206.html

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=1000

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/997] invalid error messages, and internal error abort

2005-06-08 Thread amodra at bigpond dot net dot au

--- Additional Comments From amodra at bigpond dot net dot au  2005-06-09 
06:29 ---
This is a consequence of the way gas resolves symbols.  The problem is that the
first assignment to msglen isn't resolved immediately when parts of the
expression use symbols ("." and "msg" here) in different frags.  A frag is a
chunk of code/data being assembled, with a fixed part and a variable part. 
Because gas knows that frags might have a variable part, it leaves such
expressions for later evaluation, after all frags have their variable parts
fixed.  Thus the second assignment to msglen also can't be evaluated
immediately, and gas simply sets the value of msglen to "msglen & 0xff", exactly
as would be done if the first assignment had never been encountered.  Which
results in a symbol definition loop.

The reason that -a causes the failure is that turning on listings employs a hack
where a frag is allocated for each line.  However, this can happen without -a if
 a new frag is needed for some other reason.

I see a number of possible solutions, all of which I'm disinclined to implement
myself.
1) Rewrite gas listing code to do without frags, possibly combined with
2) Modify gas symbol evaluation code to allow immediate subtraction of symbols
in different frags if all intervening frags are fixed in size.
3) Have gas generate multiple versions of symbols.

(3) is probably the easiest to implement.  You can do it yourself at the user
level, of course:

msg: .asciz  "hello world.\n"
x = .-msg-1
msglen=x & 0xff


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=997

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/998] generates non-optimal instruction...

2005-06-08 Thread amodra at bigpond dot net dot au

--- Additional Comments From amodra at bigpond dot net dot au  2005-06-09 
06:36 ---
This is a result of delayed expression evaluation.  If you assemble without
listings turned on, the optimal push insn will be chosen.

-- 
   What|Removed |Added

  BugsThisDependsOn||997


http://sources.redhat.com/bugzilla/show_bug.cgi?id=998

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/997] invalid error messages, and internal error abort

2005-06-08 Thread amodra at bigpond dot net dot au


-- 
   What|Removed |Added

OtherBugsDependingO||998
  nThis||


http://sources.redhat.com/bugzilla/show_bug.cgi?id=997

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils