<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/89369>89369</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Inquiry: Modify symbols in LLVM bitcode file to resolve conflicts
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
abhisen7
</td>
</tr>
</table>
<pre>
Hi, while enabling`-fsanitize=cfi`, there seems to be an issue with renaming duplicate symbols. Previously, this could be done inside a cmake file using `objcopy..` but since CFI enablement requires LTO, clang is now compiling in LLVM bitcode format rather than the usual object code format. Hence, `objcopy` cannot read that format (also tried with `llvm-objcopy` and failed) and resolve the conflict, thereby causing a linker failure.
**My question is**: Does LLVM have any tool that can parse the LLVM bitcode format and allow renaming symbols? If not, is it acceptable that I submit a patch to upstream to add this capability within [llvm-nm](https://github.com/llvm/llvm-project/blob/4d7f3d9e0fb8cf9a4db6aa73c4fcb21bae98ef3a/llvm/tools/llvm-nm/llvm-nm.cpp), as it seems that this is the closest util that can read this format.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVM2O4jgQfhpzKXUUnEDIIYeeaaFpqVu7h9Xey3aF1IxjZ2K7UfbpV05gaGn3MhKCAPbn76-MIfDFEXXi8EUcXnaY4uDnDtXAgVyzU94s3TcW8itcB7YE5FBZdhdxLJ_6gI4j_0OietE9i2OZ18WBZoJANAaIHhQBOuAQEsGV4wAzORzZXcCkybLGSBCWUXkbCvhzpg_2KdhlQ-IA2idrMorxjoBdYEOAoEf8QdBnSilkNHEsvfqu_bQUhTiWoFKEwE4TfD2_brRpJBdhpp-JZwrw9tcf-RRt0V2AAzh_Be3HibM-YAdvb3-_g-KovSHo_TxihBmzPogDuqwUUkhowavvpCN8WljAN3Ka8gEPZpmXRud8ZoEmo8Q7sJAntMFDnJnM5pQ4ltZ-jE-fdqMz0CNbMkK267eZgrcftJLR3vWWdfwVg1pA4-YPgmX3g-Z1e5qpEOWLKJ9v7zK_3hf4mShE9jmw7TdRPcOLz25lMwb8yHEuEL23G32NDiacw8bg_yzLLNFaf31EfwtcVGd47cH5lTEH4AioNU0xp7Xhv0JIasx_wIRRD7lTaQpxJhzzMxpzKwpOqNhyXFb32IE4fFn9c6M4vAh5GmKcgqiehTwLeb5wHJIqtB-FPOd1t4-nafY5TSHPynol5Lk2TV-ZlspenXTfYm3UEbGpdN1rJfcKqT1RX-EDJ9sT7nhufDwVepqEbLNcXOXe5iQrXVVw2JK0PlCIkCJ_8vlWGg73ku1MV5m2anFH3b7ZVwdZy6raDd0RjdaNlqejaeoGS6K2LltSdDBVVVdyx50sZV3W-3ZfHpp9VZBu-r6Uqj002hzkSdQljci2yMwLP1926wx3p7Y6tjuLimxYbw0pHV23ARdS5ktk7la1Kl2CqEvLIYYHSuRoqXt1eQiX3K53b7hf7pX479zlEY_-V8_vHQ-7NNvutyNdeeZoVh3_BgAA___fMrC7">