| 1 |
When reporting binutils errors, please provide the actual input files |
| 2 |
and options given to the tool (gas, objcopy, ld, etc.) at run time. |
| 3 |
This can mean the difference between a pleasant debugging experience |
| 4 |
and a heisenbug that becomes unreproducible when gcc's code generation |
| 5 |
changes. |
| 6 |
|
| 7 |
For example, to create a testcase for an "ld" problem, first find the |
| 8 |
"gcc" command line that triggers the error: |
| 9 |
|
| 10 |
$ make |
| 11 |
... output ending in an error ... |
| 12 |
$ make V=1 VERBOSE=1 2>&1 | head -1 |
| 13 |
|
| 14 |
Add "-v" after gcc and run it again. One of the early output lines |
| 15 |
will be an invocation of collect2. Replace collect2 with "ld" and |
| 16 |
it should reproduce the same error. If you collect all the objects |
| 17 |
(including system libraries) mentioned on the "ld" command line in a |
| 18 |
tarball and send it along with the ld command line then that is a |
| 19 |
testcase. |
| 20 |
|
| 21 |
A possible step after that is to try omitting some objects from the |
| 22 |
ld command line and see if it still triggers the same error, but |
| 23 |
that's just icing on the cake. |
| 24 |
|
| 25 |
Happy debugging! |