23 Commits

Author SHA1 Message Date
Cameron Cawley
038579d0d9 PLUGINS: Improve warnings when allocation fails 2022-06-17 20:38:37 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Bastien Bouclet
34e835a20c 3DS: Implement dynamic plugins
Allows a full build to run on old generation devices
2019-12-01 17:19:50 +01:00
Johannes Schickel
121687d2ed BACKENDS: Make GPL headers consistent in themselves. 2014-02-18 02:39:32 +01:00
Christoph Mallon
23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Yotam Barnoy
6817d4b300 PLUGINS: add ELF memory manager to solve fragmentation
Following lordhoto's suggestion, I implemented a simple allocator that grabs the size of the biggest available plugin in memory. This is an elegant solution to the fragmentation problem, with the caveat that memory is wasted. As such, it's not suited for the DS, so I added a #define to disable it there.

svn-id: r55009
2010-12-22 14:48:51 +00:00
Max Horn
7ace85e636 PLUGINS: Simplify ELF plugin providers & DLObject subclasses
* Remove DLObject virtual methods allocSegment and freeSegment.
  As long as all DLObject implementations use memalign + free to
  allocate/release segments, there is no point in wrapping those.
  This enables further simplifications.
* Add TemplatedELFPlugin template class. Use this instead of explicit
  ELFPlugin subclasses.
* Rename DLObject::discard_symtab to discardSymtab

svn-id: r54082
2010-11-05 01:20:34 +00:00
Yotam Barnoy
94c8d0a14d Updated with latest from trunk
svn-id: r53976
2010-10-31 11:08:43 +00:00
Yotam Barnoy
8df4278ba8 PLUGINS: fixed issue with R_MIPS_32 relocations
Caused crash in some games. The problem was referring to the right segment. R_MIPS_32 relocations can be found in the Shorts segment, but still need to refer to the main segment if the symbol is found there.

svn-id: r52750
2010-09-16 17:37:54 +00:00
Yotam Barnoy
09cb941690 PLUGINS: Fix function arguments in MIPS loader
Derived virtual function wasn't overwriting base function.

svn-id: r52749
2010-09-16 17:37:31 +00:00
Andre Heider
41834499ed PLUGINS: Cleanup.
- Unify ELF loader handling in configure
- Rename ELF_LOADER_TARGET to USE_ELF_LOADER

svn-id: r52728
2010-09-15 07:43:16 +00:00
Yotam Barnoy
b77fd21969 PLUGINS: fixed MIPS plugin loader
Adjusted to new VMA handling and fixed a few errors which caused crashes. Also removed unneeded expansion of alignment value.

svn-id: r52589
2010-09-06 12:04:30 +00:00
Yotam Barnoy
a3190a5bb5 PLUGINS: added missing call in destructor which caused crashing
svn-id: r52588
2010-09-06 12:03:15 +00:00
Andre Heider
cd5e62bbe8 PLUGINS: Added _segmentVMA to the MIPS loader.
Also added 2 TODOs for all loaders not respection that offset.

svn-id: r52577
2010-09-05 22:00:41 +00:00
Andre Heider
364acaae45 PLUGINS: Remove spurious extra allocation.
Elf32_Phdr.p_align is to align the memory location of the loaded
segment, not to extend its size. The size of the scratch area
(like .bss and .sbss) is p_memsz-p_filesz, which has to be set to
zero by the loader.

svn-id: r52576
2010-09-05 22:00:19 +00:00
Andre Heider
a4c9de25e6 PLUGINS: Move doxygen to the base class header.
No point in documenting it on every derived class.

svn-id: r52574
2010-09-05 21:59:29 +00:00
Andre Heider
d8b85ffcb8 PLUGINS: Formatting.
Misformatted casts in an earier commit, oops.

svn-id: r52572
2010-09-05 21:58:45 +00:00
Andre Heider
402c71860f PLUGINS: Make the file stream a member of DLObject.
No point in passing it to functions all over the place. Release the
stream when it's not required anymore.

svn-id: r52558
2010-09-05 12:53:15 +00:00
Andre Heider
3b2a9734d1 PLUGINS: Type cleanup.
Use our types, get rid of some casts.

svn-id: r52557
2010-09-05 12:52:49 +00:00
Andre Heider
c4a88559a5 PLUGINS: Move platform specific code out of the generic ELF loader.
Instead overwrite pure virtual functions in a backend specific class.

svn-id: r52556
2010-09-05 12:52:17 +00:00
Andre Heider
86f4dbd956 PLUGINS: Move all ELF loader related files to its own directory.
svn-id: r52555
2010-09-05 12:51:25 +00:00