Remove elfgcchack.h

The same optimization can be enabled with -fno-semantic-interposition
since GCC 5. clang has always used this option by default.
This commit is contained in:
Nick Wellnhofer 2022-02-20 18:46:42 +01:00
parent ce0871e15c
commit 346c3a930c
56 changed files with 12 additions and 18117 deletions

View File

@ -300,6 +300,5 @@ docbParseFile(const char *filename ATTRIBUTE_UNUSED,
return (xmlParseFile(filename));
}
#define bottom_DOCBparser
#include "elfgcchack.h"
#endif /* LIBXML_DOCB_ENABLED */

View File

@ -7279,6 +7279,4 @@ htmlCtxtReadIO(htmlParserCtxtPtr ctxt, xmlInputReadCallback ioread,
return (htmlDoRead(ctxt, URL, encoding, options, 1));
}
#define bottom_HTMLparser
#include "elfgcchack.h"
#endif /* LIBXML_HTML_ENABLED */

View File

@ -1195,6 +1195,4 @@ htmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) {
#endif /* LIBXML_OUTPUT_ENABLED */
#define bottom_HTMLtree
#include "elfgcchack.h"
#endif /* LIBXML_HTML_ENABLED */

View File

@ -1254,7 +1254,7 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
$(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \
libxml2-config.cmake.in autogen.sh \
trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
triop.h triodef.h libxml.h elfgcchack.h xzlib.h buf.h \
triop.h triodef.h libxml.h xzlib.h buf.h \
enc.h save.h genUnicode.py TODO_SCHEMAS \
dbgen.pl dbgenattr.pl regressions.py regressions.xml \
README.tests Makefile.tests libxml2.syms timsort.h \

2
SAX.c
View File

@ -175,6 +175,4 @@ initdocbDefaultSAXHandler(xmlSAXHandlerV1 *hdlr)
#endif /* LIBXML_SAX1_ENABLED */
#define bottom_SAX
#include "elfgcchack.h"
#endif /* LIBXML_LEGACY_ENABLED */

2
SAX2.c
View File

@ -3038,5 +3038,3 @@ docbDefaultSAXHandlerInit(void)
}
#endif /* LIBXML_DOCB_ENABLED */
#define bottom_SAX2
#include "elfgcchack.h"

2
buf.c
View File

@ -1347,5 +1347,3 @@ xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input,
return(0);
}
#define bottom_buf
#include "elfgcchack.h"

3
c14n.c
View File

@ -2229,6 +2229,5 @@ xmlC11NNormalizeString(const xmlChar * input,
return (buffer);
}
#endif /* LIBXML_OUTPUT_ENABLED */
#define bottom_c14n
#include "elfgcchack.h"
#endif /* LIBXML_C14N_ENABLED */

View File

@ -3825,6 +3825,4 @@ xmlCatalogGetPublic(const xmlChar *pubID) {
return(NULL);
}
#define bottom_catalog
#include "elfgcchack.h"
#endif /* LIBXML_CATALOG_ENABLED */

View File

@ -332,5 +332,3 @@ xmlIsPubidChar(unsigned int ch) {
return(xmlIsPubidCharQ(ch));
}
#define bottom_chvalid
#include "elfgcchack.h"

View File

@ -3418,6 +3418,5 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
}
#endif /* LIBXML_XPATH_ENABLED */
#define bottom_debugXML
#include "elfgcchack.h"
#endif /* LIBXML_DEBUG_ENABLED */

2
dict.c
View File

@ -1294,5 +1294,3 @@ xmlDictGetUsage(xmlDictPtr dict) {
return(limit);
}
#define bottom_dict
#include "elfgcchack.h"

View File

