This is an archive of the discontinued LLVM Phabricator instance.

Drop __real_ symbol from the output symbol table.
ClosedPublic

Authored by ruiu on Aug 26 2018, 11:46 PM.

Details

Summary

In D34993, we discussed and concluded that we should drop real_
symbol from the symbol table, but I did the opposite in D50569.
This patch is to drop
real_ symbol.

Diff Detail

Event Timeline

ruiu created this revision.Aug 26 2018, 11:46 PM
ruiu added a reviewer: grimar.Sep 2 2018, 6:25 PM
grimar accepted this revision.Sep 6 2018, 4:19 AM

My apologies here, I did not see this patch for some reason. I believe it is ok, so LGTM.

This revision is now accepted and ready to land.Sep 6 2018, 4:19 AM

@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.
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2020, 5:29 PM