File: abi-compliance-checker.1

package info (click to toggle)
abi-compliance-checker 1.97.7-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,316 kB
  • sloc: perl: 23,535; xml: 5,337; makefile: 15
file content (598 lines) | stat: -rw-r--r-- 14,948 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.9.
.TH ABI-COMPLIANCE-CHECKER "1" "May 2012" "abi-compliance-checker Compliance Checker (ACC) 1.97.7" "User Commands"
.SH NAME
abi-compliance-checker \- tool to compare ABI compatibility of shared C/C++ library versions
.SH DESCRIPTION
.SS "NAME:"
.IP
ABI Compliance Checker (abi\-compliance\-checker)
Check backward compatibility of a C/C++ library API
.SS "DESCRIPTION:"
.IP
ABI Compliance Checker (ACC) is a tool for checking backward binary and
source\-level compatibility of a shared C/C++ library. The tool checks
header files and shared libraries (*.so) of old and new versions and
analyzes changes in API and ABI (ABI=API+compiler ABI) that may break binary
and/or source\-level compatibility: changes in calling stack, v\-table changes,
removed symbols, renamed fields, etc. Binary incompatibility may result in
crashing or incorrect behavior of applications built with an old version of
a library if they run on a new one. Source incompatibility may result in
recompilation errors with a new library version.
.IP
The tool is intended for developers of software libraries and maintainers
of operating systems who are interested in ensuring backward compatibility,
i.e. allow old applications to run or to be recompiled with newer library
versions.
.IP
Also the tool can be used by ISVs for checking applications portability to
new library versions. Found issues can be taken into account when adapting
the application to a new library version.
.IP
This tool is free software: you can redistribute it and/or modify it
under the terms of the GNU LGPL or GNU GPL.
.SS "USAGE:"
.IP
abi\-compliance\-checker [options]
.SS "EXAMPLE:"
.IP
abi\-compliance\-checker \fB\-lib\fR NAME \fB\-old\fR OLD.xml \fB\-new\fR NEW.xml
.IP
OLD.xml and NEW.xml are XML\-descriptors:
.IP
<version>
.IP
1.0
.IP
</version>
.IP
<headers>
.IP
/path1/to/header(s)/
/path2/to/header(s)/
.IP
\&...
.IP
</headers>
.IP
<libs>
.IP
/path1/to/library(ies)/
/path2/to/library(ies)/
.IP
\&...
.IP
</libs>
.SS "INFORMATION OPTIONS:"
.HP
\fB\-h\fR|\-help
.IP
Print this help.
.HP
\fB\-i\fR|\-info
.IP
Print complete info.
.HP
\fB\-v\fR|\-version
.IP
Print version information.
.HP
\fB\-dumpversion\fR
.IP
Print the tool version (1.97.7) and don't do anything else.
.SS "GENERAL OPTIONS:"
.HP
\fB\-l\fR|\-lib|\-library <name>
.IP
Library name (without version).
It affects only on the path and the title of the report.
.HP
\fB\-d1\fR|\-old|\-o <path>
.IP
Descriptor of 1st (old) library version.
It may be one of the following:
.IP
1. XML\-descriptor (VERSION.xml file):
.IP
<version>
.IP
1.0
.IP
</version>
.IP
<headers>
.IP
/path1/to/header(s)/
/path2/to/header(s)/
.IP
\&...
.IP
</headers>
.IP
<libs>
.IP
/path1/to/library(ies)/
/path2/to/library(ies)/
.IP
\&...
.IP
</libs>
.IP
\&... (XML\-descriptor template
.IP
can be generated by \fB\-d\fR option)
.IP
2. ABI dump generated by \fB\-dump\fR option
3. Directory with headers and/or shared libraries
4. Single header file
5. Single shared library
6. Comma separated list of headers and/or libraries
.IP
If you are using an 2\-6 descriptor types then you should
specify version numbers with \fB\-v1\fR <num> and \fB\-v2\fR <num> options too.
.IP
For more information, please see:
.IP
http://ispras.linuxbase.org/index.php/Library_Descriptor
.HP
\fB\-d2\fR|\-new|\-n <path>
.IP
Descriptor of 2nd (new) library version.
.HP
\fB\-dump\fR|\-dump\-abi <descriptor path(s)>
.IP
Dump library ABI to gzipped TXT format file. You can transfer it
anywhere and pass instead of the descriptor. Also it can be used
for debugging the tool. Compatible dump versions: 2.0<=V<=2.16
.HP
\fB\-old\-dumps\fR
.IP
Enable support for old\-version ABI dumps (1.18<=V<2.0).
.SS "EXTRA OPTIONS:"
.HP
\fB\-d\fR|\-descriptor\-template
.IP
Create XML\-descriptor template ./VERSION.xml
.HP
\fB\-app\fR|\-application <path>
.IP
This option allows to specify the application that should be checked
for portability to the new library version.
.HP
\fB\-static\-libs\fR
.IP
Check static libraries instead of the shared ones. The <libs> section
of the XML\-descriptor should point to static libraries location.
.HP
\fB\-cross\-gcc\fR|\-gcc\-path <path>
.IP
Path to the cross GCC compiler to use instead of the usual (host) GCC.
.HP
\fB\-cross\-prefix\fR|\-gcc\-prefix <prefix>
.IP
GCC toolchain prefix.
.HP
\fB\-sysroot\fR <dirpath>
.IP
Specify the alternative root directory. The tool will search for include
paths in the <dirpath>/usr/include and <dirpath>/usr/lib directories.
.HP
\fB\-v1\fR|\-version1 <num>
.IP
Specify 1st library version outside the descriptor. This option is needed
if you have prefered an alternative descriptor type (see \fB\-d1\fR option).
.IP
In general case you should specify it in the XML\-descriptor:
.IP
<version>
.IP
VERSION
.IP
</version>
.HP
\fB\-v2\fR|\-version2 <num>
.IP
Specify 2nd library version outside the descriptor.
.HP
\fB\-s\fR|\-strict
.IP
Treat all compatibility warnings as problems. Add a number of "Low"
severity problems to the return value of the tool.
.HP
\fB\-headers\-only\fR
.IP
Check header files without shared libraries. It is easy to run, but may
provide a low quality compatibility report with false positives and
without detecting of added/removed symbols.
.IP
Alternatively you can write "none" word to the <libs> section
in the XML\-descriptor:
.IP
<libs>
.IP
none
.IP
</libs>
.HP
\fB\-objects\-only\fR
.IP
Check shared libraries without header files. It is easy to run, but may
provide a low quality compatibility report with false positives and
without analysis of changes in parameters and data types.
.IP
Alternatively you can write "none" word to the <headers> section
in the XML\-descriptor:
.IP
<headers>
.IP
none
.IP
</headers>
.HP
\fB\-check\-impl\fR|\-check\-implementation
.IP
Compare canonified disassembled binary code of shared libraries to
detect changes in the implementation. Add 'Problems with Implementation'
section to the report.
.HP
\fB\-show\-retval\fR
.IP
Show the symbol's return type in the report.
.HP
\fB\-symbols\-list\fR <path>
.IP
This option allows to specify a file with a list of symbols (mangled
names in C++) that should be checked, other symbols will not be checked.
.HP
\fB\-skip\-headers\fR <path>
.IP
The file with the list of header files, that should not be checked.
.HP
\fB\-use\-dumps\fR
.IP
Make dumps for two versions of a library and compare dumps. This should
increase the performance of the tool and decrease the system memory usage.
.HP
\fB\-nostdinc\fR
.IP
Do not search the GCC standard system directories for header files.
.HP
\fB\-dump\-system\fR <name> \fB\-sysroot\fR <dirpath>
.IP
Find all the shared libraries and header files in <dirpath> directory,
create XML descriptors and make ABI dumps for each library. The result
set of ABI dumps can be compared (\fB\-\-cmp\-systems\fR) with the other one
created for other version of operating system in order to check them for
compatibility. Do not forget to specify \fB\-cross\-gcc\fR option if your target
system requires some specific version of GCC compiler (different from
the host GCC). The system ABI dump will be generated to:
.IP
sys_dumps/<name>/<arch>
.HP
\fB\-dump\-system\fR <descriptor.xml>
.IP
The same as the previous option but takes an XML descriptor of the target
system as input, where you should describe it:
.IP
/* Primary sections */
.IP
<name>
.IP
/* Name of the system */
.IP
</name>
.IP
<headers>
.IP
/* The list of paths to header files and/or
.IP
directories with header files, one per line */
.IP
</headers>
.IP
<libs>
.IP
/* The list of paths to shared libraries and/or
.IP
directories with shared libraries, one per line */
.IP
</libs>
.IP
/* Optional sections */
.IP
<search_headers>
.IP
/* List of directories to be searched
.IP
for header files to automatically
generate include paths, one per line */
.IP
</search_headers>
.IP
<search_libs>
.IP
/* List of directories to be searched
.IP
for shared libraries to resolve
dependencies, one per line */
.IP
</search_libs>
.IP
<tools>
.IP
/* List of directories with tools used
.IP
for analysis (GCC toolchain), one per line */
.IP
</tools>
.IP
<cross_prefix>
.IP
/* GCC toolchain prefix.
.IP
Examples:
.IP
arm\-linux\-gnueabi
arm\-none\-symbianelf */
.IP
</cross_prefix>
.IP
<gcc_options>
.IP
/* Additional GCC options, one per line */
.IP
</gcc_options>
.HP
\fB\-sysinfo\fR <dir>
.IP
This option may be used with \fB\-dump\-system\fR to dump ABI of operating
systems and configure the dumping process.
Default:
.IP
modules/Targets/{unix, symbian, windows}
.HP
\fB\-cmp\-systems\fR \fB\-d1\fR sys_dumps/<name1>/<arch> \fB\-d2\fR sys_dumps/<name2>/<arch>
.IP
Compare two system ABI dumps. Create compatibility reports for each
library and the common HTML report including the summary of test
results for all checked libraries. Report will be generated to:
.IP
sys_compat_reports/<name1>_to_<name2>/<arch>
.HP
\fB\-libs\-list\fR <path>
.IP
The file with a list of libraries, that should be dumped by
the \fB\-dump\-system\fR option or should be checked by the \fB\-cmp\-systems\fR option.
.HP
\fB\-header\fR <name>
.IP
Check/Dump ABI of this header only.
.HP
\fB\-headers\-list\fR <path>
.IP
The file with a list of headers, that should be checked/dumped.
.HP
\fB\-ext\fR|\-extended
.IP
If your library A is supposed to be used by other library B and you
want to control the ABI of B, then you should enable this option. The
tool will check for changes in all data types, even if they are not
used by any function in the library A. Such data types are not part
of the A library ABI, but may be a part of the ABI of the B library.
.IP
The short scheme is:
.IP
app C (broken) \-> lib B (broken ABI) \-> lib A (stable ABI)
.HP
\fB\-q\fR|\-quiet
.IP
Print all messages to the file instead of stdout and stderr.
Default path (can be changed by \fB\-log\-path\fR option):
.IP
logs/run.log
.HP
\fB\-stdout\fR
.IP
Print analysis results (compatibility reports and ABI dumps) to stdout
instead of creating a file. This would allow piping data to other programs.
.HP
\fB\-report\-format\fR <fmt>
.IP
Change format of compatibility report.
Formats:
.IP
htm \- HTML format (default)
xml \- XML format
.HP
\fB\-xml\fR
.IP
Alias for: \fB\-\-report\-format\fR=\fIxml\fR
.HP
\fB\-lang\fR <lang>
.IP
Set library language (C or C++). You can use this option if the tool
cannot auto\-detect a language. This option may be useful for checking
C\-library headers (\fB\-\-lang\fR=\fIC\fR) in \fB\-\-headers\-only\fR or \fB\-\-extended\fR modes.
.HP
\fB\-binary\fR|\-bin|\-abi
.IP
Show "Binary" compatibility problems only.
Generate report to:
.IP
compat_reports/<library name>/<v1>_to_<v2>/abi_compat_report.html
.HP
\fB\-source\fR|\-src|\-api
.IP
Show "Source" compatibility problems only.
Generate report to:
.IP
compat_reports/<library name>/<v1>_to_<v2>/src_compat_report.html
.SS "OTHER OPTIONS:"
.HP
\fB\-test\fR
.IP
Run internal tests. Create two binary incompatible versions of a sample
library and run the tool to check them for compatibility. This option
allows to check if the tool works correctly in the current environment.
.HP
\fB\-test\-dump\fR
.IP
Test ability to create, read and compare ABI dumps.
.HP
\fB\-debug\fR
.IP
Debugging mode. Print debug info on the screen. Save intermediate
analysis stages in the debug directory:
.IP
debug/<library>/<version>/
.IP
Also consider using \fB\-\-dump\fR option for debugging the tool.
.HP
\fB\-cpp\-compatible\fR
.IP
If your header file is written in C language and can be compiled by
the C++ compiler (i.e. doesn't contain C++\-keywords and other bad
things), then you can tell ACC about this and speedup the analysis.
.HP
\fB\-p\fR|\-params <path>
.IP
Path to file with the function parameter names. It can be used
for improving report view if the library header files have no
parameter names. File format:
.IP
func1;param1;param2;param3 ...
func2;param1;param2;param3 ...
.IP
\&...
.HP
\fB\-relpath\fR <path>
.IP
Replace {RELPATH} macros to <path> in the XML\-descriptor used
for dumping the library ABI (see \fB\-dump\fR option).
.HP
\fB\-relpath1\fR <path>
.IP
Replace {RELPATH} macros to <path> in the 1st XML\-descriptor (\fB\-d1\fR).
.HP
\fB\-relpath2\fR <path>
.IP
Replace {RELPATH} macros to <path> in the 2nd XML\-descriptor (\fB\-d2\fR).
.HP
\fB\-dump\-path\fR <path>
.IP
Specify a file path (*.abi.tar.gz) where to generate an ABI dump.
Default:
.IP
abi_dumps/<library>/<library>_<version>.abi.tar.gz
.HP
\fB\-sort\fR
.IP
Enable sorting of data in ABI dumps.
.HP
\fB\-report\-path\fR <path>
.IP
Path to compatibility report.
Default:
.IP
compat_reports/<library name>/<v1>_to_<v2>/compat_report.html
.HP
\fB\-bin\-report\-path\fR <path>
.IP
Path to "Binary" compatibility report.
Default:
.IP
compat_reports/<library name>/<v1>_to_<v2>/abi_compat_report.html
.HP
\fB\-src\-report\-path\fR <path>
.IP
Path to "Source" compatibility report.
Default:
.IP
compat_reports/<library name>/<v1>_to_<v2>/src_compat_report.html
.HP
\fB\-log\-path\fR <path>
.IP
Log path for all messages.
Default:
.IP
logs/<library>/<version>/log.txt
.HP
\fB\-log1\-path\fR <path>
.IP
Log path for 1st version of a library.
Default:
.IP
logs/<library name>/<v1>/log.txt
.HP
\fB\-log2\-path\fR <path>
.IP
Log path for 2nd version of a library.
Default:
.IP
logs/<library name>/<v2>/log.txt
.HP
\fB\-logging\-mode\fR <mode>
.IP
Change logging mode.
Modes:
.IP
w \- overwrite old logs (default)
a \- append old logs
n \- do not write any logs
.HP
\fB\-list\-affected\fR
.IP
Generate file with the list of incompatible
symbols beside the HTML compatibility report.
Use 'c++filt @file' command from GNU binutils
to unmangle C++ symbols in the generated file.
Default names:
.IP
abi_affected.txt
src_affected.txt
.HP
\fB\-component\fR <name>
.IP
The component name in the title and summary of the HTML report.
Default:
.IP
library
.HP
\fB\-l\-full\fR|\-lib\-full <name>
.IP
Change library name in the report title to <name>. By default
will be displayed a name specified by \fB\-l\fR option.
.HP
\fB\-b\fR|\-browse <program>
.IP
Open report(s) in the browser (firefox, opera, etc.).
.HP
\fB\-open\fR
.IP
Open report(s) in the default browser.
.SS "REPORT:"
.IP
Compatibility report will be generated to:
.IP
compat_reports/<library name>/<v1>_to_<v2>/compat_report.html
.IP
Log will be generated to:
.IP
logs/<library name>/<v1>/log.txt
logs/<library name>/<v2>/log.txt
.SS "EXIT CODES:"
.IP
0 \- Compatible. The tool has run without any errors.
non\-zero \- Incompatible or the tool has run with errors.
.SS "REPORT BUGS TO:"
.IP
Andrey Ponomarenko <aponomarenko@rosalab.ru>
.SS "MORE INFORMATION:"
.IP
http://ispras.linuxbase.org/index.php/ABI_compliance_checker
https://github.com/lvc/abi\-compliance\-checker
.SH AUTHOR
Written by Andrey Ponomarenko.
.SH COPYRIGHT
Copyright \(co 2012 ROSA Laboratory
License: LGPL or GPL <http://www.gnu.org/licenses/>
This program is free software: you can redistribute it and/or modify it.