Trouble building CVS binutils
I just attempted to build the binutils in CVS and ran across this problem. When building bfd/hpux-core.c, it stops with a parse error before uint64_t which is used in one of the hpux header files. <sys/_inttypes.h> does not define this type unless the __STDC_EXT__ symbol is defined. I added this symbol to the egcs spec file and binutils now builds, but I'm not sure this is the most appropriate fix. It probably is, since HPUX's headers seem to use this as a sign that the compiler supports `long long', but I'm not sure if that's the only thing it means.
Now back to finding out why nm no longer likes to work on vmlinux...
Signature · 4 lines
"If I abstain from fun and such, I'll probably amount to much; But I shall stay the way I am, Because I do not give a damn."
In message <[email protected]>you write:
Quoted 9 lines
I just attempted to build the binutils in CVS and ran across this problem. When building
bfd/hpux-core.c, it stops with a parse error beforeuint64_twhich is used in one of the hpux header files. <sys/_inttypes.h> does not define this type unless the__STDC_EXT__symbol is defined. I added this symbol to the egcs spec file and binutils now builds, but I'm not sure this is the most appropriate fix. It probably is, since HPUX's headers seem to use this as a sign that the compiler supports `long long', but I'm not sure if that's the only thing it means.
Let me guess. You're using gcc on hpux11?
No released version of gcc supports hpux11 yet.
jeff
Quoted 1 line · Jeffrey A Law
Let me guess. You're using gcc on hpux11?
correct.
Quoted 1 line
No released version of gcc supports hpux11 yet.
oops, didn't realise that. i should build binaries on hpux-10 to run them on hpux 11?
In message <[email protected]>you write:
Quoted 4 lines
Quoted 1 line
No released version of gcc supports hpux11 yet.
oops, didn't realise that. i should build binaries on hpux-10 to run them on hpux 11?
It's not the binaries that are the problem, but the changes HP made to their header files for hpux11. So using hpux10 binaries doesn't solve the problem.
[ There's some other hpux11 changes that effect C++ and shared libraries, but I
don't think those changes would effect what you're doing. ]
I put hpux11 support into the GCC development tree over the summer; it should be possible to take that code and retrofit it into gcc-2.95.x.
jeff
Quoted 1 line · Matthew Wilcox
Now back to finding out why nm no longer likes to work on vmlinux...
I'm closer...
in bfd/som.c, function setup_sections(), in the subspace_index loop, around line 2025 here:
subspace_asect->alignment_power = log2 (subspace.alignment);
if (subspace_asect->alignment_power == -1)
goto error_return;subspace.alignment is _0_ in one of the subspaces. HP's nm manages just fine. GNU's bails, which actually seems pretty reasonable to me :-) Two questions spring to mind:
Why is the linker producing a subspace with an alignment of 0? What should BFD do when it encounters a file with such an alignment?
I shall continue investigating to see if I can find the answer to #1.
In message <[email protected]>you write:
Quoted 9 lines
I'm closer...
in
bfd/som.c, functionsetup_sections(), in thesubspace_indexloop, around line 2025 here:subspace_asect->alignment_power = log2 (subspace.alignment); if (subspace_asect->alignment_power == -1) goto error_return;
Quoted 5 lines
subspace.alignment is _0_ in one of the subspaces. HP's nm manages just fine. GNU's bails, which actually seems pretty reasonable to me :-) Two questions spring to mind:
Why is the linker producing a subspace with an alignment of 0? What should BFD do when it encounters a file with such an alignment?
According to the SOM spec the subspace alignment must be greater than zero. Thus, this seems like a bug in the HP linker.
jeff
Quoted 2 lines · Jeffrey A Law
According to the SOM spec the subspace alignment must be greater than zero. Thus, this seems like a bug in the HP linker.
OK, it seems we were tripping it with the 2.3 kernel. We had:
.SPACE $CODE$
.SUBSPA $TEXT$
(a function)
.SUBSPA $DATA$
(some more functions)
Changing this to:
.SPACE $CODE$
.SUBSPA $DATA$
(a function)
(some more functions)
seems to work OK.
Thanks to prumpf for his help tracking this down.