@ -83,7 +83,6 @@ EXTRA_DIST = \
contribs.html \
docs.html \
downloads.html \
elfgcchack.xsl \
encoding.html \
entities.html \
example.html \
@ -237,19 +236,10 @@ man_MANS = xmllint.1 xmlcatalog.1
if REBUILD_DOCS
docs: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS)
api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src ../elfgcchack.h $(srcdir)/site.xsl
api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src $(srcdir)/site.xsl
web: $(PAGES) xmllint.html xmlcatalog_man.html
../elfgcchack.h: $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml
-@(if [ -x $(XSLTPROC) ] ; then \
echo "Rebuilding the elfgcchack.h header" ; \
$(XSLTPROC) --nonet $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml > elfgcchack.h ; \
if [ "`diff -q elfgcchack.h ../elfgcchack.h`" ] ; then \
echo "updating ../elfgcchack.h"; \
cp elfgcchack.h ../elfgcchack.h; \
fi ; rm -f elfgcchack.h ; fi );
$(PAGES): xml.html $(srcdir)/site.xsl
-@(if [ -x $(XSLTPROC) ] ; then \
echo "Rebuilding the HTML Web pages from xml.html" ; \

View File

@ -31,7 +31,6 @@ ignored_files = {
"testOOMlib.c": "out of memory tester",
"rngparser.c": "not yet integrated",
"rngparser.h": "not yet integrated",
"elfgcchack.h": "not a normal header",
"testHTML.c": "test tool",
"testReader.c": "test tool",
"testSchemas.c": "test tool",

View File

@ -1,160 +0,0 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
version="1.0">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:text>/*
* elfgcchack.h: hack by Arjan van de Ven &lt;arjanv@redhat.com&gt; to speed
* up the code when using gcc for call within the library.
*
* Based on the analysis http://people.redhat.com/drepper/dsohowto.pdf
* from Ulrich drepper. Rewritten to be generated from the XML description
* file for libxml2 API
* autogenerated with xsltproc doc/elfgcchack.xsl doc/libxml2-api.xml
*/
#ifdef IN_LIBXML
#ifdef __GNUC__
#ifdef PIC
#ifdef __linux__
#if (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
#include "libxml/c14n.h"
#include "libxml/catalog.h"
#include "libxml/chvalid.h"
#include "libxml/debugXML.h"
#include "libxml/dict.h"
#include "libxml/DOCBparser.h"
#include "libxml/encoding.h"
#include "libxml/entities.h"
#include "libxml/globals.h"
#include "libxml/hash.h"
#include "libxml/HTMLparser.h"
#include "libxml/HTMLtree.h"
#include "libxml/list.h"
#include "libxml/nanoftp.h"
#include "libxml/nanohttp.h"
#include "libxml/parser.h"
#include "libxml/parserInternals.h"
#include "libxml/pattern.h"
#include "libxml/relaxng.h"
#include "libxml/SAX2.h"
#include "libxml/SAX.h"
#include "libxml/schemasInternals.h"
#include "libxml/schematron.h"
#include "libxml/threads.h"
#include "libxml/tree.h"
#include "libxml/uri.h"
#include "libxml/valid.h"
#include "libxml/xinclude.h"
#include "libxml/xlink.h"
#include "libxml/xmlautomata.h"
#include "libxml/xmlerror.h"
#include "libxml/xmlexports.h"
#include "libxml/xmlIO.h"
#include "libxml/xmlmemory.h"
#include "libxml/xmlreader.h"
#include "libxml/xmlregexp.h"
#include "libxml/xmlsave.h"
#include "libxml/xmlschemas.h"
#include "libxml/xmlschemastypes.h"
#include "libxml/xmlstring.h"
#include "libxml/xmlunicode.h"
#include "libxml/xmlversion.h"
#include "libxml/xmlwriter.h"
#include "libxml/xpath.h"
#include "libxml/xpathInternals.h"
#include "libxml/xpointer.h"
#include "libxml/xmlmodule.h"
/* special hot spot not exported ones */
#ifdef bottom_globals
#undef __xmlGenericError
extern __typeof (__xmlGenericError) __xmlGenericError __attribute((alias("__xmlGenericError__internal_alias")));
#else
#ifndef __xmlGenericError
extern __typeof (__xmlGenericError) __xmlGenericError__internal_alias __attribute((visibility("hidden")));
#define __xmlGenericError __xmlGenericError__internal_alias
#endif
#endif
#ifdef bottom_globals
#undef __xmlGenericErrorContext
extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext __attribute((alias("__xmlGenericErrorContext__internal_alias")));
#else
#ifndef __xmlGenericErrorContext
extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext__internal_alias __attribute((visibility("hidden")));
#define __xmlGenericErrorContext __xmlGenericErrorContext__internal_alias
#endif
#endif
/* list generated from libxml2-api.xml */
</xsl:text>
<xsl:apply-templates select="/api/symbols/function"/>
<xsl:text>
#endif
#endif
#endif
#endif
#endif
</xsl:text>
</xsl:template>
<xsl:template match="function">
<xsl:variable name="str" select="string(@name)"/>
<xsl:if test="(starts-with(@name, 'xml') or starts-with(@name, 'html') or contains(@name, 'Push') or contains(@name, 'Pop')) and (not(contains(@name, 'xmlDllMain')))">
<xsl:variable name="alias" select="concat($str, '__internal_alias')"/>
<xsl:apply-templates select="cond"/>
<xsl:text>#ifdef bottom_</xsl:text>
<xsl:value-of select="string(@module)"/>
<xsl:text>
#undef </xsl:text>
<xsl:value-of select="$str"/>
<xsl:text>
extern __typeof (</xsl:text>
<xsl:value-of select="$str"/>
<xsl:text>) </xsl:text>
<xsl:value-of select="$str"/>
<xsl:text> __attribute((alias("</xsl:text>
<xsl:value-of select="$alias"/>
<xsl:text>")));
#else
#ifndef </xsl:text>
<xsl:value-of select="$str"/>
<xsl:text>
</xsl:text>
<xsl:text>extern __typeof (</xsl:text>
<xsl:value-of select="$str"/>
<xsl:text>) </xsl:text>
<xsl:value-of select="$alias"/>
<xsl:text> __attribute((visibility("hidden")));
</xsl:text>
<xsl:text>#define </xsl:text>
<xsl:value-of select="$str"/>
<xsl:text> </xsl:text>
<xsl:value-of select="$alias"/>
<xsl:text>
#endif
#endif
</xsl:text>
<xsl:apply-templates select="cond" mode="end"/>
<xsl:text>
</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="cond">
<xsl:text>#if </xsl:text>
<xsl:value-of select="."/>
<xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="cond" mode="end">
<xsl:text>#endif
</xsl:text>
</xsl:template>
</xsl:stylesheet>

17830
elfgcchack.h

File diff suppressed because it is too large Load Diff

View File

@ -3972,5 +3972,3 @@ xmlRegisterCharEncodingHandlersISO8859x (void) {
#endif
#endif
#define bottom_encoding
#include "elfgcchack.h"

View File

@ -1176,5 +1176,3 @@ xmlDumpEntitiesTable(xmlBufferPtr buf, xmlEntitiesTablePtr table) {
xmlHashScan(table, xmlDumpEntityDeclScan, buf);
}
#endif /* LIBXML_OUTPUT_ENABLED */
#define bottom_entities
#include "elfgcchack.h"

View File

@ -994,5 +994,3 @@ xmlCopyError(xmlErrorPtr from, xmlErrorPtr to) {
return 0;
}
#define bottom_error
#include "elfgcchack.h"

View File

@ -571,8 +571,5 @@ header.write("""
header.close()
output.write("""#define bottom_chvalid
#include "elfgcchack.h"
""")
output.close()

View File

@ -459,8 +459,6 @@ xmlUCSIsCat(int code, const char *cat) {
return (func(code));
}
#define bottom_xmlunicode
#include "elfgcchack.h"
#endif /* LIBXML_UNICODE_ENABLED */
""")

View File

@ -1122,5 +1122,3 @@ __xmlOutputBufferCreateFilenameValue(void) {
return (&xmlGetGlobalState()->xmlOutputBufferCreateFilenameValue);
}
#define bottom_globals
#include "elfgcchack.h"

2
hash.c
View File

@ -1142,5 +1142,3 @@ xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
}
}
#define bottom_hash
#include "elfgcchack.h"

View File

@ -1337,7 +1337,6 @@ cdataBlock(void *ctx, const xmlChar * value, int len)
DEPRECATED("cdataBlock")
xmlSAX2CDataBlock(ctx, value, len);
}
#define bottom_legacy
#include "elfgcchack.h"
#endif /* LIBXML_LEGACY_ENABLED */

View File

@ -117,17 +117,6 @@ int __xmlRandom(void);
XMLPUBFUN xmlChar * XMLCALL xmlEscapeFormatString(xmlChar **msg);
int xmlInputReadCallbackNop(void *context, char *buffer, int len);
#ifdef IN_LIBXML
#ifdef __GNUC__
#ifdef PIC
#ifdef __linux__
#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
#include "elfgcchack.h"
#endif
#endif
#endif
#endif
#endif
#if !defined(PIC) && !defined(NOLIBTOOL) && !defined(LIBXML_STATIC)
# define LIBXML_STATIC
#endif

2
list.c
View File

@ -775,5 +775,3 @@ xmlListCopy(xmlListPtr cur, const xmlListPtr old)
}
/* xmlListUnique() */
/* xmlListSwap */
#define bottom_list
#include "elfgcchack.h"

View File

@ -2114,5 +2114,3 @@ int main(int argc, char **argv) {
}
#endif /* STANDALONE */
#endif /* LIBXML_FTP_ENABLED */
#define bottom_nanoftp
#include "elfgcchack.h"

View File

@ -1895,5 +1895,3 @@ int main(int argc, char **argv) {
}
#endif /* STANDALONE */
#endif /* LIBXML_HTTP_ENABLED */
#define bottom_nanohttp
#include "elfgcchack.h"

View File

@ -15551,5 +15551,3 @@ xmlCtxtReadIO(xmlParserCtxtPtr ctxt, xmlInputReadCallback ioread,
return (xmlDoRead(ctxt, URL, encoding, options, 1));
}
#define bottom_parser
#include "elfgcchack.h"

View File

@ -2162,5 +2162,3 @@ xmlKeepBlanksDefault(int val) {
return(old);
}
#define bottom_parserInternals
#include "elfgcchack.h"

View File

@ -2616,6 +2616,4 @@ xmlPatternFromRoot(xmlPatternPtr comp) {
}
#define bottom_pattern
#include "elfgcchack.h"
#endif /* LIBXML_PATTERN_ENABLED */

View File

@ -11098,6 +11098,4 @@ xmlRelaxNGValidateDoc(xmlRelaxNGValidCtxtPtr ctxt, xmlDocPtr doc)
return (ret);
}
#define bottom_relaxng
#include "elfgcchack.h"
#endif /* LIBXML_SCHEMAS_ENABLED */

View File

@ -1591,5 +1591,3 @@ int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
return(0);
}
#endif
#define bottom_rngparser
#include "elfgcchack.h"

