-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gcc -mbaserel option broken in newer gcc versions > 4.0.4 #14
Comments
Thanks. What is the actual issue? Is it:
With the |
Which gcc , binutils version are yo using, stock SDK? |
Hi @migthymax, this was just using all stock options. It looks like the source of information wrt. baserel is: https://www.amigans.net/modules/newbb/viewtopic.php?topic_id=9293. https://franke.ms/amiga/hacking_gcc_and_binutils.wiki I read roughly what it is about, but if we had a single source document that would be useful. It sounds like this is to do with making programs be able to be reentrant by copying ELF sections for each instance of a program so that they all have their own data sections? It also looks like baserel has been left behind for sometime and this would require some work - perhaps a lot, perhaps not - to put back in to our later versions of GCC. I still think a document would be useful, but then - you could say that about anything. |
Yeah that's the right direction. The "main" usage for baserel (with my current understanding) is that it is used in library development so that each opener has its own data sections. This is can be handy if you want to port a *unix so library to a amiga library (no sobj). The so library has per default a data section for each opener, so the data section per opener can be modeled by baserel. So in the word of shared code in AmigaOS 4, we have the following concepts: a) A "basic" Amiga os library, which is really shared between all openers, so all openers have access to the same data section, code section of the library. b) A step further we have a Amiga os library using -baserel, thus each all openers share the same code section, but each has its own data section. c) A Amiga sobj shared object. The data section and code section is dynamically loaded during startup for each program (opener). With the current implementation nothing is shared with other openers. So each opener has its own data section, like solution b), but here even symbols can be exported to the opener, and even be imported from the opener. All three concepts have are advantages/disadvantages. c) makes it easy to port so *unix library, but optimized memory usage is no a priority. a) is the best in terms of memory usages, b) is a compromise between a) and c) with the lost of symbol import/export. And for example AmiSSL uses b) to port ssl. Here even another source of information: |
Olivier Roberts provided the following test case for the
-mbaserel
address mode, which is broken in newer gcc version.That issue is one topic which avoids compiling for example AmiSSL with a modern gcc.
The text was updated successfully, but these errors were encountered: