== addr.c

```
#include <stdio.h>

void f() { }

int main(int argc, char **argv)
{
  f();
  puts("done");
  return 0;
}
```

```
$ clang -g addr.c ; objdump -d a.out | grep -B 3 puts | tail -n 4
  400556:       e8 d5 ff ff ff          callq  400530 <f>
  40055b:       48 bf 04 06 40 00 00    movabs $0x400604,%rdi
  400562:       00 00 00
  400565:       e8 a6 fe ff ff          callq  400410 <puts@plt>
```
`40055b` is corresponding to placing "done" in `%rdi`, so I expect it
to be associated to line of `puts("done")`. However, `addr2line
40055b` shows the line of `f()`.


== ENV

clang: clang version 3.8.1-svn271230-1~exp1 (branches/release_38)
addr2line: GNU addr2line (GNU Binutils for Ubuntu) 2.24

-- 
Best Regards

Yours faithfully
Albert Netymk

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to