Revision history for DevObjinfo


Revision [16365]

Last edited on 2012-10-11 15:39:57 by DkLwikki [libbfd notes removed]
Additions:
This is accomplished by emitting an extra section called "fbctinf" (""FreeBASIC"" compile time information?) when compiling, and reading it back in at link-time. Furthermore, when building a static library, fbc creates an extra object file (called ""__fb_ct.inf"") containing just that extra information and adds it to the library. At link-time fbc looks at each library to figure out whether it has such an ""__fb_ct.inf"" file or not.
In order to do this fbc has a custom COFF, ELF32 and also archive file format readers that can extract the .fbctinf section content. Previously, fbc used libbfd from binutils to do this, however depending on libbfd is problematic especially because of its highly unstable ABI.
Deletions:
This is accomplished by emitting an extra section called "fbctinf" (""FreeBASIC"" compile time information?) when compiling, and using libbfd at link-time to find out whether object files contain that section, and if so, reading it in. Furthermore, when building a static library, fbc creates an extra object file (called ""__fb_ct.inf"") containing just that extra information and adds it to the library. At link-time fbc looks at each library (using libbfd again) to figure out whether it has such an ""__fb_ct.inf"" file or not.
This feature heavily relies on libbfd, which can cause problems when building fbc, because libbfd does not exactly have a stable interface. Different versions are usually incompatible. That's why fbc has a small wrapper written in C, so it can use the original bfd.h, instead of relying on translated bfd.bi's. That way, you're less likely to run into libbfd-related compatibility problems. Each system (Linux and BSD distributions, ""MinGW"", DJGPP) has their own version of libbfd, sometimes shared, sometimes static, and require different additional libraries to get libbfd working.
Besides these technical problems, there can be legal issues too. Quoting from ""FreeBASIC""/src/compiler/INSTALL:
Take care when linking to the BFD library. Newer versions are licensed under GNU GPL version 3 (or later) and can not be legally combined with ""FreeBASIC's"" compiler source which is licensed under GNU GPL version 2 (or later). Statically linking to libbfd.a will likely require that it be no greater than version 2.17. However, there are no known licensing conflicts if the ""FreeBASIC"" compiler is linked to a shared version of the BFD library.
To avoid all difficulties, the objinfo feature can be disabled with the DISABLE_OBJINFO option when [[DevBuild compiling fbc]]. This is useful when porting fbc to a new platform, when building an independent/standalone/bootstrap fbc, or when running into any libbfd related problems.


Revision [15689]

Edited on 2012-01-16 02:17:42 by SirMud [libbfd notes removed]
Additions:
{{fbdoc item="back" value="DevToc|FreeBASIC Developer Information"}}


Revision [15503]

Edited on 2011-11-04 15:19:38 by DkLwikki [Use DocToc as parent]
Additions:
{{fbdoc item="back" value="DocToc|Table of Contents"}}


Revision [15483]

Edited on 2011-11-02 14:55:31 by DkLwikki [Update]
Additions:
This feature heavily relies on libbfd, which can cause problems when building fbc, because libbfd does not exactly have a stable interface. Different versions are usually incompatible. That's why fbc has a small wrapper written in C, so it can use the original bfd.h, instead of relying on translated bfd.bi's. That way, you're less likely to run into libbfd-related compatibility problems. Each system (Linux and BSD distributions, ""MinGW"", DJGPP) has their own version of libbfd, sometimes shared, sometimes static, and require different additional libraries to get libbfd working.
Take care when linking to the BFD library. Newer versions are licensed under GNU GPL version 3 (or later) and can not be legally combined with ""FreeBASIC's"" compiler source which is licensed under GNU GPL version 2 (or later). Statically linking to libbfd.a will likely require that it be no greater than version 2.17. However, there are no known licensing conflicts if the ""FreeBASIC"" compiler is linked to a shared version of the BFD library.
To avoid all difficulties, the objinfo feature can be disabled with the DISABLE_OBJINFO option when [[DevBuild compiling fbc]]. This is useful when porting fbc to a new platform, when building an independent/standalone/bootstrap fbc, or when running into any libbfd related problems.
Deletions:
This feature heavily relies on libbfd, which can cause problems when building fbc, because libbfd does not exactly have a stable interface. Different versions are usually incompatible. That's why fbc has a small wrapper written in C, so it can use the original bfd.h, instead of relying on translated bfd.bi's. That way, you're less likely to run into libbfd-related compatibility problems. Each system (Linux and BSD distributions, MinGW, DJGPP) has their own version of libbfd, sometimes shared, sometimes static, and require different additional libraries to get libbfd working.
Take care when linking to the BFD library. Newer versions are licensed under GNU GPL version 3 (or later) and can not be legally combined with ""FreeBASIC's"" compiler source which is licensed under GNU GPL version 2 (or later). Statically linking to libbfd.a will likely require that it be no greater than version 2.17. However, there are no known licensing conflicts if the FreeBASIC compiler is linked to a shared version of the BFD library.
To avoid all difficulties, the objinfo feature can be disabled with ../../configure --disable-objinfo when configuring fbc. This is useful when porting fbc to a new platform, when building an independent/standalone/bootstrap fbc, or when running into the problems described above.