View File

@ -1782,6 +1782,5 @@ main(void)
return (0);
}
#endif
#define bottom_schematron
#include "elfgcchack.h"
#endif /* LIBXML_SCHEMATRON_ENABLED */

View File

@ -1045,5 +1045,3 @@ DllMain(ATTRIBUTE_UNUSED HINSTANCE hinstDLL, DWORD fdwReason,
return TRUE;
}
#endif
#define bottom_threads
#include "elfgcchack.h"

2
tree.c
View File

@ -10188,5 +10188,3 @@ xmlDOMWrapAdoptNode(xmlDOMWrapCtxtPtr ctxt,
return (0);
}
#define bottom_tree
#include "elfgcchack.h"

2
uri.c
View File

@ -2558,5 +2558,3 @@ xmlPathToURI(const xmlChar *path)
xmlFree(cal);
return(ret);
}
#define bottom_uri
#include "elfgcchack.h"

View File

@ -7143,5 +7143,3 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **names,
}
#endif /* LIBXML_VALID_ENABLED */
#define bottom_valid
#include "elfgcchack.h"

View File

@ -174,11 +174,10 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\acconfig.h" />
<ClInclude Include="..\..\elfgcchack.h" />
<ClInclude Include="..\..\libxml.h" />
<ClInclude Include="config.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -117,7 +117,6 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\acconfig.h" />
<ClInclude Include="..\..\elfgcchack.h" />
<ClInclude Include="..\..\libxml.h" />
<ClInclude Include="config.h" />
</ItemGroup>
@ -134,4 +133,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -161,11 +161,8 @@
<ClInclude Include="..\..\acconfig.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\elfgcchack.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\libxml.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
</Project>

View File

@ -2651,5 +2651,3 @@ xmlXIncludeProcessNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) {
#else /* !LIBXML_XINCLUDE_ENABLED */
#endif
#define bottom_xinclude
#include "elfgcchack.h"

View File

@ -179,5 +179,3 @@ xlinkIsLink (xmlDocPtr doc, xmlNodePtr node) {
return(ret);
}
#endif /* LIBXML_XPTR_ENABLED */
#define bottom_xlink
#include "elfgcchack.h"

View File

@ -4133,5 +4133,3 @@ xmlNoNetExternalEntityLoader(const char *URL, const char *ID,
return(input);
}
#define bottom_xmlIO
#include "elfgcchack.h"

View File

@ -1159,5 +1159,3 @@ xmlGcMemGet(xmlFreeFunc *freeFunc, xmlMallocFunc *mallocFunc,
return(0);
}
#define bottom_xmlmemory
#include "elfgcchack.h"

View File

@ -463,6 +463,4 @@ xmlModulePlatformSymbol(void *handle, const char *name, void **symbol)
#endif /* HAVE_OS2 */
#define bottom_xmlmodule
#include "elfgcchack.h"
#endif /* LIBXML_MODULES_ENABLED */

View File

@ -5893,6 +5893,5 @@ main(int argc, char **argv)
}
#endif
#endif /* NOT_USED_YET */
#define bottom_xmlreader
#include "elfgcchack.h"
#endif /* LIBXML_READER_ENABLED */

View File

@ -8266,6 +8266,5 @@ xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt) {
}
#endif /* LIBXML_EXPR_ENABLED */
#define bottom_xmlregexp
#include "elfgcchack.h"
#endif /* LIBXML_REGEXP_ENABLED */

View File

@ -2731,5 +2731,3 @@ xmlSaveFile(const char *filename, xmlDocPtr cur) {
#endif /* LIBXML_OUTPUT_ENABLED */
#define bottom_xmlsave
#include "elfgcchack.h"

View File

@ -29170,6 +29170,4 @@ xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt)
return (ctxt->parserCtxt);
}
#define bottom_xmlschemas
#include "elfgcchack.h"
#endif /* LIBXML_SCHEMAS_ENABLED */

View File

@ -6276,6 +6276,4 @@ xmlSchemaGetValType(xmlSchemaValPtr val)
return (val->type);
}
#define bottom_xmlschemastypes
#include "elfgcchack.h"
#endif /* LIBXML_SCHEMAS_ENABLED */

View File

@ -1051,5 +1051,3 @@ xmlEscapeFormatString(xmlChar **msg)
return *msg;
}
#define bottom_xmlstring
#include "elfgcchack.h"

View File

@ -3174,6 +3174,4 @@ xmlUCSIsCat(int code, const char *cat) {
return (func(code));
}
#define bottom_xmlunicode
#include "elfgcchack.h"
#endif /* LIBXML_UNICODE_ENABLED */

View File

@ -4733,6 +4733,4 @@ xmlTextWriterHandleStateDependencies(xmlTextWriterPtr writer,
return sum;
}
#define bottom_xmlwriter
#include "elfgcchack.h"
#endif

View File

@ -14732,5 +14732,3 @@ xmlXPathRegisterAllFunctions(xmlXPathContextPtr ctxt)
}
#endif /* LIBXML_XPATH_ENABLED */
#define bottom_xpath
#include "elfgcchack.h"

View File

@ -2951,7 +2951,5 @@ xmlXPtrEvalRangePredicate(xmlXPathParserContextPtr ctxt) {
SKIP_BLANKS;
}
#define bottom_xpointer
#include "elfgcchack.h"
#endif