lkml.org 
[lkml]   [2003]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Wanted: A decent assembler
"Richard B. Johnson" wrote"


>> Output from 'make bzImage' after making some changes:
>>
>> Error: non-constant expression in ".if" statement.
>>
>>
>> Why is the kernel using a 1-pass assembler?
>>
>
> Well it isn't. The AT&T clone assembler will resolve forward
> references and it does it by using as many passes as necessary.
> It even has a 'reasonable' MACRO capability. I use it quite a
> bit to minimize the code-size or to maximize performance in
> embedded systems.


This is from the info for GNU as:


"The result of an expression must be an absolute number, or else an
offset into a particular section. If an expression is not absolute,
and there is not enough information when `as' sees the expression to
know its section, a second pass over the source program might be
necessary to interpret the expression--but the second pass is currently
not implemented. `as' aborts with an error message in this situation."


> Your error shown above is a real error. If you expose the code
> that it barfed on, maybe somebody could help you fix the code.

if NR_IRQS gt 16 # only build this for IO-APIC
.align 8,0x90 # make ENTRY have exact address
irq_align=8 # start with 8-byte alignment
ENTRY(high_irq_entries_start)
rept NR_IRQS-16 # the rest of the stubs
.align irq_align,0x90
1: pushl $vector-256 # 5-byte instruction
jmp common_interrupt # 2 or 5 bytes (8 or 32-bit offset)
2:
if 2b-1b > 8 # <============================= ERROR
irq_align=16 # switch to 16-byte alignment
endif
data
.long 1b
text
vector=vector+1
endr
endif


-------
Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.026 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site