Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22002

gcc assembler - create only the minimal instructions necessary

$
0
0

I have created a very minimal application in assembly. It sets some registers to 0 and does a multiplication. Nothing fancy.

However, the gcc adds a lot of stuff to the machine code I do not want.

A small list of the stuff I find in the objdump:

  • deregister_tm_clones
  • register_tm_clones
  • __do_global_dtors_aux
  • frame_dummy
  • __libc_fini_array
  • memset
  • and a few more

I know that I do not need them, but I have no idea how I can tell to compiler to stop including them. I tried to use optimization options, but this did not change anything.

I compile it basically like: GCC -o ./main.elf ./main.S

Thank you very much for any help!


Viewing all articles
Browse latest Browse all 22002

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>