From: Kirk Bresniker <kirkb@chrome.rose.hp.com>
To: Ulrich.Strelow@schering.de
Cc: parisc-linux@thepuffingroup.com
Subject: Re: [parisc-linux] Compiling Linux Kernel on HP-UX
Date: Tue, 15 Jun 1999 8:32:41 PDT [thread overview]
Message-ID: <199906151532.IAA22453@chrome.rose.hp.com> (raw)
In-Reply-To: <C1256791.00392418.00@BE2314.schering.de>; from "Ulrich.Strelow@schering.de" at Jun 15, 99 12:22 (noon)
|
| Hi,
|
| I'm trying to compile the latest CVS-snapshot (19990615) on my HP 715/33
| using gcc 2.7.2.2 and binutils 2.7. Compiling kernel/sched.c gives the
| following error:
|
| sched.c:579: section attributes are not supported for this target
|
| I am running HP-UX 10.20, so I cannot use the depots from
| ftp://puffin.external.hp.com/pub/parisc/binaries/depot/.
| So the question is: do I need gcc 2.8.1 and binutils 2.9.1 to build the
| kernel on HP-UX or is this some other error ?
|
gcc 2.8.1 isn't quite enough. Although it does support section
attributes, there is a bug in the code emitted that cannot be assembled
with gas 2.9.1. I sucessfully worked around it by changing the condition
from a fatal error to a warning in gas.
Here is the text of the bug I submitted to gcc:
e of __attribute__((__section__())) to force code into a specific
section
generates code which causes the assembler to fail.
Here is an example:
/* test.c */
int __attribute__ ((__section__ (".text.init"))) a(x)
int x;
{
return(x+1);
}
int b(x)
int x;{
return(x+2);
}
int __attribute__ ((__section__ (".text.init"))) c(x)
int x;{
return(x+1);
}
main(){
printf("a(0)=%d\n",a(0));
printf("b(0)=%d\n",b(0));
printf("c(0)=%d\n",c(0));
}
Here is the output of gcc:
# gcc test.c
/var/tmp/cca10410.s: Assembler messages:
/var/tmp/cca10410.s:59: Warning: Parameters of an existing subspace
can't be modified
/var/tmp/cca10410.s:59: Error: Rest of line ignored. First ignored
character is`,'.
Creating the assembly language output and examining for .SUBSPA
directives, we
find the following:
# gcc -S test.c
# grep SUBSPA test.s
# gcc -S test.c
# grep SUBSPA test.s
.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
.SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
.SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
.SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
.SUBSPA .text.init,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY,SORT=24
.SUBSPA a
.SUBSPA $CODE$
.NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
.SUBSPA .text.init,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY,SORT=24
.SUBSPA c
.SUBSPA $LIT$
.SUBSPA $CODE$
.NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
Note that the section .text.init is declared with all the parameters
twice.
The second occurance should not include the parameters.
If the second declaration is edited to remove the parameters, then the
code
assembles and run correctly.
# cp test.s test_fixed.s
# vi test_fixed.s
# diff test.s test_fixed.s
59c59
< .SUBSPA .text.init,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY,SORT=24
---
> .SUBSPA .text.init
# gcc -o test_fixed test_fixed.s
# ./test_fixed
a(0)=1
b(0)=2
c(0)=1
KMB
--
+============================================================+
| Kirk Bresniker (916) 785-5677 |
| 8000 Foothills Blvd |
| Roseville, CA 95747-5649 |
| kirkb@rose.hp.com |
next prev parent reply other threads:[~1999-06-15 15:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-15 10:22 [parisc-linux] Compiling Linux Kernel on HP-UX Ulrich.Strelow
1999-06-15 15:32 ` Kirk Bresniker [this message]
1999-06-15 18:10 ` John David Anglin
1999-06-15 16:41 ` Andrew Patterson
-- strict thread matches above, loose matches on Subject: below --
1999-06-15 10:31 Tor Arntsen
1999-06-15 17:25 ` Steven Pritchard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199906151532.IAA22453@chrome.rose.hp.com \
--to=kirkb@chrome.rose.hp.com \
--cc=Ulrich.Strelow@schering.de \
--cc=parisc-linux@thepuffingroup.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox