@thakis This fixed the --wrap bug mentioned in https://bugs.chromium.org/p/chromium/issues/detail?id=1086636
It seems that this patch had never been committed. I commited it with a few adjustment to the comment and wrap-no-real.s
Note that omitting __real_ is a correctness matter if __real_ is undefined:
// Now renaming is complete, and no one refers to real. We drop real from // .symtab and .dynsym. If real is undefined, it is important that we don't // leave it in .dynsym, because otherwise it might lead to an undefined symbol // error in a subsequent link. If real is defined, we could emit real as an // alias for sym, but that could degrade the user experience of some tools // that can print out only one symbol for each location: sym is a preferred // name than real, but they might print out real instead.