# Rebasing

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Rebasing
> Markdown URL: https://mediated.wiki/source/Rebasing.md
> Source: https://en.wikipedia.org/wiki/Rebasing
> Source revision: 1356550929
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{short description|Process of modifying data based on one reference to another}}
{{more citations needed|date=November 2009}}{{unfocused|date=September 2016}}
{{About|computing activities|the use of a new base for the CPI|consumer price index}}
{{Use dmy dates|date=May 2019|cs1-dates=y}}
{{Use list-defined references|date=December 2021}}
In computing, '''rebasing''' is the process of modifying data based on one reference to another. It can be one of the following:

=={{anchor|DCSS}}Shared libraries==
Rebasing is the process of creating a [shared library](/source/shared_library) image in such a way that it is guaranteed to use [virtual memory](/source/virtual_memory) without conflicting with any other [shared libraries](/source/Library_(computer_science)) loadable in the system. 

IBM [VM/370](/source/VM_(operating_system)) ''discontinuous saved segments'' (DCSS) were an early example of this technique, though not called ''rebasing''.  The technique is used extensively on [Win32](/source/Win32) platforms to avoid the overhead of address relocation of system [DLL](/source/Dynamic-link_library)s by the loader. 

Some security extensions to [Linux](/source/Linux)/[x86](/source/X86_architecture) use rebasing to force the use of code addresses below <code>0x00ffffff</code> in order to introduce a <code>0x00</code> byte into all code pointers;{{cn|reason=I'm not disputing this, but I think a couple of sources discussing this in better details would be interesting here for some readers|date=July 2022}} This eliminates a certain class of [buffer overflow](/source/buffer_overflow) security problems related to improper checking of [null-terminated string](/source/null-terminated_string)s, common in the [C](/source/C_(programming_language)) [programming language](/source/programming_language).

==Other uses==
* Rebasing is the act of moving [changeset](/source/changeset)s to a different [branch](/source/Branching_(software)) when using a [revision control](/source/revision_control) system or in some systems, by synchronizing a branch with the originating branch by merging all new changes in the latter to the former.  For example, [Git](/source/Git_(software)) and [Darcs](/source/Darcs) do this (but Darcs extends the concept and calls it "patch commutation").
* The [daylight saving time](/source/daylight_saving_time) (DST) rebasing tool TZMOVE.EXE contained in [Microsoft Exchange](/source/Microsoft_Exchange_Server) and [Outlook](/source/Microsoft_Outlook) uses to recalculate and reschedule appointment dates that are affected by DST.

==See also==
* [Relocation (computing)](/source/Relocation_(computing))
* [Position-independent code](/source/Position-independent_code)
* [Portable Executable](/source/Portable_Executable) (PE)
* [High memory area](/source/High_memory_area) (HMA)
* [Dynamic dead-code elimination](/source/Dynamic_dead-code_elimination)

==Further reading==
* {{cite book |author-last=Levine |author-first=John R. |author-link=John R. Levine |title=Linkers and Loaders |date=2000 |orig-year=October 1999 |edition=1 |publisher=[Morgan Kaufmann](/source/Morgan_Kaufmann) |series=The Morgan Kaufmann Series in Software Engineering and Programming |location=San Francisco, USA |isbn=1-55860-496-0 |oclc=42413382 |pages=218 |url=https://www.iecc.com/linker/ |access-date=2020-01-12 |url-status=live |archive-url=https://archive.today/20121205032107/http://www.iecc.com/linker/ |archive-date=2012-12-05}} Code: [https://archive.today/20200114225034/https://linker.iecc.com/code.html][ftp://ftp.iecc.com/pub/linker/]{{dead link|date=May 2025|bot=medic}}{{cbignore|bot=medic}} Errata: [https://linker.iecc.com/<!-- https://archive.today/20200114224817/https://linker.iecc.com/ 2020-01-14 -->]
* {{Cite web |url=https://devblogs.microsoft.com/oldnewthing/20041217-00/?p=36953 |author-first=Raymond |author-last=Chen |author-link=Raymond Chen (Microsoft) |date=2004-12-17 |title=How did Windows 95 rebase DLLs? |work=The Old New Thing}}
* {{Cite web |title=Rebasing Win32 DLLs |author-first=Thiadmer |author-last=Riemersma |date=2000-12-01 |url=http://drdobbs.com/184416272 |work=[Dr. Dobb's Journal](/source/Dr._Dobb's_Journal)}}
* {{Cite web |title=Optimizing DLL Loads|author=Mark Baker |date=2004-03-25 |url=http://drdobbs.com/184416922 |work=[Dr. Dobb's Journal](/source/Dr._Dobb's_Journal)}}
* {{Cite journal |journal=[MSDN Magazine](/source/MSDN_Magazine) |title=Improving Application Startup Time |author-first=Claudio |author-last=Caldato |url=http://msdn.microsoft.com/en-gb/magazine/cc163655.aspx#S6 |date=February 2006 |publisher=[Microsoft Corporation](/source/Microsoft_Corporation)}}
* {{Cite journal |journal=[MSDN Magazine](/source/MSDN_Magazine) |title=The Performance Benefits of NGen |author-first=Surupa |author-last=Biswas |url=http://msdn.microsoft.com/en-us/magazine/cc163610.aspx#S5 |date=May 2006 |publisher=[Microsoft Corporation](/source/Microsoft_Corporation)}}
* {{Cite journal |journal=[MSDN Magazine](/source/MSDN_Magazine) |title=An In-Depth Look into the Win32 Portable Executable File Format, Part 2 |author-first=Matt |author-last=Pietrek |author-link=Matt Pietrek |url=http://msdn.microsoft.com/en-us/magazine/cc301808.aspx |date=March 2002 |publisher=[Microsoft Corporation](/source/Microsoft_Corporation)}}
* {{Cite web |title=Rebasing Win32 DLLs: The Whole Story |author-first=Rüdiger R. |author-last=Asche |date=1995-09-18 |url=http://hyper.sunjapan.com.cn/~hz/win32/pagetest.htm |url-status=dead |archive-url=https://web.archive.org/web/20110707022420/http://hyper.sunjapan.com.cn/~hz/win32/pagetest.htm |archive-date=2011-07-07}}
* {{Cite book |title=Debugging applications: Microsoft |series=Microsoft programming series |author-first=John |author-last=Robbins |publisher=[Microsoft Press](/source/Microsoft_Press) |date=2000 |isbn=978-0-7356-0886-3 |pages=34{{ndash}}36}}
* {{Cite web |url=https://community.broadcom.com/symantecenterprise/communities/community-home/librarydocuments/viewdocument?DocumentKey=3d2a3ec7-0747-4add-a56d-809c3e54ff97&CommunityKey=1ecf5f55-9545-44d6-b0f4-4e4a7f5f5e68&tab=librarydocuments |date=2006-08-14 |title=Dynamic Linking in Linux and Windows, part two |author-first1=Reji |author-last1=Thomas |author-first2=Bhasker |author-last2=Reddy |publisher=[Symantec Corp](/source/Symantec_Corp)}}

Category:Computer libraries

---
Adapted from the Wikipedia article [Rebasing](https://en.wikipedia.org/wiki/Rebasing) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Rebasing?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
