* kernel compilation and -relax flag
@ 2000-11-08 14:02 David Addison
2000-11-08 17:48 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: David Addison @ 2000-11-08 14:02 UTC (permalink / raw)
To: 'axp-list@redhat.com'
[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]
Hi, I've been having trouble with the -relax flag again. Basically I have
added this to the kernel linkage to get the .got table size below 64k -
otherwise the kernel exception table stuff gets broken.
This was working fine until I merged in the API EV6 2.2.17 assembler patch
and it then broke everything in that init seems to fail to parse command
line options correctly. Simply turning off -relax makes the patched kernel
work again. But the vmunix got table is now above 64k again.
I just tried adding the -relax flag to CFLAGS as '-Wa,-relax' and now the
arch/alpha/lib/copy_user.S code fails to compile;
cc -D__KERNEL__ -I/usr/src/linux/include -D__ASSEMBLY__ -D__SMP__ -Wall
-Wstrict-prototypes -O2 -g -fno-strict-aliasing
-D__SMP__ -pipe -mno-fp-regs -ffixed-8 -mcpu=ev6 -Wa,-relax -Wa,-mev6 -c -o
copy_user.o copy_user.S
copy_user.S: Assembler messages:
copy_user.S:187: Error: non-absolute expression in constant field
copy_user.S:196: Error: non-absolute expression in constant field
copy_user.S:208: Error: non-absolute expression in constant field
etc.
This seems to be related to the expansion of the EXI() macro line;
lda $31, $exitin-99b($31);
Any idea what this means ? Is -relax not permitted for such code and if so,
what does it do to this object file when used to do the final vmunix linkage
?
Cheers,
Addy.
[-- Attachment #2: Type: text/html, Size: 3363 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: kernel compilation and -relax flag
2000-11-08 14:02 kernel compilation and -relax flag David Addison
@ 2000-11-08 17:48 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2000-11-08 17:48 UTC (permalink / raw)
To: axp-list
On Wed, Nov 08, 2000 at 02:02:14PM -0000, David Addison wrote:
> This was working fine until I merged in the API EV6 2.2.17 assembler patch
> and it then broke everything in that init seems to fail to parse command
> line options correctly.
That means that the new ev6 code is not being careful with
the .prologue directives. Those indicate if and how the
incoming r27 value is used.
> I just tried adding the -relax flag to CFLAGS as '-Wa,-relax' and now the
> arch/alpha/lib/copy_user.S code fails to compile;
[...]
> lda $31, $exitin-99b($31);
The -relax option as given to the assembler tries to leave
enough relocations in the object file that the linker could
delete instructions out of the middle of a function. (The
linker doesn't do that at the moment, merely nops them out.)
We do not have a 16-bit pc-relative relocation, which means
that we cannot represent this instruction, thus the error.
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-11-08 17:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-08 14:02 kernel compilation and -relax flag David Addison
2000-11-08 17:48 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox