473,387 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to weak_alias of symbols in application code

I want to use alias to call a defined function (special_subroutine in
this example) using different names (special_subroutine_1 and
special_subroutine_2 in this example), is it doable? --I tried the
following way, and it did not work when I tried to compile it with
gcc. I guess weak_alias is only valid for glibc, or maybe the way I use
it was wrong.

Can someone give me a suggestion?

-------------------------------------------------------
//file name: test.c
//date: 07/09/2006
#ifdef weak_alias
weak_alias(special_subroutine_1, special_subroutine)
weak_alias(special_subroutine_1, special_subroutine)
#endif

void special_subroutine(void){
....//some computation

}

int main(int argc, char** argv){
...
special_subroutine_1( );
....
special_subroutine_2( );

}

------------------------------------------------------

By the way, I knew the following macro (#define special_subroutine_1,
special_subroutine) can make the example code work. But I really want
to keep "special_subroutine_1" in the symbol table---which means I
don't want to use this way.
#define special_subroutine_1, special_subroutine

I think MPI library does something like this. e.g it has something like
weak_alias MPI_SEND with PMPI_SEND. Maybe pthread library also does
something similiar.

Jul 12 '06 #1
0 2296

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: aerobar2 | last post by:
When I debug my application I get "no symbols loaded" ================= 'DefaultDomain': Loaded 'c:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols loaded. 'MHSFire': Loaded...
1
by: glaserp | last post by:
Hi, I am developing a Windows application with C# in Visual Stuio .NET. My application references three assemblies that are developed in another project. I have added these assemblies as...
8
by: | last post by:
I'm starting up the development server myself and using the "Startup Url" property of the web project. The problem is i cannot debug. The debug symbols are never loaded. I realize they are under...
10
by: RDI | last post by:
What's it mean? My prog runs fine. Then as soon as I press ok or cancel, the following is what's in the output area of the debugger. TIA -- RDI (remove the exclamation from the email...
3
by: JV | last post by:
Hi All, I am new to C# and I am having trouble compiling and running code. I have the code written (it was just an example that I took) and I run it, it gives me No Symbols loaded error as...
0
by: seyong_choi | last post by:
I want to use alias to call a defined function (special_subroutine in this example) using different names (special_subroutine_1 and special_subroutine_2 in this example), is it doable? --I tried...
2
by: chandu | last post by:
Hello, if create a new project is visual studio 2005 C# windows application. If i run the application First time VS allows me to debug the code. if i made any changes to code and debug again it...
0
by: HeroOfSpielburg | last post by:
Hello, I'm new to the realm of .NET application creation, so please forgive my ignorance. I have been tasked with debugging a problem that arises with using a DLL that contains managed and...
0
by: wojtowicz.maciej | last post by:
Hello, We have asp.net application: .net / 200 000 loc and about 200 000 loc in orbital projects (referenced to website as projects (not as dlls)). Compiling application time is "normal"....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.