Fixing multiple aliasing of a symbol
Sinny Kumari
skumari@redhat.com
Wed Jan 1 00:00:00 GMT 2014
Thank you so much for feedback. I have made changes according to instruction
mentioned in the email and attached updated patch.
On Wednesday 18 Jun 2014 6:03:47 PM you wrote:
> Hello Sinny,
>
> Thank you very much for the patch, which looks good to me, overall.
>
> I just have a few nits to point you to, if you don't mind.
>
> First, you need to really locally commit the thing and sign your work,
> and then use 'git format-patch' to get the patch. This is explained in
> the CONTRIBUTING file in the source tree. Also, please read the
> COMMIT-LOG-GUIDELINES file of the source tree to know how to format the
> commit log.
>
> You can look at existing commits in the history to see how they are
> formatted, for instancve.
>
> Now the nits of the patch itself.
>
> diff --git a/src/abg-reader.cc b/src/abg-reader.cc
> [...]
>
> @@ -1650,13 +1651,26 @@ build_elf_symbol_db(read_context& ctxt,
> [...]
>
> {
> if (xml_char_sptr s = XML_NODE_GET_ATTRIBUTE(x->first, "alias"))
> {
> - string alias_id = CHAR_STR(s);
> - string_elf_symbol_sptr_map_type::const_iterator i =
> - id_sym_map.find(alias_id);
> - assert(i != id_sym_map.end());
> - assert(i->second->is_main_symbol());
> + string alias_id = CHAR_STR(s);
>
> - x->second->get_main_symbol()->add_alias(i->second.get());
> + // Symbol aliases can be multiple separtaed by comma(,), split them
>
> In the comment, I guess you meant 'separated'.
>
> + std::vector<std::string> elems;
> + std::stringstream aliases(alias_id);
> + std::string item;
> + while (std::getline(aliases, item, ','))
> + {
> + elems.push_back(item);
> + }
>
> I think we need a test case for this, similar to what is found in the
> tests/data/test-read-dwarf/ directory. Basically, there would be a short
> program compiled in a *.so file, and that contains a symbol with several
> aliases. The tests/test-read-dwarf.cc harness would then read the .so
> file, emit an XML for that and compare it to a reference XML. If you
> can send me the source code for the program that is to be compiled into
> the *.so, I can add it to the test suite, or we can discuss how to do
> that if you want. I think I need to add documentation for all this ;-)
>
I will work on writing test case for same.
Thanks
SInny Kumari
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Keep-symbol-s-multiple-aliases-within-single-attribu.patch
Type: text/x-patch
Size: 2885 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libabigail/attachments/20140101/5213cff3/attachment.bin>
More information about the Libabigail
mailing list