Similar Threads:
1.Test Case : __attribute__ ((aligned (16384)))==>Not enough room for program headers
On Linux, I was unable to compile the below test case with cc, gcc, or
g++! Does anyone know how I can if it's possible?
/* test.c */
#include <stdio.h>
struct
{
int t1;
int t2;
float tx;
} shared_memory __attribute__ ((aligned (16384)));
int main ()
{
printf ("hello\n");
}
%g++ test.c
/usr/bin/ld: a.out Not enough room for program headers (allocated 7,
need 8)
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
Thank you,
Christopher Lusardi
Note: On SGI, I can use "pragma align_symbol (shared_memory, 16384)"
after the definition of the struct without the error. If I use the
pragma on Linux it does not align properly.
2.for huge "recommended" patch, not enough room in /var/sadm/patch
Not enough room in /var/sadm/patch, the install-script
says.
But on other partitions and disks I have *lots* of
space available. Just not on the root partition,
which contains /var/sadm/patch (among much else,
of course).
Might this work.
Rename /var/sadm/patch to eg /var/sadm/patch2-original,
then create a patch dir in some partition that had
logs of space, and then make /var/sadm/patch
a symlink to there.
Or should I symlink either higher up the var/sadm tree,
or symlink *several* of those directories?
And is there any reason to *copy* those directories
to where I'm going to symlink to, so that if there's
already some contents, they'll still be "there"?
(That install-script doesn't explicitly check for
this trick -- I hope not.)
-----
Or is there maybe some better way to do surmount this not-enough-disk pbm?
----------
Of course I do down to single-user before doing
the ./install_cluster,
but any reason I can't leave everything else
mounted?
I mean, in recent years, has anyone *ever* gotten
hurt by doing that? (If so, please say how, so we
can all get wised-up on this, uh, danger.)
Thanks!!!
David
3.Test Case Included:... __attribute__ ((aligned (16384)))==>Not enough room for program headers(allocated 8, need 9)
Hello,
The below question is pertaining to error with code on :
Red Hat Linux release Fedora Core release 3 (Hedelberg)
Note: I have to use the code per requirements!
The below code will compile without error on :
Red Hat Linux release Red Hat Enterprise Linux WS release 3
(Taroon Update 2)
I'm using g++.
/************************************************/
struct
{
int t1;
int t2;
int t3
int t4;
} shared_memory __attribute__ ((aligned (16384))) = {};
int main ()
{
printf ("address is %X\n",&shared_memory);
}
/************************************************/
Note: Without the attribute, the program compiles. But it's incorrect
because of the address of the variable is not what I have to have!
What can I do to get the program to compile and run with the
shared_memory aligned to some 16384 address?
Thank you,
Christopher Lusardi
4.Test Case Included:... __attribute__ ((aligned (16384)))==>Not enough room for program headers(allocated 7, need 8)
Hello,
On Linux, if I use the "-N" option with the below test case it
compiles (g++) and runs perfectly, but I get "undefined" when I try to
compile an X application with the aligned attribute, using g++.
Without the "-N" option the linker complains with the message on the
subject line.
/************************* Program 1: test.c ***********************/
struct
{
int t1;
int t2;
int tx;
} shared_memory __attribute__ ((aligned (16384)));
int main ()
{
printf ("address is %X\n",&shared_memory);
}
/************************* But Program 2 Woun't Compile ***********/
When I compile it, I get:
undefined reference to XmStringCreateLtoR
undefined reference to XtVASetValues
...
These undefineds are in standard X libraries.
Note: Without the described attribute, the program compiles. But it's
incorrect because of the variable's address isn't want I want!
If I surround the library includes with extern "C" the compiler
complains about the line with the extern. I mention this because that
is the standard way of linking C++ files to C files.
What can I do to get the X application to compile and run with the
shared_memory aligned to some 16384 address?
Thank you,
Christopher Lusardi
5.Please explain "Could not load program Not enough space"
6. "ld: fatal: library -lc: not found" error when compiling program
7. [News] For Windows, One Anti-viru$ Program is Not Enough
8. Cannot run Fortran program on AIX: not enough memory