Write access to symbols, exported from DLL or SO
It is legal to overwrite exported data in attached DLL/SO?
t_Controller controller = (t_Controller*) GetProcAddress(SomeDLL, "Controller"); controller->Args = args; // <--- here controller->Run();
Ok - so you are exporting a struct of some kind.
Once a pointer to the struct is obtained, whether or not its legal to write to the struct from the exe, depends entirely on whether or not its legal, in the dll, to write to the struct.
i.e. is it a const struct? If its not defined as const, then you can write to it. If it is defined as const, then your GetProcAddress is just a complicated way of casting the const off, which will result - as always - in undefined behavior. i.e. it may, or may not work, depending on your compilers implementation - usually whether or not static objects declared at global scope are placed in a read-only data section.