This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


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

Possible bugs in GAS/LD...



I upgraded my snapshot of the GAS assembler from "950426" to "950627",
and for C source code, it apparently is working fine (no careful testing
of this, however).

For assembly source code, of which I have 2 files, one builds OK and
when linked gives a somewhat different executable format, and the other
one (part of a bigger program) won't even build.

My configuration is "--target=i386-gnu", using the GCC 2.6.3 compiler
as a front end (i.e. run with files ending in ".S" instead of ".s" so
I can use the C pre-processor).

Problem #1 (LD output format somewhat different):

I'm using the "-N" option to force a predictable 32-byte a.out header
with no other page alignment, which has worked fine until recently.  it
is now producing a much larger header, and aligns the output to a page-
boundary, so my forced text start address of hex 7c00 produces an output
file where the text starts at location hex c00 in the file (aligned for
demand paging, obviously).

I can work around this easily enough...  it is just somewhat disturbing
to have it change, especially since I thought the 'OMAGIC' format was
supposed to only use a 32-byte header with no other padding.

Problem #2 (GAS aborts build):

On the "950426" version, everything compiles/assembles/links/runs just
fine.  The "950627" version (along with a few earlier versions I tried),
produces this result for my assembly source file in my bigger program:

---------(start error)---------
/var/tmp/cc028269.s: Assembler messages:
/var/tmp/cc028269.s:911: Error: Can not do 2 byte relocation
/var/tmp/cc028269.s:911: Fatal error: Cannot generate relocation type for symbol .text, code (null)
----------(end error)----------

Line number 911 is the end of the file, which leaves me confused.

--
Erich Stefan Boleyn                   \_ E-mail (preferred):  <erich@uruk.org>
Mad Genius wanna-be, CyberMuffin        \__     home #:  +1 (503) 226-0741
<A HREF=http://www.uruk.org/>WWW Site</A>  \_  USnail: 924 S.W. 16th Ave, #202
Motto: "I'll live forever or die trying"     \        Portland, OR, USA  97205