diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-04-03 03:37:26 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-04-03 03:37:26 +0000 |
commit | 33af8d33f9aa35ce8874c4c52fd1d8033b56f9f7 (patch) | |
tree | 430f7be47b1a3cb0b01a5695bba56ec2d72cbd69 /bfd/configure | |
parent | 9549af6ae699e5e64591cd0245ea5b2861d6f397 (diff) | |
download | binutils-redhat-33af8d33f9aa35ce8874c4c52fd1d8033b56f9f7.tar.gz |
ld: optimize vfinfo output slightly
ld atm ends up calling the write() syscall on every char when displaying
an error message. For example:
$ echo 'main(){foo();}' | strace -f -ewrite gcc -x c -o /dev/null -
...
[pid 13035] write(2, ":", 1) = 1
[pid 13035] write(2, " ", 1) = 1
[pid 13035] write(2, "I", 1) = 1
[pid 13035] write(2, "n", 1) = 1
[pid 13035] write(2, " ", 1) = 1
[pid 13035] write(2, "f", 1) = 1
[pid 13035] write(2, "u", 1) = 1
[pid 13035] write(2, "n", 1) = 1
[pid 13035] write(2, "c", 1) = 1
[pid 13035] write(2, "t", 1) = 1
[pid 13035] write(2, "i", 1) = 1
[pid 13035] write(2, "o", 1) = 1
[pid 13035] write(2, "n", 1) = 1
[pid 13035] write(2, " ", 1) = 1
[pid 13035] write(2, "`", 1) = 1
...
That's just to write ": In function `main':". A slight optimization in
the vfinfo() func gives a much more reasonable syscall footprint:
...
write(2, ": In function `", 15) = 15
...
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'bfd/configure')
0 files changed, 0 insertions, 0 deletions