From 6daeb39ecc7ffd0e834e63f6495442c4211c5c1c Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 4 Oct 2018 14:55:02 +0200 Subject: Use hash for library placeholders. --- libevmasm/LinkerObject.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libevmasm/LinkerObject.h') diff --git a/libevmasm/LinkerObject.h b/libevmasm/LinkerObject.h index 152487b4..92890803 100644 --- a/libevmasm/LinkerObject.h +++ b/libevmasm/LinkerObject.h @@ -50,6 +50,11 @@ struct LinkerObject /// addresses by placeholders. std::string toHex() const; + /// @returns a 36 character string that is used as a placeholder for the library + /// address (enclosed by `__` on both sides). The placeholder is the hex representation + /// of the first 18 bytes of the keccak-256 hash of @a _libraryName. + static std::string libraryPlaceholder(std::string const& _libraryName); + private: static h160 const* matchLibrary( std::string const& _linkRefName, -- cgit v1.2.3