RAD Studio 10.2 Tokyo will be out very soon, and I’d like to let you know some of what you can expect to see new on the C++Builder side. While the majority of work is for Linux, which will be available for C++ in 10.2.1, we’ve worked on three key areas:
Today I want to discuss what’s new in the linker.
The Win32 and Win64 linker
The Win32 linker, which we also use for Win64, is one of the oldest technologies we still use, and until today in recent years it hasn’t had much work done on it. As time has passed the applications people are writing, and so the data that needs to be linked, has changed significantly. Today’s apps are larger, with more debug info and importantly larger quantities of certain types of debug info than they were when the linker was first written. This led to problems allocating space for and handling large linksets. Sometimes, the problem was not the size of a specific type of data, so much as that the size was more than had been predicted in relation to other types when the linker was written.
We have addressed this in 10.2 in two ways:
- The linker is now large address aware and can address up to 4GB on a 64-bit system, twice the previous amount. (Some customers hacked the linker to be LAE in the past by toggling the bit in the PE header; since the code wasn’t written to be LAE-aware this hack prevented incremental linking and sometimes other functionality from functioning correctly.)
- The linker has been tuned to modern debug usage. That is, the various pools and heaps it uses have been modified to follow typical behaviour for debug information today.
The second means that many linksets that experienced problems will now link correctly. The first means that linksets that stressed the heap allocations, even when manually tweaked via command-line flags, can now access much more memory and link correctly. We hope to see the vast majority of linker errors solved with these two changes.
The vast majority? What if that’s not me?
Glad you asked! In the past, we recommended users use command-line flags to change the allocation size of various pools or heaps.
Those flags are still available, and we have expanded their support. The settings are now available in the IDE’s project options (C++ Linker > Linker Heap Settings) with some options for Win32 linking, and more for Win64 linking:
If you encounter an error, the linker will emit a message stating what failed, and you can look up the appropriate option here to set a specific size. (Note if you’re building in the IDE, you may need to set Verbosity to Diagnostic in Tools > Options > Environment Options.) However, the vast majority of users will not need to use these settings – they are there as a backup.
We plan to continue working on the linker in future over the next few releases. If you have update subscription, you will get all changes as they are released. However, in 10.2, we’ve taken a large step in addressing issues customers have experienced. We hope that when you test out your projects with 10.2, you will find significantly improved behaviour.