Generating link-time error for deprecated functions
Posted
by
R..
on Stack Overflow
See other posts from Stack Overflow
or by R..
Published on 2011-01-14T19:07:49Z
Indexed on
2011/01/14
19:53 UTC
Read the original article
Hit count: 166
Is there a way with gcc and GNU binutils to mark some functions such that they will generate an error at link-time if used? My situation is that I have some library functions which I am not removing for the sake of compatibility with existing binaries, but I want to ensure that no newly-compiled binary tries to make use of the functions. I can't just use compile-time gcc attributes because the offending code is ignoring my headers and detecting the presence of the functions with a configure
script and prototyping them itself. My goal is to generate a link-time error for the bad configure
scripts so that they stop detecting the existence of the functions.
© Stack Overflow or respective owner