Process for reducing the size of an executable

前端 未结 8 1512
借酒劲吻你
借酒劲吻你 2020-12-02 15:00

I\'m producing a hex file to run on an ARM processor which I want to keep below 32K. It\'s currently a lot larger than that and I wondered if someone might have some advice

8条回答
  •  一向
    一向 (楼主)
    2020-12-02 15:43

    Ok so in the end I just reduced the project to it's simplest form, then slowly added files one by one until the function that I wanted to remove appeared in the 'readelf' file. Then when I had the file I commented everything out and slowly add things back in until the function popped up again. So in the end I found out what called it and removed all those calls...Now it works as desired...sweet!

    Must be a better way to do it though.

提交回复
热议问题