PLC-lang / rusty

Structured Text Parser and LLVM Frontend
GNU Lesser General Public License v3.0
223 stars 53 forks source link

Add initializers to the global constructors #1327

Closed ghaith closed 1 month ago

ghaith commented 1 month ago

Added the project initializer to the global constructors list ,this insures that the linker will place them in the .init section of the ELF file. This will remove the need for a runtime to manually call the initializers as this is now part of the loading sequence.

ghaith commented 1 month ago

The PR is big because it changes all current tests, i split it into several commits: The code is in the first few commits The tests are devided into the snap section and the lit section. I only had to update tests, i didn't add an extra one because the changes for lit and init tests already reflect the change.