Re: Exporting new libgomp functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 12, 2011, at 5:49 PM, Ian Lance Taylor wrote:

> Amittai Aviram <amittai.aviram@xxxxxxxx> writes:
> 
>>> What does readelf -s libgomp.so show you about the symbol foo?
>> 
>> It does not occur in either lib32/libgomp.so or lib64/libgomp.so
> 
> Are you 100% sure that your new object file is getting linked into
> libgomp.so?  The symbol should be in .symtab even if it is hidden by the
> version script.
> 
> Ian


I define the symbols in source files.  For instance, one of my symbols is domp_malloc, and I define it in domp_malloc.c .  Here are the steps I took, using domp_malloc as my example:

1.  I inserted the name "domp_malloc.c" into the list of source file names to the right of "libgomp_la_SOURCE =" in Makefile.am .

2.  I ran aclocal -I../config, autoconf, autoheader, and automake in order to create a new Makefile.in .

3.  I cd'd to my build directory (gcc_obj) and reconfigured:
	$ ../gcc-4.5.1/config prefix=/my_home_directory/gcc_install

4.  After configure finished, I ran "make -j ."  The build went all the way to the end (i.e., no error message stopping it).

5.  I went to my test directory, where I build the test program using my special GCC:

/my_home_directory/gcc_install/bin/gcc -Wall -fopenmp -static -g -o test_prog test_prog.c

Furthermore, I know that my "hidden" names are working correctly.  That is, I also have a substitute for team.c called domp_team.c, and I did the same thing with that as with domp_malloc.c (as described above).  If I limit my test code to something like this—

#pragma omp parallel
{
	printf("Hello!");
}

then it works perfectly, and I can verify that my domp_team routine is the one getting called.


Amittai Aviram
PhD Student in Computer Science
Yale University
646 483 2639
amittai.aviram@xxxxxxxx
http://www.amittai.com




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux