[PATCH 1/2] xtensa: add --tramp-limit option to gas

augustine.sterling@gmail.com augustine.sterling@gmail.com
Wed Aug 12 16:32:00 GMT 2015


On Tue, Aug 11, 2015 at 5:54 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> Hardcoded frag count limit for trampoline frag emission may not work for
> all configurations. Make that limit configurable.

Frags, and especially frag-counts are a gas internal implementation
detail, and exposing them to the command line is not a good idea. The
count can change depending on the other obstacks involved, and many
other things.

You can tell the exact maximum size of all frags--it's decided when
they are closed, so you would be far better off determining the
maximum distance from one trampoline to the next and basing the
decision on that. If the issue is that they need to be created prior
to closing a frag, you can check if you need to close one by keeping a
running max size, perhaps at every instruction.

So, unfortunately, I think this change needs more work.



More information about the Binutils mailing list