Aug 082015

gcc can compile either c source or assembler (.s extension) or even a combination of both.

As I had the assembler source, decided to experiment with altering the string data (I don’t yet know enough to do anything else).

ARM asm source with some slight alterations

it still worked 🙂

asm source output

note how the addresses of the array pointer change, as the strings have grown by a few characters…

below is the original code


of course this is basic easy stuff; those strings are static/constant data and declared at compile time. if your code is dealing with strings that can change their length, it must always have sufficient free memory allocated to wherever the string data ends up, enough for the largest of the data. Otherwise you get a buffer overflow and your goose is cooked…

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>