How can I get gcc to add a prefix to all symbol names

前端 未结 2 1327
悲&欢浪女
悲&欢浪女 2020-12-16 00:54

I know that in the past there was an option -fprefix-function-name that would add a prefix to all generated symbols, it doesn\'t seem to be part of gcc anymore.

2条回答
  •  萌比男神i
    2020-12-16 01:35

    I believe this answer will give you the solution.

    In short, you can 'prefix' symbols in an existing library using objcopy like this:

    objcopy --prefix-symbols=foo_ foo.o

提交回复
热议问题