Revision [15036]

Edited on 2011-01-08 13:55:09 by DkLwikki [Update]
Additions:
This is accomplished by emitting an extra section called "fbctinf" (""FreeBASIC"" compile time information?) when compiling, and using libbfd at link-time to find out whether object files contain that section, and if so, reading it in. Furthermore, when building a static library, fbc creates an extra object file (called ""__fb_ct.inf"") containing just that extra information and adds it to the library. At link-time fbc looks at each library (using libbfd again) to figure out whether it has such an ""__fb_ct.inf"" file or not.
This feature heavily relies on libbfd, which can cause problems when building fbc, because libbfd does not exactly have a stable interface. Different versions are usually incompatible. That's why fbc has a small wrapper written in C, so it can use the original bfd.h, instead of relying on translated bfd.bi's. That way, you're less likely to run into libbfd-related compatibility problems. Each system (Linux and BSD distributions, MinGW, DJGPP) has their own version of libbfd, sometimes shared, sometimes static, and require different additional libraries to get libbfd working.
Deletions:
This is accomplished by emitting an extra section called "fbctinf" (""FreeBASIC"" compile time information?) when compiling, and using libbfd at link-time to find out whether object files contain that section, and if so, reading it in. Furthermore, when building a static library, fbc creates an extra object file (called ""__fb_ct.inf"") containing just that fbctinf section and adds it to the library. At link-time fbc looks at each library (using libbfd again) to figure out whether they have such an ""__fb_ct.inf"" file or not.
This feature/functionality is called objinfo, because it stores information in object files. It heavily relies on libbfd. This can cause problems when building fbc, because libbfd does not exactly have a stable interface. Different versions are usually incompatible. That's why fbc has a small wrapper written in C, so it can use the original bfd.h, instead of relying on translated bfd.bi's. That way, you're less likely to run into libbfd-related compatibility problems. Each system (Linux and BSD distributions, MinGW, DJGPP) has their own version of libbfd, sometimes shared, sometimes static, and require different additional libraries to get libbfd working.


Revision [15035]

Edited on 2011-01-08 13:52:39 by DkLwikki [Update]
Additions:
This is accomplished by emitting an extra section called "fbctinf" (""FreeBASIC"" compile time information?) when compiling, and using libbfd at link-time to find out whether object files contain that section, and if so, reading it in. Furthermore, when building a static library, fbc creates an extra object file (called ""__fb_ct.inf"") containing just that fbctinf section and adds it to the library. At link-time fbc looks at each library (using libbfd again) to figure out whether they have such an ""__fb_ct.inf"" file or not.
Besides these technical problems, there can be legal issues too. Quoting from ""FreeBASIC""/src/compiler/INSTALL:
Take care when linking to the BFD library. Newer versions are licensed under GNU GPL version 3 (or later) and can not be legally combined with ""FreeBASIC's"" compiler source which is licensed under GNU GPL version 2 (or later). Statically linking to libbfd.a will likely require that it be no greater than version 2.17. However, there are no known licensing conflicts if the FreeBASIC compiler is linked to a shared version of the BFD library.
Deletions:
This is accomplished by emitting an extra section called "fbctinf" (FreeBASIC compile time information?) when compiling, and using libbfd at link-time to find out whether object files contain that section, and if so, reading it in. Furthermore, when building a static library, fbc creates an extra object file (called ""__fb_ct.inf"") containing just that fbctinf section and adds it to the library. At link-time fbc looks at each library (using libbfd again) to figure out whether they have such an ""__fb_ct.inf"" file or not.
Besides these technical problems, there can be legal issues too. Quoting from FreeBASIC/src/compiler/INSTALL:
Take care when linking to the BFD library. Newer versions are licensed under GNU GPL version 3 (or later) and can not be legally combined with FreeBASIC's compiler source which is licensed under GNU GPL version 2 (or later). Statically linking to libbfd.a will likely require that it be no greater than version 2.17. However, there are no known licensing conflicts if the FreeBASIC compiler is linked to a shared version of the BFD library.


Revision [15034]

Edited on 2011-01-08 13:51:49 by DkLwikki [Update]
Additions:
This is accomplished by emitting an extra section called "fbctinf" (FreeBASIC compile time information?) when compiling, and using libbfd at link-time to find out whether object files contain that section, and if so, reading it in. Furthermore, when building a static library, fbc creates an extra object file (called ""__fb_ct.inf"") containing just that fbctinf section and adds it to the library. At link-time fbc looks at each library (using libbfd again) to figure out whether they have such an ""__fb_ct.inf"" file or not.
Deletions:
This is accomplished by emitting an extra section called "fbctinf" (FreeBASIC compile time information?) when compiling, and using libbfd at link-time to find out whether object files contain that section, and if so, reading it in. Furthermore, when building a static library, fbc creates an extra object file (called __fb_ct.inf) containing just that fbctinf section and adds it to the library. At link-time fbc looks at each library (using libbfd again) to figure out whether they have such an __fb_ct.inf file or not.


Revision [15033]

The oldest known version of this page was created on 2011-01-08 13:51:30 by DkLwikki [Update]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode