dpkg-gensymbols.1 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. .\" dpkg manual page - dpkg-gensymbols(1)
  2. .\"
  3. .\" Copyright © 2007-2011 Raphaël Hertzog <hertzog@debian.org>
  4. .\" Copyright © 2009-2010 Modestas Vainius <modestas@vainius.eu>
  5. .\" Copyright © 2012-2015 Guillem Jover <guillem@debian.org>
  6. .\"
  7. .\" This is free software; you can redistribute it and/or modify
  8. .\" it under the terms of the GNU General Public License as published by
  9. .\" the Free Software Foundation; either version 2 of the License, or
  10. .\" (at your option) any later version.
  11. .\"
  12. .\" This is distributed in the hope that it will be useful,
  13. .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. .\" GNU General Public License for more details.
  16. .\"
  17. .\" You should have received a copy of the GNU General Public License
  18. .\" along with this program. If not, see <https://www.gnu.org/licenses/>.
  19. .
  20. .TH dpkg\-gensymbols 1 "2014-12-29" "Debian Project" "dpkg utilities"
  21. .SH NAME
  22. dpkg\-gensymbols \- generate symbols files (shared library dependency information)
  23. .
  24. .SH SYNOPSIS
  25. .B dpkg\-gensymbols
  26. .RI [ option ...]
  27. .
  28. .SH DESCRIPTION
  29. .B dpkg\-gensymbols
  30. scans a temporary build tree (debian/tmp by default) looking for libraries
  31. and generates a \fIsymbols\fR file describing them. This file, if
  32. non-empty, is then installed in the DEBIAN subdirectory of the build tree
  33. so that it ends up included in the control information of the package.
  34. .P
  35. When generating those files, it uses as input some symbols files
  36. provided by the maintainer. It looks for the following files (and uses the
  37. first that is found):
  38. .IP \(bu 4
  39. debian/\fIpackage\fR.symbols.\fIarch\fR
  40. .IP \(bu 4
  41. debian/symbols.\fIarch\fR
  42. .IP \(bu 4
  43. debian/\fIpackage\fR.symbols
  44. .IP \(bu 4
  45. debian/symbols
  46. .P
  47. The main interest of those files is to provide the minimal version
  48. associated to each symbol provided by the libraries. Usually it
  49. corresponds to the first version of that package that provided the symbol,
  50. but it can be manually incremented by the maintainer if the ABI of the
  51. symbol is extended without breaking backwards compatibility. It's the
  52. responsibility of the maintainer to keep those files up-to-date and
  53. accurate, but \fBdpkg\-gensymbols\fR helps with that.
  54. .P
  55. When the generated symbols files differ from the maintainer supplied
  56. one, \fBdpkg\-gensymbols\fR will print a diff between the two versions.
  57. Furthermore if the difference is too significant, it will even fail (you
  58. can customize how much difference you can tolerate, see the \fB\-c\fR
  59. option).
  60. .SH MAINTAINING SYMBOLS FILES
  61. The symbols files are really useful only if they reflect the evolution of
  62. the package through several releases. Thus the maintainer has to update
  63. them every time that a new symbol is added so that its associated minimal
  64. version matches reality.
  65. The diffs contained in the build logs can be used as a starting point,
  66. but the maintainer, additionally, has to make sure that the behaviour
  67. of those symbols has not changed in a way that would make anything
  68. using those symbols and linking against the new version, stop working
  69. with the old version.
  70. In most cases, the diff applies directly to the
  71. debian/\fIpackage\fR.symbols file. That said, further tweaks are usually
  72. needed: it's recommended for example to drop the Debian revision
  73. from the minimal version so that backports with a lower version number
  74. but the same upstream version still satisfy the generated dependencies.
  75. If the Debian revision can't be dropped because the symbol really got
  76. added by the Debian specific change, then one should suffix the version
  77. with \(oq\fB~\fP\(cq.
  78. .P
  79. Before applying any patch to the symbols file, the maintainer should
  80. double-check that it's sane. Public symbols are not supposed to disappear,
  81. so the patch should ideally only add new lines.
  82. .P
  83. Note that you can put comments in symbols files: any line with \(oq#\(cq as
  84. the first character is a comment except if it starts with \(oq#include\(cq
  85. (see section \fBUsing includes\fP).
  86. Lines starting with \(oq#MISSING:\(cq are special comments documenting
  87. symbols that have disappeared.
  88. .P
  89. Do not forget to check if old symbol versions need to be increased.
  90. There is no way \fBdpkg\-gensymbols\fP can warn about this. Blindly
  91. applying the diff or assuming there is nothing to change if there is
  92. no diff, without checking for such changes, can lead to packages with
  93. loose dependencies that claim they can work with older packages they
  94. cannot work with. This will introduce hard to find bugs with (partial)
  95. upgrades.
  96. .SS Using #PACKAGE# substitution
  97. .P
  98. In some rare cases, the name of the library varies between architectures.
  99. To avoid hardcoding the name of the package in the symbols file, you can
  100. use the marker \fI#PACKAGE#\fR. It will be replaced by the real package
  101. name during installation of the symbols files. Contrary to the
  102. \fI#MINVER#\fR marker, \fI#PACKAGE#\fR will never appear in a symbols file
  103. inside a binary package.
  104. .SS Using symbol tags
  105. .P
  106. Symbol tagging is useful for marking symbols that are special in some way. Any
  107. symbol can have an arbitrary number of tags associated with it. While all tags are
  108. parsed and stored, only some of them are understood by
  109. \fBdpkg\-gensymbols\fR and trigger special handling of the symbols. See
  110. subsection \fBStandard symbol tags\fR for reference of these tags.
  111. .P
  112. Tag specification comes right before the symbol name (no whitespace is allowed
  113. in between). It always starts with an opening bracket \fB(\fR, ends with a
  114. closing bracket \fB)\fR and must contain at least one tag. Multiple tags are
  115. separated by the \fB|\fR character. Each tag can optionally have a value which
  116. is separated form the tag name by the \fB=\fR character. Tag names and values
  117. can be arbitrary strings except they cannot contain any of the special \fB)\fR
  118. \fB|\fR \fB=\fR characters. Symbol names following a tag specification can
  119. optionally be quoted with either \fB'\fR or \fB"\fR characters to allow
  120. whitespaces in them. However, if there are no tags specified for the symbol,
  121. quotes are treated as part of the symbol name which continues up until the
  122. first space.
  123. .P
  124. (tag1=i am marked|tag name with space)"tagged quoted symbol"@Base 1.0
  125. (optional)tagged_unquoted_symbol@Base 1.0 1
  126. untagged_symbol@Base 1.0
  127. .P
  128. The first symbol in the example is named \fItagged quoted symbol\fR and has two
  129. tags: \fItag1\fR with value \fIi am marked\fR and \fItag name with space\fR
  130. that has no value. The second symbol named \fItagged_unquoted_symbol\fR is
  131. only tagged with the tag named \fIoptional\fR. The last symbol is an
  132. example of the normal untagged symbol.
  133. .P
  134. Since symbol tags are an extension of the \fBdeb\-symbols\fP(5) format, they
  135. can only be part of the symbols files used in source packages (those files
  136. should then be seen as templates used to build the symbols files that are
  137. embedded in binary packages). When
  138. \fBdpkg\-gensymbols\fR is called without the \fB\-t\fP option, it will
  139. output symbols files compatible to the \fBdeb\-symbols\fP(5) format:
  140. it fully processes symbols according to the requirements of their standard tags
  141. and strips all tags from the output. On the contrary, in template mode
  142. (\fB\-t\fP) all symbols and their tags (both standard and unknown ones)
  143. are kept in the output and are written in their original form as they were
  144. loaded.
  145. .SS Standard symbol tags
  146. .TP
  147. .B optional
  148. A symbol marked as optional can disappear from the library at any time and that
  149. will never cause \fBdpkg\-gensymbols\fR to fail. However, disappeared optional
  150. symbols will continuously appear as MISSING in the diff in each new package
  151. revision. This behaviour serves as a reminder for the maintainer that such a
  152. symbol needs to be removed from the symbol file or readded to the library. When
  153. the optional symbol, which was previously declared as MISSING, suddenly
  154. reappears in the next revision, it will be upgraded back to the \(lqexisting\(rq
  155. status with its minimum version unchanged.
  156. This tag is useful for symbols which are private where their disappearance do
  157. not cause ABI breakage. For example, most of C++ template instantiations fall
  158. into this category. Like any other tag, this one may also have an arbitrary
  159. value: it could be used to indicate why the symbol is considered optional.
  160. .TP
  161. .B arch=\fIarchitecture-list\fR
  162. .TQ
  163. .B arch\-bits=\fIarchitecture-bits\fR
  164. .TQ
  165. .B arch\-endian=\fIarchitecture-endianness\fR
  166. These tags allow one to restrict the set of architectures where the symbol
  167. is supposed to exist. The \fBarch\-bits\fP and \fBarch\-endian\fP tags
  168. are supported since dpkg 1.18.0. When the symbols list is updated with
  169. the symbols
  170. discovered in the library, all arch-specific symbols which do not concern
  171. the current host architecture are treated as if they did not exist. If an
  172. arch-specific symbol matching the current host architecture does not exist
  173. in the library, normal procedures for missing symbols apply and it may
  174. cause \fBdpkg\-gensymbols\fR to fail. On the other hand, if the
  175. arch-specific symbol is found when it was not supposed to exist (because
  176. the current host architecture is not listed in the tag or does not match
  177. the endianness and bits), it is made arch neutral (i.e. the arch, arch-bits
  178. and arch-endian tags are dropped and the symbol will appear in the diff due
  179. to this change), but it is not considered as new.
  180. When operating in the default non-template mode, among arch-specific symbols
  181. only those that match the current host architecture are written to the
  182. symbols file. On the contrary, all arch-specific symbols (including those
  183. from foreign arches) are always written to the symbol file when operating
  184. in template mode.
  185. The format of \fIarchitecture-list\fR is the same as the one used in the
  186. \fBBuild\-Depends\fP field of \fIdebian/control\fR (except the enclosing
  187. square brackets []). For example, the first symbol from the list below
  188. will be considered only on alpha, any\-amd64 and ia64 architectures,
  189. the second only on linux architectures, while the third one anywhere
  190. except on armel.
  191. (arch=alpha any\-amd64 ia64)a_64bit_specific_symbol@Base 1.0
  192. (arch=linux\-any)linux_specific_symbol@Base 1.0
  193. (arch=!armel)symbol_armel_does_not_have@Base 1.0
  194. The \fIarchitecture-bits\fP is either \fB32\fP or \fB64\fP.
  195. (arch-bits=32)a_32bit_specific_symbol@Base 1.0
  196. (arch-bits=64)a_64bit_specific_symbol@Base 1.0
  197. The \fIarchitecture-endianness\fP is either \fBlittle\fP or \fBbig\fP.
  198. (arch-endian=little)a_little_endian_specific_symbol@Base 1.0
  199. (arch-endian=big)a_big_endian_specific_symbol@Base 1.0
  200. Multiple restrictions can be chained.
  201. (arch-bits=32|arch-endian=little)a_32bit_le_symbol@Base 1.0
  202. .TP
  203. .B ignore\-blacklist
  204. dpkg\-gensymbols has an internal blacklist of symbols that should not
  205. appear in symbols files as they are usually only side-effects of
  206. implementation details of the toolchain. If for some reason, you really
  207. want one of those symbols to be included in the symbols file, you should
  208. tag the symbol with \fBignore\-blacklist\fP. It can be necessary for
  209. some low level toolchain libraries like libgcc.
  210. .TP
  211. .B c++
  212. Denotes \fIc++\fR symbol pattern. See \fBUsing symbol patterns\fR subsection
  213. below.
  214. .TP
  215. .B symver
  216. Denotes \fIsymver\fR (symbol version) symbol pattern. See \fBUsing symbol
  217. patterns\fR subsection below.
  218. .TP
  219. .B regex
  220. Denotes \fIregex\fR symbol pattern. See \fBUsing symbol patterns\fR subsection
  221. below.
  222. .SS Using symbol patterns
  223. .P
  224. Unlike a standard symbol specification, a pattern may cover multiple real
  225. symbols from the library. \fBdpkg\-gensymbols\fR will attempt to match each
  226. pattern against each real symbol that does \fInot\fR have a specific symbol
  227. counterpart defined in the symbol file. Whenever the first matching pattern is
  228. found, all its tags and properties will be used as a basis specification of the
  229. symbol. If none of the patterns matches, the symbol will be considered as new.
  230. A pattern is considered lost if it does not match any symbol in the library. By
  231. default this will trigger a \fBdpkg\-gensymbols\fP failure under \fB\-c1\fP or
  232. higher level. However, if the failure is undesired, the pattern may be marked
  233. with the \fIoptional\fR tag. Then if the pattern does not match anything, it
  234. will only appear in the diff as MISSING. Moreover, like any symbol, the pattern
  235. may be limited to the specific architectures with the \fIarch\fR tag. Please
  236. refer to \fBStandard symbol tags\fR subsection above for more information.
  237. Patterns are an extension of the \fBdeb\-symbols\fP(5) format hence they are
  238. only valid in symbol file templates. Pattern specification syntax is not any
  239. different from the one of a specific symbol. However, symbol name part of the
  240. specification serves as an expression to be matched against \fIname@version\fR
  241. of the real symbol. In order to distinguish among different pattern types, a
  242. pattern will typically be tagged with a special tag.
  243. At the moment, \fBdpkg\-gensymbols\fR supports three basic pattern types:
  244. .TP 3
  245. .B c++
  246. This pattern is denoted by the \fIc++\fR tag. It matches only C++ symbols by
  247. their demangled symbol name (as emitted by \fBc++filt\fR(1) utility). This
  248. pattern is very handy for matching symbols which mangled names might vary
  249. across different architectures while their demangled names remain the same. One
  250. group of such symbols is \fInon\-virtual thunks\fR which have architecture
  251. specific offsets embedded in their mangled names. A common instance of this
  252. case is a virtual destructor which under diamond inheritance needs a
  253. non-virtual thunk symbol. For example, even if _ZThn8_N3NSB6ClassDD1Ev@Base on
  254. 32bit architectures will probably be _ZThn16_N3NSB6ClassDD1Ev@Base on 64bit
  255. ones, it can be matched with a single \fIc++\fR pattern:
  256. .RS
  257. .PP
  258. libdummy.so.1 libdummy1 #MINVER#
  259. [...]
  260. (c++)"non\-virtual thunk to NSB::ClassD::~ClassD()@Base" 1.0
  261. [...]
  262. .P
  263. The demangled name above can be obtained by executing the following command:
  264. .PP
  265. $ echo '_ZThn8_N3NSB6ClassDD1Ev@Base' | c++filt
  266. .P
  267. Please note that while mangled name is unique in the library by definition,
  268. this is not necessarily true for demangled names. A couple of distinct real
  269. symbols may have the same demangled name. For example, that's the case with
  270. non-virtual thunk symbols in complex inheritance configurations or with most
  271. constructors and destructors (since g++ typically generates two real symbols
  272. for them). However, as these collisions happen on the ABI level, they should
  273. not degrade quality of the symbol file.
  274. .RE
  275. .TP
  276. .B symver
  277. This pattern is denoted by the \fIsymver\fR tag. Well maintained libraries have
  278. versioned symbols where each version corresponds to the upstream version where
  279. the symbol got added. If that's the case, you can use a \fIsymver\fR pattern to
  280. match any symbol associated to the specific version. For example:
  281. .RS
  282. .PP
  283. libc.so.6 libc6 #MINVER#
  284. (symver)GLIBC_2.0 2.0
  285. [...]
  286. (symver)GLIBC_2.7 2.7
  287. access@GLIBC_2.0 2.2
  288. .PP
  289. All symbols associated with versions GLIBC_2.0 and GLIBC_2.7 will lead to
  290. minimal version of 2.0 and 2.7 respectively with the exception of the symbol
  291. access@GLIBC_2.0. The latter will lead to a minimal dependency on libc6 version
  292. 2.2 despite being in the scope of the "(symver)GLIBC_2.0" pattern because
  293. specific symbols take precedence over patterns.
  294. .P
  295. Please note that while old style wildcard patterns (denoted by "*@version" in
  296. the symbol name field) are still supported, they have been deprecated by new
  297. style syntax "(symver|optional)version". For example, "*@GLIBC_2.0 2.0" should
  298. be written as "(symver|optional)GLIBC_2.0 2.0" if the same behaviour is needed.
  299. .RE
  300. .TP
  301. .B regex
  302. Regular expression patterns are denoted by the \fIregex\fR tag. They match by
  303. the perl regular expression specified in the symbol name field. A regular
  304. expression is matched as it is, therefore do not forget to start it with the
  305. \fI^\fR character or it may match any part of the real symbol
  306. \fIname@version\fR string. For example:
  307. .RS
  308. .PP
  309. libdummy.so.1 libdummy1 #MINVER#
  310. (regex)"^mystack_.*@Base$" 1.0
  311. (regex|optional)"private" 1.0
  312. .P
  313. Symbols like "mystack_new@Base", "mystack_push@Base", "mystack_pop@Base" etc.
  314. will be matched by the first pattern while e.g. "ng_mystack_new@Base" won't.
  315. The second pattern will match all symbols having the string "private" in their
  316. names and matches will inherit \fIoptional\fR tag from the pattern.
  317. .RE
  318. .P
  319. Basic patterns listed above can be combined where it makes sense. In that case,
  320. they are processed in the order in which the tags are specified. For example,
  321. both
  322. .PP
  323. (c++|regex)"^NSA::ClassA::Private::privmethod\\d\\(int\\)@Base" 1.0
  324. (regex|c++)N3NSA6ClassA7Private11privmethod\\dEi@Base 1.0
  325. .P
  326. will match symbols "_ZN3NSA6ClassA7Private11privmethod1Ei@Base" and
  327. "_ZN3NSA6ClassA7Private11privmethod2Ei@Base". When matching the first pattern,
  328. the raw symbol is first demangled as C++ symbol, then the demangled name is
  329. matched against the regular expression. On the other hand, when matching the
  330. second pattern, regular expression is matched against the raw symbol name, then
  331. the symbol is tested if it is C++ one by attempting to demangle it. A failure
  332. of any basic pattern will result in the failure of the whole pattern.
  333. Therefore, for example, "__N3NSA6ClassA7Private11privmethod\\dEi@Base" will not
  334. match either of the patterns because it is not a valid C++ symbol.
  335. .P
  336. In general, all patterns are divided into two groups: aliases (basic \fIc++\fR
  337. and \fIsymver\fR) and generic patterns (\fIregex\fR, all combinations of
  338. multiple basic patterns). Matching of basic alias-based patterns is fast (O(1))
  339. while generic patterns are O(N) (N - generic pattern count) for each symbol.
  340. Therefore, it is recommended not to overuse generic patterns.
  341. .P
  342. When multiple patterns match the same real symbol, aliases (first \fIc++\fR,
  343. then \fIsymver\fR) are preferred over generic patterns. Generic patterns are
  344. matched in the order they are found in the symbol file template until the first
  345. success. Please note, however, that manual reordering of template file entries
  346. is not recommended because \fBdpkg\-gensymbols\fR generates diffs based on the
  347. alphanumerical order of their names.
  348. .SS Using includes
  349. .P
  350. When the set of exported symbols differ between architectures, it may become
  351. inefficient to use a single symbol file. In those cases, an include directive
  352. may prove to be useful in a couple of ways:
  353. .IP \(bu 4
  354. You can factorize the common part in some external file
  355. and include that file in your \fIpackage\fR.symbols.\fIarch\fR file by
  356. using an include directive like this:
  357. #include "\fIpackages\fR.symbols.common"
  358. .IP \(bu
  359. The include directive may also be tagged like any symbol:
  360. (tag|...|tagN)#include "file-to-include"
  361. As a result, all symbols included from \fIfile-to-include\fR will be considered
  362. to be tagged with \fItag\fR ... \fItagN\fR by default. You can use this feature
  363. to create a common \fIpackage\fR.symbols file which includes architecture
  364. specific symbol files:
  365. common_symbol1@Base 1.0
  366. (arch=amd64 ia64 alpha)#include "package.symbols.64bit"
  367. (arch=!amd64 !ia64 !alpha)#include "package.symbols.32bit"
  368. common_symbol2@Base 1.0
  369. .P
  370. The symbols files are read line by line, and include directives are processed
  371. as soon as they are encountered. This means that the content of the included
  372. file can override any content that appeared before the include directive and
  373. that any content after the directive can override anything contained in the
  374. included file. Any symbol (or even another #include directive) in the included
  375. file can specify additional tags or override values of the inherited tags in
  376. its tag specification. However, there is no way for the symbol to remove
  377. any of the inherited tags.
  378. .P
  379. An included file can repeat the header line containing the SONAME of the
  380. library. In that case, it overrides any header line previously read.
  381. However, in general it's best to avoid duplicating header lines. One way
  382. to do it is the following:
  383. .PP
  384. #include "libsomething1.symbols.common"
  385. arch_specific_symbol@Base 1.0
  386. .SS Good library management
  387. .P
  388. A well-maintained library has the following features:
  389. .IP \(bu 4
  390. its API is stable (public symbols are never dropped, only new public
  391. symbols are added) and changes in incompatible ways only when the SONAME
  392. changes;
  393. .IP \(bu 4
  394. ideally, it uses symbol versioning to achieve ABI stability despite
  395. internal changes and API extension;
  396. .IP \(bu 4
  397. it doesn't export private symbols (such symbols can be tagged optional as
  398. workaround).
  399. .P
  400. While maintaining the symbols file, it's easy to notice appearance and
  401. disappearance of symbols. But it's more difficult to catch incompatible
  402. API and ABI change. Thus the maintainer should read thoroughly the
  403. upstream changelog looking for cases where the rules of good library
  404. management have been broken. If potential problems are discovered,
  405. the upstream author should be notified as an upstream fix is always better
  406. than a Debian specific work-around.
  407. .SH OPTIONS
  408. .TP
  409. .BI \-P package-build-dir
  410. Scan \fIpackage-build-dir\fR instead of debian/tmp.
  411. .TP
  412. .BI \-p package
  413. Define the package name. Required if more than one binary package is listed in
  414. debian/control (or if there's no debian/control file).
  415. .TP
  416. .BI \-v version
  417. Define the package version. Defaults to the version extracted from
  418. debian/changelog. Required if called outside of a source package tree.
  419. .TP
  420. .BI \-e library-file
  421. Only analyze libraries explicitly listed instead of finding all public
  422. libraries. You can use shell patterns used for pathname expansions (see
  423. the \fBFile::Glob\fP(3perl) manual page for details) in \fIlibrary-file\fR
  424. to match multiple libraries with a single argument (otherwise you need
  425. multiple \fB\-e\fR).
  426. .TP
  427. .BI \-I filename
  428. Use \fIfilename\fR as reference file to generate the symbols file
  429. that is integrated in the package itself.
  430. .TP
  431. .BR \-O [\fIfilename\fP]
  432. Print the generated symbols file to standard output or to \fIfilename\fR
  433. if specified, rather than to
  434. .B debian/tmp/DEBIAN/symbols
  435. (or
  436. .IB package-build-dir /DEBIAN/symbols
  437. if
  438. .B \-P
  439. was used). If \fIfilename\fR is pre-existing, its contents are used as
  440. basis for the generated symbols file.
  441. You can use this feature to update a symbols file so that it matches a
  442. newer upstream version of your library.
  443. .TP
  444. .BI \-t
  445. Write the symbol file in template mode rather than the format compatible with
  446. \fBdeb\-symbols\fP(5). The main difference is that in the template mode symbol
  447. names and tags are written in their original form contrary to the
  448. post-processed symbol names with tags stripped in the compatibility mode.
  449. Moreover, some symbols might be omitted when writing a standard
  450. \fBdeb\-symbols\fP(5) file (according to the tag processing rules) while all
  451. symbols are always written to the symbol file template.
  452. .TP
  453. .BI \-c [0-4]
  454. Define the checks to do when comparing the generated symbols file with the
  455. template file used as starting point. By default the level is 1. Increasing
  456. levels do more checks and include all checks of lower levels. Level 0 never
  457. fails. Level 1 fails if some symbols have disappeared. Level 2 fails if some
  458. new symbols have been introduced. Level 3 fails if some libraries have
  459. disappeared. Level 4 fails if some libraries have been introduced.
  460. This value can be overridden by the environment variable
  461. .BR DPKG_GENSYMBOLS_CHECK_LEVEL .
  462. .TP
  463. .BI \-q
  464. Keep quiet and never generate a diff between generated symbols file and the
  465. template file used as starting point or show any warnings about new/lost
  466. libraries or new/lost symbols. This option only disables informational output
  467. but not the checks themselves (see \fB\-c\fP option).
  468. .TP
  469. .BI \-a arch
  470. Assume \fIarch\fR as host architecture when processing symbol files. Use this
  471. option to generate a symbol file or diff for any architecture provided its
  472. binaries are already available.
  473. .TP
  474. .BI \-d
  475. Enable debug mode. Numerous messages are displayed to explain what
  476. .B dpkg\-gensymbols
  477. does.
  478. .TP
  479. .BI \-V
  480. Enable verbose mode. The generated symbols file contains deprecated
  481. symbols as comments. Furthermore in template mode, pattern symbols
  482. are followed by comments listing real symbols that have matched the
  483. pattern.
  484. .TP
  485. .BR \-? ", " \-\-help
  486. Show the usage message and exit.
  487. .TP
  488. .BR \-\-version
  489. Show the version and exit.
  490. .
  491. .SH SEE ALSO
  492. .BR https://people.redhat.com/drepper/symbol\-versioning
  493. .br
  494. .BR https://people.redhat.com/drepper/goodpractice.pdf
  495. .br
  496. .BR https://people.redhat.com/drepper/dsohowto.pdf
  497. .br
  498. .BR deb\-symbols (5),
  499. .BR dpkg\-shlibdeps (1).