diff --git a/CMakeLists.txt b/CMakeLists.txt
index d8cf0c507d8d34c47eb00152e6b77a7b9d808664..beb4ac671c506f057c4d4fbfb607cfda58d2aeda 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -199,17 +199,17 @@ else()
"${CMAKE_SOURCE_DIR}/deps/lld/wasm/Writer.cpp"
"${CMAKE_SOURCE_DIR}/deps/lld/wasm/WriterUtils.cpp"
)
- add_library(embedded_lld_lib ${EMBEDDED_LLD_LIB_SOURCES})
- add_library(embedded_lld_elf ${EMBEDDED_LLD_ELF_SOURCES})
- add_library(embedded_lld_coff ${EMBEDDED_LLD_COFF_SOURCES})
- add_library(embedded_lld_mingw ${EMBEDDED_LLD_MINGW_SOURCES})
- add_library(embedded_lld_wasm ${EMBEDDED_LLD_WASM_SOURCES})
+ add_library(embedded_lld_lib STATIC ${EMBEDDED_LLD_LIB_SOURCES})
+ add_library(embedded_lld_elf STATIC ${EMBEDDED_LLD_ELF_SOURCES})
+ add_library(embedded_lld_coff STATIC ${EMBEDDED_LLD_COFF_SOURCES})
+ add_library(embedded_lld_mingw STATIC ${EMBEDDED_LLD_MINGW_SOURCES})
+ add_library(embedded_lld_wasm STATIC ${EMBEDDED_LLD_WASM_SOURCES})
if(MSVC)
set(ZIG_LLD_COMPILE_FLAGS "-std=c++11 -D_CRT_SECURE_NO_WARNINGS /w")
else()
set(ZIG_LLD_COMPILE_FLAGS "-std=c++11 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -Wno-comment")
if(MINGW)
- set(ZIG_LLD_COMPILE_FLAGS "${ZIG_LLD_COMPILE_FLAGS} -D__STDC_FORMAT_MACROS -D__USE_MINGW_ANSI_STDIO -Wno-pedantic-ms-format")
+ set(ZIG_LLD_COMPILE_FLAGS "${ZIG_LLD_COMPILE_FLAGS} -D__STDC_FORMAT_MACROS -D__USE_MINGW_ANSI_STDIO")
endif()
endif()
set_target_properties(embedded_lld_lib PROPERTIES
@@ -400,7 +400,7 @@ set(EMBEDDED_SOFTFLOAT_SOURCES
"${CMAKE_SOURCE_DIR}/deps/SoftFloat-3e/source/ui32_to_f128M.c"
"${CMAKE_SOURCE_DIR}/deps/SoftFloat-3e/source/ui64_to_f128M.c"
)
-add_library(embedded_softfloat ${EMBEDDED_SOFTFLOAT_SOURCES})
+add_library(embedded_softfloat STATIC ${EMBEDDED_SOFTFLOAT_SOURCES})
if(MSVC)
set_target_properties(embedded_softfloat PROPERTIES
COMPILE_FLAGS "-std=c99 /w"
@@ -426,7 +426,6 @@ set(ZIG_MAIN_SRC "${CMAKE_SOURCE_DIR}/src/main.cpp")
set(ZIG0_SHIM_SRC "${CMAKE_SOURCE_DIR}/src/userland.cpp")
set(ZIG_SOURCES
- "${CMAKE_SOURCE_DIR}/src/glibc.cpp"
"${CMAKE_SOURCE_DIR}/src/analyze.cpp"
"${CMAKE_SOURCE_DIR}/src/ast_render.cpp"
"${CMAKE_SOURCE_DIR}/src/bigfloat.cpp"
@@ -438,6 +437,7 @@ set(ZIG_SOURCES
"${CMAKE_SOURCE_DIR}/src/compiler.cpp"
"${CMAKE_SOURCE_DIR}/src/errmsg.cpp"
"${CMAKE_SOURCE_DIR}/src/error.cpp"
+ "${CMAKE_SOURCE_DIR}/src/glibc.cpp"
"${CMAKE_SOURCE_DIR}/src/ir.cpp"
"${CMAKE_SOURCE_DIR}/src/ir_print.cpp"
"${CMAKE_SOURCE_DIR}/src/libc_installation.cpp"
@@ -511,19 +511,23 @@ set(OPTIMIZED_C_FLAGS "-std=c99 -O3")
set(EXE_LDFLAGS " ")
if(MSVC)
- set(EXE_LDFLAGS "/STACK:16777216")
+ set(EXE_LDFLAGS "${EXE_LDFLAGS} /STACK:16777216")
elseif(MINGW)
set(EXE_LDFLAGS "${EXE_LDFLAGS} -Wl,--stack,16777216")
endif()
if(ZIG_STATIC)
if(APPLE)
- set(EXE_LDFLAGS "-static-libgcc -static-libstdc++")
+ set(EXE_LDFLAGS "${EXE_LDFLAGS} -static-libgcc -static-libstdc++")
elseif(MINGW)
- set(EXE_LDFLAGS "-static-libgcc -static-libstdc++ -Wl,-Bstatic,--whole-archive -lwinpthread -lz3 -lz -lgomp -Wl,--no-whole-archive")
- else()
- set(EXE_LDFLAGS "-static")
+ set(EXE_LDFLAGS "${EXE_LDFLAGS} -static-libgcc -static-libstdc++ -Wl,-Bstatic, -lwinpthread -lz3 -lz -lgomp")
+ elseif(NOT MSVC)
+ set(EXE_LDFLAGS "${EXE_LDFLAGS} -static")
endif()
+else()
+ if(MINGW)
+ set(EXE_LDFLAGS "${EXE_LDFLAGS} -lz3")
+ endif()
endif()
if(ZIG_TEST_COVERAGE)
@@ -559,11 +563,6 @@ if(NOT MSVC)
target_link_libraries(compiler LINK_PUBLIC ${LIBXML2})
endif()
-if(MINGW)
- find_library(Z3_LIBRARIES NAMES z3 z3.dll)
- target_link_libraries(compiler LINK_PUBLIC ${Z3_LIBRARIES})
-endif()
-
if(ZIG_DIA_GUIDS_LIB)
target_link_libraries(compiler LINK_PUBLIC ${ZIG_DIA_GUIDS_LIB})
endif()
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c19ef4882966d299faa73a8984ed90a3c9369d5f..2ee0e85ccfaeec5806d881108f1324d86060ac20 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -25,6 +25,7 @@ Here are some examples:
* [Iterative Replacement of C with Zig](http://tiehuis.github.io/blog/zig1.html)
* [The Right Tool for the Right Job: Redis Modules & Zig](https://www.youtube.com/watch?v=eCHM8-_poZY)
+ * [Writing a small ray tracer in Rust and Zig](https://nelari.us/post/raytracer_with_rust_and_zig/)
Zig is a brand new language, with no advertising budget. Word of mouth is the
only way people find out about the project, and the more people hear about it,
@@ -45,8 +46,8 @@ The most highly regarded argument in such a discussion is a real world use case.
The issue label
[Contributor Friendly](https://github.com/ziglang/zig/issues?q=is%3Aissue+is%3Aopen+label%3A%22contributor+friendly%22)
-exists to help contributors find issues that are "limited in scope and/or
-knowledge of Zig internals."
+exists to help you find issues that are **limited in scope and/or
+knowledge of Zig internals.**
### Editing Source Code
@@ -61,8 +62,7 @@ To test changes, do the following from the build directory:
1. Run `make install` (on POSIX) or
`msbuild -p:Configuration=Release INSTALL.vcxproj` (on Windows).
-2. `bin/zig build --build-file ../build.zig test` (on POSIX) or
- `bin\zig.exe build --build-file ..\build.zig test` (on Windows).
+2. `bin/zig build test` (on POSIX) or `bin\zig.exe build test` (on Windows).
That runs the whole test suite, which does a lot of extra testing that you
likely won't always need, and can take upwards of 2 hours. This is what the
@@ -79,8 +79,8 @@ Another example is choosing a different set of things to test. For example,
not the other ones. Combining this suggestion with the previous one, you could
do this:
-`bin/zig build --build-file ../build.zig test-std -Dskip-release` (on POSIX) or
-`bin\zig.exe build --build-file ..\build.zig test-std -Dskip-release` (on Windows).
+`bin/zig build test-std -Dskip-release` (on POSIX) or
+`bin\zig.exe build test-std -Dskip-release` (on Windows).
This will run only the standard library tests, in debug mode only, for all
targets (it will cross-compile the tests for non-native targets but not run
diff --git a/README.md b/README.md
index 91178f87de57d3137fef333bcf5c6cc14c15144f..9cf0893da832608c94db6408c3c90a13bb34b2e9 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@

-Zig is an open-source programming language designed for **robustness**,
+A general-purpose programming language designed for **robustness**,
**optimality**, and **maintainability**.
## Resources
@@ -10,6 +10,7 @@ Zig is an open-source programming language designed for **robustness**,
* [Community](https://github.com/ziglang/zig/wiki/Community)
* [Contributing](https://github.com/ziglang/zig/blob/master/CONTRIBUTING.md)
* [Frequently Asked Questions](https://github.com/ziglang/zig/wiki/FAQ)
+ * [Community Projects](https://github.com/ziglang/zig/wiki/Community-Projects)
## Building from Source
diff --git a/build.zig b/build.zig
index 07041d026fddd2c8696789572c31dac03d0aff10..45758d4075371d16aff83a288d253d879fb5c347 100644
--- a/build.zig
+++ b/build.zig
@@ -122,16 +122,19 @@ pub fn build(b: *Builder) !void {
}
const modes = chosen_modes[0..chosen_mode_index];
+ const multi_and_single = [_]bool{ false, true };
+ const just_multi = [_]bool{false};
+
// run stage1 `zig fmt` on this build.zig file just to make sure it works
test_step.dependOn(&fmt_build_zig.step);
const fmt_step = b.step("test-fmt", "Run zig fmt against build.zig to make sure it works");
fmt_step.dependOn(&fmt_build_zig.step);
- test_step.dependOn(tests.addPkgTests(b, test_filter, "test/stage1/behavior.zig", "behavior", "Run the behavior tests", modes, skip_non_native));
+ test_step.dependOn(tests.addPkgTests(b, test_filter, "test/stage1/behavior.zig", "behavior", "Run the behavior tests", modes, multi_and_single, skip_non_native));
- test_step.dependOn(tests.addPkgTests(b, test_filter, "std/std.zig", "std", "Run the standard library tests", modes, skip_non_native));
+ test_step.dependOn(tests.addPkgTests(b, test_filter, "std/std.zig", "std", "Run the standard library tests", modes, multi_and_single, skip_non_native));
- test_step.dependOn(tests.addPkgTests(b, test_filter, "std/special/compiler_rt.zig", "compiler-rt", "Run the compiler_rt tests", modes, skip_non_native));
+ test_step.dependOn(tests.addPkgTests(b, test_filter, "std/special/compiler_rt.zig", "compiler-rt", "Run the compiler_rt tests", modes, just_multi, skip_non_native));
test_step.dependOn(tests.addCompareOutputTests(b, test_filter, modes));
test_step.dependOn(tests.addStandaloneTests(b, test_filter, modes));
@@ -372,7 +375,9 @@ fn addLibUserlandStep(b: *Builder) void {
artifact.bundle_compiler_rt = true;
artifact.setTarget(builtin.arch, builtin.os, builtin.abi);
artifact.linkSystemLibrary("c");
- artifact.linkSystemLibrary("ntdll");
+ if (builtin.os == .windows) {
+ artifact.linkSystemLibrary("ntdll");
+ }
const libuserland_step = b.step("libuserland", "Build the userland compiler library for use in stage1");
libuserland_step.dependOn(&artifact.step);
diff --git a/doc/docgen.zig b/doc/docgen.zig
index bff110449c9e04659b09924342ceceee0deed5dc..458b97d2c04c3ce49c9b07e11cce21c55fa5ce29 100644
--- a/doc/docgen.zig
+++ b/doc/docgen.zig
@@ -742,101 +742,100 @@ fn tokenizeAndPrintRaw(docgen_tokenizer: *Tokenizer, out: var, source_token: Tok
const token = tokenizer.next();
try writeEscaped(out, src[index..token.start]);
switch (token.id) {
- std.zig.Token.Id.Eof => break,
+ .Eof => break,
- std.zig.Token.Id.Keyword_align,
- std.zig.Token.Id.Keyword_and,
- std.zig.Token.Id.Keyword_asm,
- std.zig.Token.Id.Keyword_async,
- std.zig.Token.Id.Keyword_await,
- std.zig.Token.Id.Keyword_break,
- std.zig.Token.Id.Keyword_cancel,
- std.zig.Token.Id.Keyword_catch,
- std.zig.Token.Id.Keyword_comptime,
- std.zig.Token.Id.Keyword_const,
- std.zig.Token.Id.Keyword_continue,
- std.zig.Token.Id.Keyword_defer,
- std.zig.Token.Id.Keyword_else,
- std.zig.Token.Id.Keyword_enum,
- std.zig.Token.Id.Keyword_errdefer,
- std.zig.Token.Id.Keyword_error,
- std.zig.Token.Id.Keyword_export,
- std.zig.Token.Id.Keyword_extern,
- std.zig.Token.Id.Keyword_for,
- std.zig.Token.Id.Keyword_if,
- std.zig.Token.Id.Keyword_inline,
- std.zig.Token.Id.Keyword_nakedcc,
- std.zig.Token.Id.Keyword_noalias,
- std.zig.Token.Id.Keyword_or,
- std.zig.Token.Id.Keyword_orelse,
- std.zig.Token.Id.Keyword_packed,
- std.zig.Token.Id.Keyword_promise,
- std.zig.Token.Id.Keyword_pub,
- std.zig.Token.Id.Keyword_resume,
- std.zig.Token.Id.Keyword_return,
- std.zig.Token.Id.Keyword_linksection,
- std.zig.Token.Id.Keyword_stdcallcc,
- std.zig.Token.Id.Keyword_struct,
- std.zig.Token.Id.Keyword_suspend,
- std.zig.Token.Id.Keyword_switch,
- std.zig.Token.Id.Keyword_test,
- std.zig.Token.Id.Keyword_threadlocal,
- std.zig.Token.Id.Keyword_try,
- std.zig.Token.Id.Keyword_union,
- std.zig.Token.Id.Keyword_unreachable,
- std.zig.Token.Id.Keyword_usingnamespace,
- std.zig.Token.Id.Keyword_var,
- std.zig.Token.Id.Keyword_volatile,
- std.zig.Token.Id.Keyword_allowzero,
- std.zig.Token.Id.Keyword_while,
+ .Keyword_align,
+ .Keyword_and,
+ .Keyword_asm,
+ .Keyword_async,
+ .Keyword_await,
+ .Keyword_break,
+ .Keyword_catch,
+ .Keyword_comptime,
+ .Keyword_const,
+ .Keyword_continue,
+ .Keyword_defer,
+ .Keyword_else,
+ .Keyword_enum,
+ .Keyword_errdefer,
+ .Keyword_error,
+ .Keyword_export,
+ .Keyword_extern,
+ .Keyword_for,
+ .Keyword_if,
+ .Keyword_inline,
+ .Keyword_nakedcc,
+ .Keyword_noalias,
+ .Keyword_or,
+ .Keyword_orelse,
+ .Keyword_packed,
+ .Keyword_anyframe,
+ .Keyword_pub,
+ .Keyword_resume,
+ .Keyword_return,
+ .Keyword_linksection,
+ .Keyword_stdcallcc,
+ .Keyword_struct,
+ .Keyword_suspend,
+ .Keyword_switch,
+ .Keyword_test,
+ .Keyword_threadlocal,
+ .Keyword_try,
+ .Keyword_union,
+ .Keyword_unreachable,
+ .Keyword_usingnamespace,
+ .Keyword_var,
+ .Keyword_volatile,
+ .Keyword_allowzero,
+ .Keyword_while,
=> {
try out.write("");
try writeEscaped(out, src[token.start..token.end]);
try out.write("");
},
- std.zig.Token.Id.Keyword_fn => {
+ .Keyword_fn => {
try out.write("");
try writeEscaped(out, src[token.start..token.end]);
try out.write("");
next_tok_is_fn = true;
},
- std.zig.Token.Id.Keyword_undefined,
- std.zig.Token.Id.Keyword_null,
- std.zig.Token.Id.Keyword_true,
- std.zig.Token.Id.Keyword_false,
+ .Keyword_undefined,
+ .Keyword_null,
+ .Keyword_true,
+ .Keyword_false,
=> {
try out.write("");
try writeEscaped(out, src[token.start..token.end]);
try out.write("");
},
- std.zig.Token.Id.StringLiteral,
- std.zig.Token.Id.MultilineStringLiteralLine,
- std.zig.Token.Id.CharLiteral,
+ .StringLiteral,
+ .MultilineStringLiteralLine,
+ .CharLiteral,
=> {
try out.write("");
try writeEscaped(out, src[token.start..token.end]);
try out.write("");
},
- std.zig.Token.Id.Builtin => {
+ .Builtin => {
try out.write("");
try writeEscaped(out, src[token.start..token.end]);
try out.write("");
},
- std.zig.Token.Id.LineComment,
- std.zig.Token.Id.DocComment,
- std.zig.Token.Id.ShebangLine,
+ .LineComment,
+ .DocComment,
+ .ShebangLine,
=> {
try out.write("");
},
- std.zig.Token.Id.Identifier => {
+ .Identifier => {
if (prev_tok_was_fn) {
try out.write("");
try writeEscaped(out, src[token.start..token.end]);
@@ -864,72 +863,72 @@ fn tokenizeAndPrintRaw(docgen_tokenizer: *Tokenizer, out: var, source_token: Tok
}
},
- std.zig.Token.Id.IntegerLiteral,
- std.zig.Token.Id.FloatLiteral,
+ .IntegerLiteral,
+ .FloatLiteral,
=> {
try out.write("");
try writeEscaped(out, src[token.start..token.end]);
try out.write("");
},
- std.zig.Token.Id.Bang,
- std.zig.Token.Id.Pipe,
- std.zig.Token.Id.PipePipe,
- std.zig.Token.Id.PipeEqual,
- std.zig.Token.Id.Equal,
- std.zig.Token.Id.EqualEqual,
- std.zig.Token.Id.EqualAngleBracketRight,
- std.zig.Token.Id.BangEqual,
- std.zig.Token.Id.LParen,
- std.zig.Token.Id.RParen,
- std.zig.Token.Id.Semicolon,
- std.zig.Token.Id.Percent,
- std.zig.Token.Id.PercentEqual,
- std.zig.Token.Id.LBrace,
- std.zig.Token.Id.RBrace,
- std.zig.Token.Id.LBracket,
- std.zig.Token.Id.RBracket,
- std.zig.Token.Id.Period,
- std.zig.Token.Id.Ellipsis2,
- std.zig.Token.Id.Ellipsis3,
- std.zig.Token.Id.Caret,
- std.zig.Token.Id.CaretEqual,
- std.zig.Token.Id.Plus,
- std.zig.Token.Id.PlusPlus,
- std.zig.Token.Id.PlusEqual,
- std.zig.Token.Id.PlusPercent,
- std.zig.Token.Id.PlusPercentEqual,
- std.zig.Token.Id.Minus,
- std.zig.Token.Id.MinusEqual,
- std.zig.Token.Id.MinusPercent,
- std.zig.Token.Id.MinusPercentEqual,
- std.zig.Token.Id.Asterisk,
- std.zig.Token.Id.AsteriskEqual,
- std.zig.Token.Id.AsteriskAsterisk,
- std.zig.Token.Id.AsteriskPercent,
- std.zig.Token.Id.AsteriskPercentEqual,
- std.zig.Token.Id.Arrow,
- std.zig.Token.Id.Colon,
- std.zig.Token.Id.Slash,
- std.zig.Token.Id.SlashEqual,
- std.zig.Token.Id.Comma,
- std.zig.Token.Id.Ampersand,
- std.zig.Token.Id.AmpersandEqual,
- std.zig.Token.Id.QuestionMark,
- std.zig.Token.Id.AngleBracketLeft,
- std.zig.Token.Id.AngleBracketLeftEqual,
- std.zig.Token.Id.AngleBracketAngleBracketLeft,
- std.zig.Token.Id.AngleBracketAngleBracketLeftEqual,
- std.zig.Token.Id.AngleBracketRight,
- std.zig.Token.Id.AngleBracketRightEqual,
- std.zig.Token.Id.AngleBracketAngleBracketRight,
- std.zig.Token.Id.AngleBracketAngleBracketRightEqual,
- std.zig.Token.Id.Tilde,
- std.zig.Token.Id.BracketStarBracket,
- std.zig.Token.Id.BracketStarCBracket,
+ .Bang,
+ .Pipe,
+ .PipePipe,
+ .PipeEqual,
+ .Equal,
+ .EqualEqual,
+ .EqualAngleBracketRight,
+ .BangEqual,
+ .LParen,
+ .RParen,
+ .Semicolon,
+ .Percent,
+ .PercentEqual,
+ .LBrace,
+ .RBrace,
+ .LBracket,
+ .RBracket,
+ .Period,
+ .Ellipsis2,
+ .Ellipsis3,
+ .Caret,
+ .CaretEqual,
+ .Plus,
+ .PlusPlus,
+ .PlusEqual,
+ .PlusPercent,
+ .PlusPercentEqual,
+ .Minus,
+ .MinusEqual,
+ .MinusPercent,
+ .MinusPercentEqual,
+ .Asterisk,
+ .AsteriskEqual,
+ .AsteriskAsterisk,
+ .AsteriskPercent,
+ .AsteriskPercentEqual,
+ .Arrow,
+ .Colon,
+ .Slash,
+ .SlashEqual,
+ .Comma,
+ .Ampersand,
+ .AmpersandEqual,
+ .QuestionMark,
+ .AngleBracketLeft,
+ .AngleBracketLeftEqual,
+ .AngleBracketAngleBracketLeft,
+ .AngleBracketAngleBracketLeftEqual,
+ .AngleBracketRight,
+ .AngleBracketRightEqual,
+ .AngleBracketAngleBracketRight,
+ .AngleBracketAngleBracketRightEqual,
+ .Tilde,
+ .BracketStarBracket,
+ .BracketStarCBracket,
=> try writeEscaped(out, src[token.start..token.end]),
- std.zig.Token.Id.Invalid => return parseError(
+ .Invalid, .Invalid_ampersands => return parseError(
docgen_tokenizer,
source_token,
"syntax error",
diff --git a/doc/langref.html.in b/doc/langref.html.in
index b5fe464c35d7ad06062503eee9d63b2eaea600b9..2e56bc6557e4c71132d3c7642fe003757dd3e639 100644
--- a/doc/langref.html.in
+++ b/doc/langref.html.in
@@ -5968,155 +5968,90 @@ test "global assembly" {
TODO: @atomic rmw
TODO: builtin atomic memory ordering enum
{#header_close#}
- {#header_open|Coroutines#}
+ {#header_open|Async Functions#}
- A coroutine is a generalization of a function.
+ When a function is called, a frame is pushed to the stack,
+ the function runs until it reaches a return statement, and then the frame is popped from the stack.
+ At the callsite, the following code does not run until the function returns.
- When you call a function, it creates a stack frame,
- and then the function runs until it reaches a return
- statement, and then the stack frame is destroyed.
- At the callsite, the next line of code does not run
- until the function returns.
+ An async function is a function whose callsite is split into an {#syntax#}async{#endsyntax#} initiation,
+ followed by an {#syntax#}await{#endsyntax#} completion. Its frame is
+ provided explicitly by the caller, and it can be suspended and resumed any number of times.
- A coroutine is like a function, but it can be suspended
- and resumed any number of times, and then it must be
- explicitly destroyed. When a coroutine suspends, it
- returns to the resumer.
+ Zig infers that a function is {#syntax#}async{#endsyntax#} when it observes that the function contains
+ a suspension point. Async functions can be called the same as normal functions. A
+ function call of an async function is a suspend point.
- {#header_open|Minimal Coroutine Example#}
-
- Declare a coroutine with the {#syntax#}async{#endsyntax#} keyword.
- The expression in angle brackets must evaluate to a struct
- which has these fields:
-
-
- - {#syntax#}allocFn: fn (self: *Allocator, byte_count: usize, alignment: u29) Error![]u8{#endsyntax#} - where {#syntax#}Error{#endsyntax#} can be any error set.
- - {#syntax#}freeFn: fn (self: *Allocator, old_mem: []u8) void{#endsyntax#}
-
-
- You may notice that this corresponds to the {#syntax#}std.mem.Allocator{#endsyntax#} interface.
- This makes it convenient to integrate with existing allocators. Note, however,
- that the language feature does not depend on the standard library, and any struct which
- has these fields is allowed.
-
-
- Omitting the angle bracket expression when defining an async function makes
- the function generic. Zig will infer the allocator type when the async function is called.
-
-
- Call a coroutine with the {#syntax#}async{#endsyntax#} keyword. Here, the expression in angle brackets
- is a pointer to the allocator struct that the coroutine expects.
-
-
- The result of an async function call is a {#syntax#}promise->T{#endsyntax#} type, where {#syntax#}T{#endsyntax#}
- is the return type of the async function. Once a promise has been created, it must be
- consumed, either with {#syntax#}cancel{#endsyntax#} or {#syntax#}await{#endsyntax#}:
-
-
- Async functions start executing when created, so in the following example, the entire
- async function completes before it is canceled:
-
- {#code_begin|test#}
-const std = @import("std");
-const assert = std.debug.assert;
-
-var x: i32 = 1;
-
-test "create a coroutine and cancel it" {
- const p = try async simpleAsyncFn();
- comptime assert(@typeOf(p) == promise->void);
- cancel p;
- assert(x == 2);
-}
-async<*std.mem.Allocator> fn simpleAsyncFn() void {
- x += 1;
-}
- {#code_end#}
- {#header_close#}
{#header_open|Suspend and Resume#}
- At any point, an async function may suspend itself. This causes control flow to
- return to the caller or resumer. The following code demonstrates where control flow
- goes:
+ At any point, a function may suspend itself. This causes control flow to
+ return to the callsite (in the case of the first suspension),
+ or resumer (in the case of subsequent suspensions).
{#code_begin|test#}
const std = @import("std");
const assert = std.debug.assert;
-test "coroutine suspend, resume, cancel" {
- seq('a');
- const p = try async testAsyncSeq();
- seq('c');
- resume p;
- seq('f');
- cancel p;
- seq('g');
+var x: i32 = 1;
- assert(std.mem.eql(u8, points, "abcdefg"));
+test "suspend with no resume" {
+ var frame = async func();
+ assert(x == 2);
}
-async fn testAsyncSeq() void {
- defer seq('e');
- seq('b');
+fn func() void {
+ x += 1;
suspend;
- seq('d');
-}
-var points = [_]u8{0} ** "abcdefg".len;
-var index: usize = 0;
-
-fn seq(c: u8) void {
- points[index] = c;
- index += 1;
+ // This line is never reached because the suspend has no matching resume.
+ x += 1;
}
{#code_end#}
- When an async function suspends itself, it must be sure that it will be
- resumed or canceled somehow, for example by registering its promise handle
- in an event loop. Use a suspend capture block to gain access to the
- promise:
+ In the same way that each allocation should have a corresponding free,
+ Each {#syntax#}suspend{#endsyntax#} should have a corresponding {#syntax#}resume{#endsyntax#}.
+ A suspend block allows a function to put a pointer to its own
+ frame somewhere, for example into an event loop, even if that action will perform a
+ {#syntax#}resume{#endsyntax#} operation on a different thread.
+ {#link|@frame#} provides access to the async function frame pointer.
{#code_begin|test#}
const std = @import("std");
const assert = std.debug.assert;
-test "coroutine suspend with block" {
- const p = try async testSuspendBlock();
- std.debug.assert(!result);
- resume a_promise;
- std.debug.assert(result);
- cancel p;
-}
-
-var a_promise: promise = undefined;
+var the_frame: anyframe = undefined;
var result = false;
-async fn testSuspendBlock() void {
+
+test "async function suspend with block" {
+ _ = async testSuspendBlock();
+ assert(!result);
+ resume the_frame;
+ assert(result);
+}
+
+fn testSuspendBlock() void {
suspend {
- comptime assert(@typeOf(@handle()) == promise->void);
- a_promise = @handle();
+ comptime assert(@typeOf(@frame()) == *@Frame(testSuspendBlock));
+ the_frame = @frame();
}
result = true;
}
{#code_end#}
- Every suspend point in an async function represents a point at which the coroutine
- could be destroyed. If that happens, {#syntax#}defer{#endsyntax#} expressions that are in
- scope are run, as well as {#syntax#}errdefer{#endsyntax#} expressions.
-
-
- {#link|Await#} counts as a suspend point.
+ {#syntax#}suspend{#endsyntax#} causes a function to be {#syntax#}async{#endsyntax#}.
+
{#header_open|Resuming from Suspend Blocks#}
- Upon entering a {#syntax#}suspend{#endsyntax#} block, the coroutine is already considered
+ Upon entering a {#syntax#}suspend{#endsyntax#} block, the async function is already considered
suspended, and can be resumed. For example, if you started another kernel thread,
- and had that thread call {#syntax#}resume{#endsyntax#} on the promise handle provided by the
- {#syntax#}suspend{#endsyntax#} block, the new thread would begin executing after the suspend
+ and had that thread call {#syntax#}resume{#endsyntax#} on the frame pointer provided by the
+ {#link|@frame#}, the new thread would begin executing after the suspend
block, while the old thread continued executing the suspend block.
- However, the coroutine can be directly resumed from the suspend block, in which case it
+ However, the async function can be directly resumed from the suspend block, in which case it
never returns to its resumer and continues executing.
{#code_begin|test#}
@@ -6124,16 +6059,13 @@ const std = @import("std");
const assert = std.debug.assert;
test "resume from suspend" {
- var buf: [500]u8 = undefined;
- var a = &std.heap.FixedBufferAllocator.init(buf[0..]).allocator;
var my_result: i32 = 1;
- const p = try async testResumeFromSuspend(&my_result);
- cancel p;
+ _ = async testResumeFromSuspend(&my_result);
std.debug.assert(my_result == 2);
}
-async fn testResumeFromSuspend(my_result: *i32) void {
+fn testResumeFromSuspend(my_result: *i32) void {
suspend {
- resume @handle();
+ resume @frame();
}
my_result.* += 1;
suspend;
@@ -6141,61 +6073,88 @@ async fn testResumeFromSuspend(my_result: *i32) void {
}
{#code_end#}
- This is guaranteed to be a tail call, and therefore will not cause a new stack frame.
+ This is guaranteed to tail call, and therefore will not cause a new stack frame.
{#header_close#}
{#header_close#}
- {#header_open|Await#}
+
+ {#header_open|Async and Await#}
+
+ In the same way that every {#syntax#}suspend{#endsyntax#} has a matching
+ {#syntax#}resume{#endsyntax#}, every {#syntax#}async{#endsyntax#} has a matching {#syntax#}await{#endsyntax#}.
+
+ {#code_begin|test#}
+const std = @import("std");
+const assert = std.debug.assert;
+
+test "async and await" {
+ // Here we have an exception where we do not match an async
+ // with an await. The test block is not async and so cannot
+ // have a suspend point in it.
+ // This is well-defined behavior, and everything is OK here.
+ // Note however that there would be no way to collect the
+ // return value of amain, if it were something other than void.
+ _ = async amain();
+}
+
+fn amain() void {
+ var frame = async func();
+ comptime assert(@typeOf(frame) == @Frame(func));
+
+ const ptr: anyframe->void = &frame;
+ const any_ptr: anyframe = ptr;
+
+ resume any_ptr;
+ await ptr;
+}
+
+fn func() void {
+ suspend;
+}
+ {#code_end#}
The {#syntax#}await{#endsyntax#} keyword is used to coordinate with an async function's
- {#syntax#}return{#endsyntax#} statement.
+ {#syntax#}return{#endsyntax#} statement.
- {#syntax#}await{#endsyntax#} is valid only in an {#syntax#}async{#endsyntax#} function, and it takes
- as an operand a promise handle.
- If the async function associated with the promise handle has already returned,
- then {#syntax#}await{#endsyntax#} destroys the target async function, and gives the return value.
- Otherwise, {#syntax#}await{#endsyntax#} suspends the current async function, registering its
- promise handle with the target coroutine. It becomes the target coroutine's responsibility
- to have ensured that it will be resumed or destroyed. When the target coroutine reaches
- its return statement, it gives the return value to the awaiter, destroys itself, and then
- resumes the awaiter.
+ {#syntax#}await{#endsyntax#} is a suspend point, and takes as an operand anything that
+ implicitly casts to {#syntax#}anyframe->T{#endsyntax#}.
- A promise handle must be consumed exactly once after it is created, either by {#syntax#}cancel{#endsyntax#} or {#syntax#}await{#endsyntax#}.
-
-
- {#syntax#}await{#endsyntax#} counts as a suspend point, and therefore at every {#syntax#}await{#endsyntax#},
- a coroutine can be potentially destroyed, which would run {#syntax#}defer{#endsyntax#} and {#syntax#}errdefer{#endsyntax#} expressions.
+ There is a common misconception that {#syntax#}await{#endsyntax#} resumes the target function.
+ It is the other way around: it suspends until the target function completes.
+ In the event that the target function has already completed, {#syntax#}await{#endsyntax#}
+ does not suspend; instead it copies the
+ return value directly from the target function's frame.
{#code_begin|test#}
const std = @import("std");
const assert = std.debug.assert;
-var a_promise: promise = undefined;
+var the_frame: anyframe = undefined;
var final_result: i32 = 0;
-test "coroutine await" {
+test "async function await" {
seq('a');
- const p = async amain() catch unreachable;
+ _ = async amain();
seq('f');
- resume a_promise;
+ resume the_frame;
seq('i');
assert(final_result == 1234);
assert(std.mem.eql(u8, seq_points, "abcdefghi"));
}
-async fn amain() void {
+fn amain() void {
seq('b');
- const p = async another() catch unreachable;
+ var f = async another();
seq('e');
- final_result = await p;
+ final_result = await f;
seq('h');
}
-async fn another() i32 {
+fn another() i32 {
seq('c');
suspend {
seq('d');
- a_promise = @handle();
+ the_frame = @frame();
}
seq('g');
return 1234;
@@ -6211,31 +6170,156 @@ fn seq(c: u8) void {
{#code_end#}
In general, {#syntax#}suspend{#endsyntax#} is lower level than {#syntax#}await{#endsyntax#}. Most application
- code will use only {#syntax#}async{#endsyntax#} and {#syntax#}await{#endsyntax#}, but event loop
- implementations will make use of {#syntax#}suspend{#endsyntax#} internally.
+ code will use only {#syntax#}async{#endsyntax#} and {#syntax#}await{#endsyntax#}, but event loop
+ implementations will make use of {#syntax#}suspend{#endsyntax#} internally.
{#header_close#}
- {#header_open|Open Issues#}
+
+ {#header_open|Async Function Example#}
- There are a few issues with coroutines that are considered unresolved. Best be aware of them,
- as the situation is likely to change before 1.0.0:
+ Putting all of this together, here is an example of typical
+ {#syntax#}async{#endsyntax#}/{#syntax#}await{#endsyntax#} usage:
+
+ {#code_begin|exe|async#}
+const std = @import("std");
+const Allocator = std.mem.Allocator;
+
+pub fn main() void {
+ _ = async amainWrap();
+
+ // Typically we would use an event loop to manage resuming async functions,
+ // but in this example we hard code what the event loop would do,
+ // to make things deterministic.
+ resume global_file_frame;
+ resume global_download_frame;
+}
+
+fn amainWrap() void {
+ amain() catch |e| {
+ std.debug.warn("{}\n", e);
+ if (@errorReturnTrace()) |trace| {
+ std.debug.dumpStackTrace(trace.*);
+ }
+ std.process.exit(1);
+ };
+}
+
+fn amain() !void {
+ const allocator = std.heap.direct_allocator;
+ var download_frame = async fetchUrl(allocator, "https://example.com/");
+ var awaited_download_frame = false;
+ errdefer if (!awaited_download_frame) {
+ if (await download_frame) |r| allocator.free(r) else |_| {}
+ };
+
+ var file_frame = async readFile(allocator, "something.txt");
+ var awaited_file_frame = false;
+ errdefer if (!awaited_file_frame) {
+ if (await file_frame) |r| allocator.free(r) else |_| {}
+ };
+
+ awaited_file_frame = true;
+ const file_text = try await file_frame;
+ defer allocator.free(file_text);
+
+ awaited_download_frame = true;
+ const download_text = try await download_frame;
+ defer allocator.free(download_text);
+
+ std.debug.warn("download_text: {}\n", download_text);
+ std.debug.warn("file_text: {}\n", file_text);
+}
+
+var global_download_frame: anyframe = undefined;
+fn fetchUrl(allocator: *Allocator, url: []const u8) ![]u8 {
+ const result = try std.mem.dupe(allocator, u8, "this is the downloaded url contents");
+ errdefer allocator.free(result);
+ suspend {
+ global_download_frame = @frame();
+ }
+ std.debug.warn("fetchUrl returning\n");
+ return result;
+}
+
+var global_file_frame: anyframe = undefined;
+fn readFile(allocator: *Allocator, filename: []const u8) ![]u8 {
+ const result = try std.mem.dupe(allocator, u8, "this is the file contents");
+ errdefer allocator.free(result);
+ suspend {
+ global_file_frame = @frame();
+ }
+ std.debug.warn("readFile returning\n");
+ return result;
+}
+ {#code_end#}
+
+ Now we remove the {#syntax#}suspend{#endsyntax#} and {#syntax#}resume{#endsyntax#} code, and
+ observe the same behavior, with one tiny difference:
+
+ {#code_begin|exe|blocking#}
+const std = @import("std");
+const Allocator = std.mem.Allocator;
+
+pub fn main() void {
+ _ = async amainWrap();
+}
+
+fn amainWrap() void {
+ amain() catch |e| {
+ std.debug.warn("{}\n", e);
+ if (@errorReturnTrace()) |trace| {
+ std.debug.dumpStackTrace(trace.*);
+ }
+ std.process.exit(1);
+ };
+}
+
+fn amain() !void {
+ const allocator = std.heap.direct_allocator;
+ var download_frame = async fetchUrl(allocator, "https://example.com/");
+ var awaited_download_frame = false;
+ errdefer if (!awaited_download_frame) {
+ if (await download_frame) |r| allocator.free(r) else |_| {}
+ };
+
+ var file_frame = async readFile(allocator, "something.txt");
+ var awaited_file_frame = false;
+ errdefer if (!awaited_file_frame) {
+ if (await file_frame) |r| allocator.free(r) else |_| {}
+ };
+
+ awaited_file_frame = true;
+ const file_text = try await file_frame;
+ defer allocator.free(file_text);
+
+ awaited_download_frame = true;
+ const download_text = try await download_frame;
+ defer allocator.free(download_text);
+
+ std.debug.warn("download_text: {}\n", download_text);
+ std.debug.warn("file_text: {}\n", file_text);
+}
+
+fn fetchUrl(allocator: *Allocator, url: []const u8) ![]u8 {
+ const result = try std.mem.dupe(allocator, u8, "this is the downloaded url contents");
+ errdefer allocator.free(result);
+ std.debug.warn("fetchUrl returning\n");
+ return result;
+}
+
+fn readFile(allocator: *Allocator, filename: []const u8) ![]u8 {
+ const result = try std.mem.dupe(allocator, u8, "this is the file contents");
+ errdefer allocator.free(result);
+ std.debug.warn("readFile returning\n");
+ return result;
+}
+ {#code_end#}
+
+ Previously, the {#syntax#}fetchUrl{#endsyntax#} and {#syntax#}readFile{#endsyntax#} functions suspended,
+ and were resumed in an order determined by the {#syntax#}main{#endsyntax#} function. Now,
+ since there are no suspend points, the order of the printed "... returning" messages
+ is determined by the order of {#syntax#}async{#endsyntax#} callsites.
-
- - Async functions have optimizations disabled - even in release modes - due to an
- LLVM bug.
-
- -
- There are some situations where we can know statically that there will not be
- memory allocation failure, but Zig still forces us to handle it.
- TODO file an issue for this and link it here.
-
- -
- Zig does not take advantage of LLVM's allocation elision optimization for
- coroutines. It crashed LLVM when I tried to do it the first time. This is
- related to the other 2 bullet points here. See
- #802.
-
-
{#header_close#}
{#header_close#}
@@ -6293,6 +6377,49 @@ comptime {
Note: This function is deprecated. Use {#link|@typeInfo#} instead.
{#header_close#}
+
+ {#header_open|@asyncCall#}
+ {#syntax#}@asyncCall(frame_buffer: []u8, result_ptr, function_ptr, args: ...) anyframe->T{#endsyntax#}
+
+ {#syntax#}@asyncCall{#endsyntax#} performs an {#syntax#}async{#endsyntax#} call on a function pointer,
+ which may or may not be an {#link|async function|Async Functions#}.
+
+
+ The provided {#syntax#}frame_buffer{#endsyntax#} must be large enough to fit the entire function frame.
+ This size can be determined with {#link|@frameSize#}. To provide a too-small buffer
+ invokes safety-checked {#link|Undefined Behavior#}.
+
+
+ {#syntax#}result_ptr{#endsyntax#} is optional ({#link|null#} may be provided). If provided,
+ the function call will write its result directly to the result pointer, which will be available to
+ read after {#link|await|Async and Await#} completes. Any result location provided to
+ {#syntax#}await{#endsyntax#} will copy the result from {#syntax#}result_ptr{#endsyntax#}.
+
+ {#code_begin|test#}
+const std = @import("std");
+const assert = std.debug.assert;
+
+test "async fn pointer in a struct field" {
+ var data: i32 = 1;
+ const Foo = struct {
+ bar: async fn (*i32) void,
+ };
+ var foo = Foo{ .bar = func };
+ var bytes: [64]u8 = undefined;
+ const f = @asyncCall(&bytes, {}, foo.bar, &data);
+ assert(data == 2);
+ resume f;
+ assert(data == 4);
+}
+
+async fn func(y: *i32) void {
+ defer y.* += 2;
+ y.* += 1;
+ suspend;
+}
+ {#code_end#}
+ {#header_close#}
+
{#header_open|@atomicLoad#}
{#syntax#}@atomicLoad(comptime T: type, ptr: *const T, comptime ordering: builtin.AtomicOrder) T{#endsyntax#}
@@ -6330,6 +6457,22 @@ comptime {
TODO right now bool is not accepted. Also I think we could make non powers of 2 work fine, maybe
we can remove this restriction
+
+ Supported operations:
+
+
+ - {#syntax#}.Xchg{#endsyntax#} - stores the operand unmodified.
+ - {#syntax#}.Add{#endsyntax#} - for integers, twos complement wraparound addition.
+ Also supports {#link|Floats#}.
+ - {#syntax#}.Sub{#endsyntax#} - for integers, twos complement wraparound subtraction.
+ Also supports {#link|Floats#}.
+ - {#syntax#}.And{#endsyntax#} - bitwise and
+ - {#syntax#}.Nand{#endsyntax#} - bitwise nand
+ - {#syntax#}.Or{#endsyntax#} - bitwise or
+ - {#syntax#}.Xor{#endsyntax#} - bitwise xor
+ - {#syntax#}.Max{#endsyntax#} - stores the operand if it is larger. Supports integers and floats.
+ - {#syntax#}.Min{#endsyntax#} - stores the operand if it is smaller. Supports integers and floats.
+
{#header_close#}
{#header_open|@bitCast#}
{#syntax#}@bitCast(comptime DestType: type, value: var) DestType{#endsyntax#}
@@ -6867,6 +7010,44 @@ export fn @"A function name that is a complete sentence."() void {}
{#see_also|@intToFloat#}
{#header_close#}
+ {#header_open|@frame#}
+ {#syntax#}@frame() *@Frame(func){#endsyntax#}
+
+ This function returns a pointer to the frame for a given function. This type
+ can be {#link|implicitly cast|Implicit Casts#} to {#syntax#}anyframe->T{#endsyntax#} and
+ to {#syntax#}anyframe{#endsyntax#}, where {#syntax#}T{#endsyntax#} is the return type
+ of the function in scope.
+
+
+ This function does not mark a suspension point, but it does cause the function in scope
+ to become an {#link|async function|Async Functions#}.
+
+ {#header_close#}
+
+ {#header_open|@Frame#}
+ {#syntax#}@Frame(func: var) type{#endsyntax#}
+
+ This function returns the frame type of a function. This works for {#link|Async Functions#}
+ as well as any function without a specific calling convention.
+
+
+ This type is suitable to be used as the return type of {#link|async|Async and Await#} which
+ allows one to, for example, heap-allocate an async function frame:
+
+ {#code_begin|test#}
+const std = @import("std");
+
+test "heap allocated frame" {
+ const frame = try std.heap.direct_allocator.create(@Frame(func));
+ frame.* = async func();
+}
+
+fn func() void {
+ suspend;
+}
+ {#code_end#}
+ {#header_close#}
+
{#header_open|@frameAddress#}
{#syntax#}@frameAddress() usize{#endsyntax#}
@@ -6882,14 +7063,14 @@ export fn @"A function name that is a complete sentence."() void {}
{#header_close#}
- {#header_open|@handle#}
- {#syntax#}@handle(){#endsyntax#}
+ {#header_open|@frameSize#}
+ {#syntax#}@frameSize() usize{#endsyntax#}
- This function returns a {#syntax#}promise->T{#endsyntax#} type, where {#syntax#}T{#endsyntax#}
- is the return type of the async function in scope.
+ This is the same as {#syntax#}@sizeOf(@Frame(func)){#endsyntax#}, where {#syntax#}func{#endsyntax#}
+ may be runtime-known.
- This function is only valid within an async function scope.
+ This function is typically used in conjunction with {#link|@asyncCall#}.
{#header_close#}
@@ -8029,8 +8210,7 @@ pub fn build(b: *Builder) void {
Zig has a compile option --single-threaded which has the following effects:
- All {#link|Thread Local Variables#} are treated as {#link|Global Variables#}.
- - The overhead of {#link|Coroutines#} becomes equivalent to function call overhead.
- TODO: please note this will not be implemented until the upcoming Coroutine Rewrite
+ - The overhead of {#link|Async Functions#} becomes equivalent to function call overhead.
- The {#syntax#}@import("builtin").single_threaded{#endsyntax#} becomes {#syntax#}true{#endsyntax#}
and therefore various userland APIs which read this variable become more efficient.
For example {#syntax#}std.Mutex{#endsyntax#} becomes
@@ -9777,7 +9957,6 @@ PrimaryExpr
<- AsmExpr
/ IfExpr
/ KEYWORD_break BreakLabel? Expr?
- / KEYWORD_cancel Expr
/ KEYWORD_comptime Expr
/ KEYWORD_continue BreakLabel?
/ KEYWORD_resume Expr
@@ -9808,7 +9987,7 @@ TypeExpr <- PrefixTypeOp* ErrorUnionExpr
ErrorUnionExpr <- SuffixExpr (EXCLAMATIONMARK TypeExpr)?
SuffixExpr
- <- AsyncPrefix PrimaryTypeExpr SuffixOp* FnCallArguments
+ <- KEYWORD_async PrimaryTypeExpr SuffixOp* FnCallArguments
/ PrimaryTypeExpr (SuffixOp / FnCallArguments)*
PrimaryTypeExpr
@@ -9884,7 +10063,7 @@ FnCC
<- KEYWORD_nakedcc
/ KEYWORD_stdcallcc
/ KEYWORD_extern
- / KEYWORD_async (LARROW TypeExpr RARROW)?
+ / KEYWORD_async
ParamDecl <- (KEYWORD_noalias / KEYWORD_comptime)? (IDENTIFIER COLON)? ParamType
@@ -9989,8 +10168,6 @@ SuffixOp
/ DOTASTERISK
/ DOTQUESTIONMARK
-AsyncPrefix <- KEYWORD_async (LARROW PrefixExpr RARROW)?
-
FnCallArguments <- LPAREN ExprList RPAREN
# Ptr specific
@@ -10133,7 +10310,6 @@ KEYWORD_asm <- 'asm' end_of_word
KEYWORD_async <- 'async' end_of_word
KEYWORD_await <- 'await' end_of_word
KEYWORD_break <- 'break' end_of_word
-KEYWORD_cancel <- 'cancel' end_of_word
KEYWORD_catch <- 'catch' end_of_word
KEYWORD_comptime <- 'comptime' end_of_word
KEYWORD_const <- 'const' end_of_word
@@ -10178,7 +10354,7 @@ KEYWORD_volatile <- 'volatile' end_of_word
KEYWORD_while <- 'while' end_of_word
keyword <- KEYWORD_align / KEYWORD_and / KEYWORD_allowzero / KEYWORD_asm
- / KEYWORD_async / KEYWORD_await / KEYWORD_break / KEYWORD_cancel
+ / KEYWORD_async / KEYWORD_await / KEYWORD_break
/ KEYWORD_catch / KEYWORD_comptime / KEYWORD_const / KEYWORD_continue
/ KEYWORD_defer / KEYWORD_else / KEYWORD_enum / KEYWORD_errdefer
/ KEYWORD_error / KEYWORD_export / KEYWORD_extern / KEYWORD_false
diff --git a/lib/libc/include/aarch64-linux-musl/bits/endian.h b/lib/libc/include/aarch64-linux-musl/bits/endian.h
new file mode 100644
index 0000000000000000000000000000000000000000..3ab24cc932287bfdb8170b6cda4f5f75b15c460b
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-musl/bits/endian.h
@@ -0,0 +1,5 @@
+#if __AARCH64EB__
+#define __BYTE_ORDER __BIG_ENDIAN
+#else
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musl/bits/fcntl.h b/lib/libc/include/aarch64-linux-musl/bits/fcntl.h
new file mode 100644
index 0000000000000000000000000000000000000000..e209ece38a2b94c9ee9198a6fb852210e71aac0f
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-musl/bits/fcntl.h
@@ -0,0 +1,38 @@
+#define O_CREAT 0100
+#define O_EXCL 0200
+#define O_NOCTTY 0400
+#define O_TRUNC 01000
+#define O_APPEND 02000
+#define O_NONBLOCK 04000
+#define O_DSYNC 010000
+#define O_SYNC 04010000
+#define O_RSYNC 04010000
+#define O_DIRECTORY 040000
+#define O_NOFOLLOW 0100000
+#define O_CLOEXEC 02000000
+
+#define O_ASYNC 020000
+#define O_DIRECT 0200000
+#define O_LARGEFILE 0400000
+#define O_NOATIME 01000000
+#define O_PATH 010000000
+#define O_TMPFILE 020040000
+#define O_NDELAY O_NONBLOCK
+
+#define F_DUPFD 0
+#define F_GETFD 1
+#define F_SETFD 2
+#define F_GETFL 3
+#define F_SETFL 4
+#define F_GETLK 5
+#define F_SETLK 6
+#define F_SETLKW 7
+#define F_SETOWN 8
+#define F_GETOWN 9
+#define F_SETSIG 10
+#define F_GETSIG 11
+
+#define F_SETOWN_EX 15
+#define F_GETOWN_EX 16
+
+#define F_GETOWNER_UIDS 17
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musl/bits/fenv.h b/lib/libc/include/aarch64-linux-musl/bits/fenv.h
new file mode 100644
index 0000000000000000000000000000000000000000..f2de6e6a172a512b9d434e8bfb6dba3c8baf5a20
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-musl/bits/fenv.h
@@ -0,0 +1,19 @@
+#define FE_INVALID 1
+#define FE_DIVBYZERO 2
+#define FE_OVERFLOW 4
+#define FE_UNDERFLOW 8
+#define FE_INEXACT 16
+#define FE_ALL_EXCEPT 31
+#define FE_TONEAREST 0
+#define FE_DOWNWARD 0x800000
+#define FE_UPWARD 0x400000
+#define FE_TOWARDZERO 0xc00000
+
+typedef unsigned int fexcept_t;
+
+typedef struct {
+ unsigned int __fpcr;
+ unsigned int __fpsr;
+} fenv_t;
+
+#define FE_DFL_ENV ((const fenv_t *) -1)
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musl/bits/float.h b/lib/libc/include/aarch64-linux-musl/bits/float.h
new file mode 100644
index 0000000000000000000000000000000000000000..f8cb54bb3f6a45c2a01b746263391dfed5b7434a
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-musl/bits/float.h
@@ -0,0 +1,16 @@
+#define FLT_EVAL_METHOD 0
+
+#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L
+#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L
+#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L
+#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L
+
+#define LDBL_MANT_DIG 113
+#define LDBL_MIN_EXP (-16381)
+#define LDBL_MAX_EXP 16384
+
+#define LDBL_DIG 33
+#define LDBL_MIN_10_EXP (-4931)
+#define LDBL_MAX_10_EXP 4932
+
+#define DECIMAL_DIG 36
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musl/bits/hwcap.h b/lib/libc/include/aarch64-linux-musl/bits/hwcap.h
new file mode 100644
index 0000000000000000000000000000000000000000..3f1b9de3b790250573d94c00e75a3887024282fa
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-musl/bits/hwcap.h
@@ -0,0 +1,32 @@
+#define HWCAP_FP (1 << 0)
+#define HWCAP_ASIMD (1 << 1)
+#define HWCAP_EVTSTRM (1 << 2)
+#define HWCAP_AES (1 << 3)
+#define HWCAP_PMULL (1 << 4)
+#define HWCAP_SHA1 (1 << 5)
+#define HWCAP_SHA2 (1 << 6)
+#define HWCAP_CRC32 (1 << 7)
+#define HWCAP_ATOMICS (1 << 8)
+#define HWCAP_FPHP (1 << 9)
+#define HWCAP_ASIMDHP (1 << 10)
+#define HWCAP_CPUID (1 << 11)
+#define HWCAP_ASIMDRDM (1 << 12)
+#define HWCAP_JSCVT (1 << 13)
+#define HWCAP_FCMA (1 << 14)
+#define HWCAP_LRCPC (1 << 15)
+#define HWCAP_DCPOP (1 << 16)
+#define HWCAP_SHA3 (1 << 17)
+#define HWCAP_SM3 (1 << 18)
+#define HWCAP_SM4 (1 << 19)
+#define HWCAP_ASIMDDP (1 << 20)
+#define HWCAP_SHA512 (1 << 21)
+#define HWCAP_SVE (1 << 22)
+#define HWCAP_ASIMDFHM (1 << 23)
+#define HWCAP_DIT (1 << 24)
+#define HWCAP_USCAT (1 << 25)
+#define HWCAP_ILRCPC (1 << 26)
+#define HWCAP_FLAGM (1 << 27)
+#define HWCAP_SSBS (1 << 28)
+#define HWCAP_SB (1 << 29)
+#define HWCAP_PACA (1 << 30)
+#define HWCAP_PACG (1UL << 31)
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musl/bits/ipc.h b/lib/libc/include/aarch64-linux-musl/bits/ipc.h
new file mode 100644
index 0000000000000000000000000000000000000000..37561db60d0f64fc428b4f407ade6cbcc61335cb
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-musl/bits/ipc.h
@@ -0,0 +1,14 @@
+struct ipc_perm {
+ key_t __ipc_perm_key;
+ uid_t uid;
+ gid_t gid;
+ uid_t cuid;
+ gid_t cgid;
+ mode_t mode;
+ unsigned short __ipc_perm_seq;
+
+ unsigned long __pad1;
+ unsigned long __pad2;
+};
+
+#define IPC_64 0
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musl/bits/limits.h b/lib/libc/include/aarch64-linux-musl/bits/limits.h
new file mode 100644
index 0000000000000000000000000000000000000000..1be0deba7abfc5619657e0b90912d054efc53313
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-musl/bits/limits.h
@@ -0,0 +1,7 @@
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define LONG_BIT 64
+#endif
+
+#define LONG_MAX 0x7fffffffffffffffL
+#define LLONG_MAX 0x7fffffffffffffffLL
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musl/bits/posix.h b/lib/libc/include/aarch64-linux-musl/bits/posix.h
new file mode 100644
index 0000000000000000000000000000000000000000..9fcc205cc1a80473edac8d9d2563ca7452bcdb79
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-musl/bits/posix.h
@@ -0,0 +1,2 @@
+#define _POSIX_V6_LP64_OFF64 1
+#define _POSIX_V7_LP64_OFF64 1
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musl/bits/reg.h b/lib/libc/include/aarch64-linux-musl/bits/reg.h
new file mode 100644
index 0000000000000000000000000000000000000000..0afb6bd06c1405a0f6f9b6e1833b9850d5b4aa04
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-musl/bits/reg.h
@@ -0,0 +1,2 @@
+#undef __WORDSIZE
+#define __WORDSIZE 64
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musl/bits/sem.h b/lib/libc/include/aarch64-linux-musl/bits/sem.h
new file mode 100644
index 0000000000000000000000000000000000000000..bf8e59f52ed0d501680b71f484cfeb2575bb80a5
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-musl/bits/sem.h
@@ -0,0 +1,14 @@
+struct semid_ds {
+ struct ipc_perm sem_perm;
+ time_t sem_otime;
+ time_t sem_ctime;
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ unsigned short sem_nsems;
+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
+#else
+ char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
+ unsigned short sem_nsems;
+#endif
+ time_t __unused3;
+ time_t __unused4;
+};
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musl/bits/setjmp.h b/lib/libc/include/aarch64-linux-musl/bits/setjmp.h
new file mode 100644
index 0000000000000000000000000000000000000000..d97fd2d084767b118aa710f702cce8ca550fdc58
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-musl/bits/setjmp.h
@@ -0,0 +1 @@
+typedef unsigned long __jmp_buf[22];
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musl/bits/signal.h b/lib/libc/include/aarch64-linux-musl/bits/signal.h
new file mode 100644
index 0000000000000000000000000000000000000000..cd13558bad38fd85c16fcf69ed26792fafad37a5
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-musl/bits/signal.h
@@ -0,0 +1,153 @@
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define MINSIGSTKSZ 6144
+#define SIGSTKSZ 12288
+#endif
+
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+typedef unsigned long greg_t;
+typedef unsigned long gregset_t[34];
+
+typedef struct {
+ long double vregs[32];
+ unsigned int fpsr;
+ unsigned int fpcr;
+} fpregset_t;
+typedef struct sigcontext {
+ unsigned long fault_address;
+ unsigned long regs[31];
+ unsigned long sp, pc, pstate;
+ long double __reserved[256];
+} mcontext_t;
+
+#define FPSIMD_MAGIC 0x46508001
+#define ESR_MAGIC 0x45535201
+#define EXTRA_MAGIC 0x45585401
+#define SVE_MAGIC 0x53564501
+struct _aarch64_ctx {
+ unsigned int magic;
+ unsigned int size;
+};
+struct fpsimd_context {
+ struct _aarch64_ctx head;
+ unsigned int fpsr;
+ unsigned int fpcr;
+ long double vregs[32];
+};
+struct esr_context {
+ struct _aarch64_ctx head;
+ unsigned long esr;
+};
+struct extra_context {
+ struct _aarch64_ctx head;
+ unsigned long datap;
+ unsigned int size;
+ unsigned int __reserved[3];
+};
+struct sve_context {
+ struct _aarch64_ctx head;
+ unsigned short vl;
+ unsigned short __reserved[3];
+};
+#define SVE_VQ_BYTES 16
+#define SVE_VQ_MIN 1
+#define SVE_VQ_MAX 512
+#define SVE_VL_MIN (SVE_VQ_MIN * SVE_VQ_BYTES)
+#define SVE_VL_MAX (SVE_VQ_MAX * SVE_VQ_BYTES)
+#define SVE_NUM_ZREGS 32
+#define SVE_NUM_PREGS 16
+#define sve_vl_valid(vl) \
+ ((vl) % SVE_VQ_BYTES == 0 && (vl) >= SVE_VL_MIN && (vl) <= SVE_VL_MAX)
+#define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES)
+#define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES)
+#define SVE_SIG_ZREG_SIZE(vq) ((unsigned)(vq) * SVE_VQ_BYTES)
+#define SVE_SIG_PREG_SIZE(vq) ((unsigned)(vq) * (SVE_VQ_BYTES / 8))
+#define SVE_SIG_FFR_SIZE(vq) SVE_SIG_PREG_SIZE(vq)
+#define SVE_SIG_REGS_OFFSET \
+ ((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \
+ / SVE_VQ_BYTES * SVE_VQ_BYTES)
+#define SVE_SIG_ZREGS_OFFSET SVE_SIG_REGS_OFFSET
+#define SVE_SIG_ZREG_OFFSET(vq, n) \
+ (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREG_SIZE(vq) * (n))
+#define SVE_SIG_ZREGS_SIZE(vq) \
+ (SVE_SIG_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_SIG_ZREGS_OFFSET)
+#define SVE_SIG_PREGS_OFFSET(vq) \
+ (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREGS_SIZE(vq))
+#define SVE_SIG_PREG_OFFSET(vq, n) \
+ (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREG_SIZE(vq) * (n))
+#define SVE_SIG_PREGS_SIZE(vq) \
+ (SVE_SIG_PREG_OFFSET(vq, SVE_NUM_PREGS) - SVE_SIG_PREGS_OFFSET(vq))
+#define SVE_SIG_FFR_OFFSET(vq) \
+ (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREGS_SIZE(vq))
+#define SVE_SIG_REGS_SIZE(vq) \
+ (SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET)
+#define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq))
+#else
+typedef struct {
+ long double __regs[18+256];
+} mcontext_t;
+#endif
+
+struct sigaltstack {
+ void *ss_sp;
+ int ss_flags;
+ size_t ss_size;
+};
+
+typedef struct __ucontext {
+ unsigned long uc_flags;
+ struct __ucontext *uc_link;
+ stack_t uc_stack;
+ sigset_t uc_sigmask;
+ mcontext_t uc_mcontext;
+} ucontext_t;
+
+#define SA_NOCLDSTOP 1
+#define SA_NOCLDWAIT 2
+#define SA_SIGINFO 4
+#define SA_ONSTACK 0x08000000
+#define SA_RESTART 0x10000000
+#define SA_NODEFER 0x40000000
+#define SA_RESETHAND 0x80000000
+#define SA_RESTORER 0x04000000
+
+#endif
+
+#define SIGHUP 1
+#define SIGINT 2
+#define SIGQUIT 3
+#define SIGILL 4
+#define SIGTRAP 5
+#define SIGABRT 6
+#define SIGIOT SIGABRT
+#define SIGBUS 7
+#define SIGFPE 8
+#define SIGKILL 9
+#define SIGUSR1 10
+#define SIGSEGV 11
+#define SIGUSR2 12
+#define SIGPIPE 13
+#define SIGALRM 14
+#define SIGTERM 15
+#define SIGSTKFLT 16
+#define SIGCHLD 17
+#define SIGCONT 18
+#define SIGSTOP 19
+#define SIGTSTP 20
+#define SIGTTIN 21
+#define SIGTTOU 22
+#define SIGURG 23
+#define SIGXCPU 24
+#define SIGXFSZ 25
+#define SIGVTALRM 26
+#define SIGPROF 27
+#define SIGWINCH 28
+#define SIGIO 29
+#define SIGPOLL 29
+#define SIGPWR 30
+#define SIGSYS 31
+#define SIGUNUSED SIGSYS
+
+#define _NSIG 65
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musl/bits/socket.h b/lib/libc/include/aarch64-linux-musl/bits/socket.h
new file mode 100644
index 0000000000000000000000000000000000000000..b4e9fb6a1cd407ada73476d64b2a6c33ab649a9a
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-musl/bits/socket.h
@@ -0,0 +1,33 @@
+#include
+
+struct msghdr {
+ void *msg_name;
+ socklen_t msg_namelen;
+ struct iovec *msg_iov;
+#if __BYTE_ORDER == __BIG_ENDIAN
+ int __pad1, msg_iovlen;
+#else
+ int msg_iovlen, __pad1;
+#endif
+ void *msg_control;
+#if __BYTE_ORDER == __BIG_ENDIAN
+ int __pad2;
+ socklen_t msg_controllen;
+#else
+ socklen_t msg_controllen;
+ int __pad2;
+#endif
+ int msg_flags;
+};
+
+struct cmsghdr {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ int __pad1;
+ socklen_t cmsg_len;
+#else
+ socklen_t cmsg_len;
+ int __pad1;
+#endif
+ int cmsg_level;
+ int cmsg_type;
+};
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musl/bits/stat.h b/lib/libc/include/aarch64-linux-musl/bits/stat.h
new file mode 100644
index 0000000000000000000000000000000000000000..6ce9af119f2ec29b2820bb8c8084a117b7605261
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-musl/bits/stat.h
@@ -0,0 +1,18 @@
+struct stat {
+ dev_t st_dev;
+ ino_t st_ino;
+ mode_t st_mode;
+ nlink_t st_nlink;
+ uid_t st_uid;
+ gid_t st_gid;
+ dev_t st_rdev;
+ unsigned long __pad;
+ off_t st_size;
+ blksize_t st_blksize;
+ int __pad2;
+ blkcnt_t st_blocks;
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
+ unsigned __unused[2];
+};
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musl/bits/user.h b/lib/libc/include/aarch64-linux-musl/bits/user.h
new file mode 100644
index 0000000000000000000000000000000000000000..2bd9dd5863c38e6fd0e8fea73f71e049972b975a
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-musl/bits/user.h
@@ -0,0 +1,16 @@
+struct user_regs_struct {
+ unsigned long long regs[31];
+ unsigned long long sp;
+ unsigned long long pc;
+ unsigned long long pstate;
+};
+
+struct user_fpsimd_struct {
+ long double vregs[32];
+ unsigned int fpsr;
+ unsigned int fpcr;
+};
+
+#define ELF_NREG 34
+typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NREG];
+typedef struct user_fpsimd_struct elf_fpregset_t;
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bfd_stdint.h b/lib/libc/include/aarch64-linux-musleabi/bfd_stdint.h
deleted file mode 100644
index 65de6d24a2ea7cb1c08e96bcaa4b5d905aad6359..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bfd_stdint.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* generated for aarch64-linux-musleabi-gcc (GCC) 8.3.0 */
-
-#ifndef GCC_GENERATED_STDINT_H
-#define GCC_GENERATED_STDINT_H 1
-
-#include
-#include
-/* glibc uses these symbols as guards to prevent redefinitions. */
-#ifdef __int8_t_defined
-#define _INT8_T
-#define _INT16_T
-#define _INT32_T
-#endif
-#ifdef __uint32_t_defined
-#define _UINT32_T
-#endif
-
-
-/* Some systems have guard macros to prevent redefinitions, define them. */
-#ifndef _INT8_T
-#define _INT8_T
-#endif
-#ifndef _INT16_T
-#define _INT16_T
-#endif
-#ifndef _INT32_T
-#define _INT32_T
-#endif
-#ifndef _UINT8_T
-#define _UINT8_T
-#endif
-#ifndef _UINT16_T
-#define _UINT16_T
-#endif
-#ifndef _UINT32_T
-#define _UINT32_T
-#endif
-
-/* system headers have good uint64_t and int64_t */
-#ifndef _INT64_T
-#define _INT64_T
-#endif
-#ifndef _UINT64_T
-#define _UINT64_T
-#endif
-
-#endif /* GCC_GENERATED_STDINT_H */
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/alltypes.h b/lib/libc/include/aarch64-linux-musleabi/bits/alltypes.h
deleted file mode 100644
index d4e904acb7d3e9ad65af48b4c2e0f2379c344870..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/alltypes.h
+++ /dev/null
@@ -1,401 +0,0 @@
-#define _Addr long
-#define _Int64 long
-#define _Reg long
-
-#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
-typedef __builtin_va_list va_list;
-#define __DEFINED_va_list
-#endif
-
-#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
-typedef __builtin_va_list __isoc_va_list;
-#define __DEFINED___isoc_va_list
-#endif
-
-
-#ifndef __cplusplus
-#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
-typedef unsigned wchar_t;
-#define __DEFINED_wchar_t
-#endif
-
-#endif
-#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
-typedef unsigned wint_t;
-#define __DEFINED_wint_t
-#endif
-
-
-#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
-typedef int blksize_t;
-#define __DEFINED_blksize_t
-#endif
-
-#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
-typedef unsigned int nlink_t;
-#define __DEFINED_nlink_t
-#endif
-
-
-#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
-typedef float float_t;
-#define __DEFINED_float_t
-#endif
-
-#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
-typedef double double_t;
-#define __DEFINED_double_t
-#endif
-
-
-#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
-typedef struct { long long __ll; long double __ld; } max_align_t;
-#define __DEFINED_max_align_t
-#endif
-
-
-#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
-typedef long time_t;
-#define __DEFINED_time_t
-#endif
-
-#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
-typedef long suseconds_t;
-#define __DEFINED_suseconds_t
-#endif
-
-
-#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
-typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
-#define __DEFINED_pthread_attr_t
-#endif
-
-#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
-typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
-#define __DEFINED_pthread_mutex_t
-#endif
-
-#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
-typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
-#define __DEFINED_mtx_t
-#endif
-
-#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
-typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
-#define __DEFINED_pthread_cond_t
-#endif
-
-#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
-typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
-#define __DEFINED_cnd_t
-#endif
-
-#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
-typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
-#define __DEFINED_pthread_rwlock_t
-#endif
-
-#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
-typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
-#define __DEFINED_pthread_barrier_t
-#endif
-
-#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
-typedef unsigned _Addr size_t;
-#define __DEFINED_size_t
-#endif
-
-#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
-typedef unsigned _Addr uintptr_t;
-#define __DEFINED_uintptr_t
-#endif
-
-#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
-typedef _Addr ptrdiff_t;
-#define __DEFINED_ptrdiff_t
-#endif
-
-#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
-typedef _Addr ssize_t;
-#define __DEFINED_ssize_t
-#endif
-
-#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
-typedef _Addr intptr_t;
-#define __DEFINED_intptr_t
-#endif
-
-#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
-typedef _Addr regoff_t;
-#define __DEFINED_regoff_t
-#endif
-
-#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
-typedef _Reg register_t;
-#define __DEFINED_register_t
-#endif
-
-
-#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
-typedef signed char int8_t;
-#define __DEFINED_int8_t
-#endif
-
-#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
-typedef signed short int16_t;
-#define __DEFINED_int16_t
-#endif
-
-#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
-typedef signed int int32_t;
-#define __DEFINED_int32_t
-#endif
-
-#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
-typedef signed _Int64 int64_t;
-#define __DEFINED_int64_t
-#endif
-
-#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
-typedef signed _Int64 intmax_t;
-#define __DEFINED_intmax_t
-#endif
-
-#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
-typedef unsigned char uint8_t;
-#define __DEFINED_uint8_t
-#endif
-
-#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
-typedef unsigned short uint16_t;
-#define __DEFINED_uint16_t
-#endif
-
-#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
-typedef unsigned int uint32_t;
-#define __DEFINED_uint32_t
-#endif
-
-#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
-typedef unsigned _Int64 uint64_t;
-#define __DEFINED_uint64_t
-#endif
-
-#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t)
-typedef unsigned _Int64 u_int64_t;
-#define __DEFINED_u_int64_t
-#endif
-
-#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
-typedef unsigned _Int64 uintmax_t;
-#define __DEFINED_uintmax_t
-#endif
-
-
-#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
-typedef unsigned mode_t;
-#define __DEFINED_mode_t
-#endif
-
-#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
-typedef unsigned _Reg nlink_t;
-#define __DEFINED_nlink_t
-#endif
-
-#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
-typedef _Int64 off_t;
-#define __DEFINED_off_t
-#endif
-
-#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
-typedef unsigned _Int64 ino_t;
-#define __DEFINED_ino_t
-#endif
-
-#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
-typedef unsigned _Int64 dev_t;
-#define __DEFINED_dev_t
-#endif
-
-#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
-typedef long blksize_t;
-#define __DEFINED_blksize_t
-#endif
-
-#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
-typedef _Int64 blkcnt_t;
-#define __DEFINED_blkcnt_t
-#endif
-
-#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
-typedef unsigned _Int64 fsblkcnt_t;
-#define __DEFINED_fsblkcnt_t
-#endif
-
-#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
-typedef unsigned _Int64 fsfilcnt_t;
-#define __DEFINED_fsfilcnt_t
-#endif
-
-
-#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
-typedef unsigned wint_t;
-#define __DEFINED_wint_t
-#endif
-
-#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
-typedef unsigned long wctype_t;
-#define __DEFINED_wctype_t
-#endif
-
-
-#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
-typedef void * timer_t;
-#define __DEFINED_timer_t
-#endif
-
-#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
-typedef int clockid_t;
-#define __DEFINED_clockid_t
-#endif
-
-#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
-typedef long clock_t;
-#define __DEFINED_clock_t
-#endif
-
-#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
-struct timeval { time_t tv_sec; suseconds_t tv_usec; };
-#define __DEFINED_struct_timeval
-#endif
-
-#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
-struct timespec { time_t tv_sec; long tv_nsec; };
-#define __DEFINED_struct_timespec
-#endif
-
-
-#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
-typedef int pid_t;
-#define __DEFINED_pid_t
-#endif
-
-#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
-typedef unsigned id_t;
-#define __DEFINED_id_t
-#endif
-
-#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
-typedef unsigned uid_t;
-#define __DEFINED_uid_t
-#endif
-
-#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
-typedef unsigned gid_t;
-#define __DEFINED_gid_t
-#endif
-
-#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
-typedef int key_t;
-#define __DEFINED_key_t
-#endif
-
-#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
-typedef unsigned useconds_t;
-#define __DEFINED_useconds_t
-#endif
-
-
-#ifdef __cplusplus
-#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
-typedef unsigned long pthread_t;
-#define __DEFINED_pthread_t
-#endif
-
-#else
-#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
-typedef struct __pthread * pthread_t;
-#define __DEFINED_pthread_t
-#endif
-
-#endif
-#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
-typedef int pthread_once_t;
-#define __DEFINED_pthread_once_t
-#endif
-
-#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
-typedef unsigned pthread_key_t;
-#define __DEFINED_pthread_key_t
-#endif
-
-#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
-typedef int pthread_spinlock_t;
-#define __DEFINED_pthread_spinlock_t
-#endif
-
-#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
-typedef struct { unsigned __attr; } pthread_mutexattr_t;
-#define __DEFINED_pthread_mutexattr_t
-#endif
-
-#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
-typedef struct { unsigned __attr; } pthread_condattr_t;
-#define __DEFINED_pthread_condattr_t
-#endif
-
-#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
-typedef struct { unsigned __attr; } pthread_barrierattr_t;
-#define __DEFINED_pthread_barrierattr_t
-#endif
-
-#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
-typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t;
-#define __DEFINED_pthread_rwlockattr_t
-#endif
-
-
-#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
-typedef struct _IO_FILE FILE;
-#define __DEFINED_FILE
-#endif
-
-
-#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
-typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
-#define __DEFINED_mbstate_t
-#endif
-
-
-#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
-typedef struct __locale_struct * locale_t;
-#define __DEFINED_locale_t
-#endif
-
-
-#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
-typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t;
-#define __DEFINED_sigset_t
-#endif
-
-
-#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
-struct iovec { void *iov_base; size_t iov_len; };
-#define __DEFINED_struct_iovec
-#endif
-
-
-#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
-typedef unsigned socklen_t;
-#define __DEFINED_socklen_t
-#endif
-
-#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
-typedef unsigned short sa_family_t;
-#define __DEFINED_sa_family_t
-#endif
-
-
-#undef _Addr
-#undef _Int64
-#undef _Reg
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/endian.h b/lib/libc/include/aarch64-linux-musleabi/bits/endian.h
deleted file mode 100644
index 3ab24cc932287bfdb8170b6cda4f5f75b15c460b..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/endian.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#if __AARCH64EB__
-#define __BYTE_ORDER __BIG_ENDIAN
-#else
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/fenv.h b/lib/libc/include/aarch64-linux-musleabi/bits/fenv.h
deleted file mode 100644
index f2de6e6a172a512b9d434e8bfb6dba3c8baf5a20..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/fenv.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#define FE_INVALID 1
-#define FE_DIVBYZERO 2
-#define FE_OVERFLOW 4
-#define FE_UNDERFLOW 8
-#define FE_INEXACT 16
-#define FE_ALL_EXCEPT 31
-#define FE_TONEAREST 0
-#define FE_DOWNWARD 0x800000
-#define FE_UPWARD 0x400000
-#define FE_TOWARDZERO 0xc00000
-
-typedef unsigned int fexcept_t;
-
-typedef struct {
- unsigned int __fpcr;
- unsigned int __fpsr;
-} fenv_t;
-
-#define FE_DFL_ENV ((const fenv_t *) -1)
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/float.h b/lib/libc/include/aarch64-linux-musleabi/bits/float.h
deleted file mode 100644
index f8cb54bb3f6a45c2a01b746263391dfed5b7434a..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/float.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#define FLT_EVAL_METHOD 0
-
-#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L
-#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L
-#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L
-#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L
-
-#define LDBL_MANT_DIG 113
-#define LDBL_MIN_EXP (-16381)
-#define LDBL_MAX_EXP 16384
-
-#define LDBL_DIG 33
-#define LDBL_MIN_10_EXP (-4931)
-#define LDBL_MAX_10_EXP 4932
-
-#define DECIMAL_DIG 36
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/hwcap.h b/lib/libc/include/aarch64-linux-musleabi/bits/hwcap.h
deleted file mode 100644
index be613dab59c8a25d79ef9457f220eef4079fd055..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/hwcap.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#define HWCAP_FP (1 << 0)
-#define HWCAP_ASIMD (1 << 1)
-#define HWCAP_EVTSTRM (1 << 2)
-#define HWCAP_AES (1 << 3)
-#define HWCAP_PMULL (1 << 4)
-#define HWCAP_SHA1 (1 << 5)
-#define HWCAP_SHA2 (1 << 6)
-#define HWCAP_CRC32 (1 << 7)
-#define HWCAP_ATOMICS (1 << 8)
-#define HWCAP_FPHP (1 << 9)
-#define HWCAP_ASIMDHP (1 << 10)
-#define HWCAP_CPUID (1 << 11)
-#define HWCAP_ASIMDRDM (1 << 12)
-#define HWCAP_JSCVT (1 << 13)
-#define HWCAP_FCMA (1 << 14)
-#define HWCAP_LRCPC (1 << 15)
-#define HWCAP_DCPOP (1 << 16)
-#define HWCAP_SHA3 (1 << 17)
-#define HWCAP_SM3 (1 << 18)
-#define HWCAP_SM4 (1 << 19)
-#define HWCAP_ASIMDDP (1 << 20)
-#define HWCAP_SHA512 (1 << 21)
-#define HWCAP_SVE (1 << 22)
-#define HWCAP_ASIMDFHM (1 << 23)
-#define HWCAP_DIT (1 << 24)
-#define HWCAP_USCAT (1 << 25)
-#define HWCAP_ILRCPC (1 << 26)
-#define HWCAP_FLAGM (1 << 27)
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/ipc.h b/lib/libc/include/aarch64-linux-musleabi/bits/ipc.h
deleted file mode 100644
index 37561db60d0f64fc428b4f407ade6cbcc61335cb..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/ipc.h
+++ /dev/null
@@ -1,14 +0,0 @@
-struct ipc_perm {
- key_t __ipc_perm_key;
- uid_t uid;
- gid_t gid;
- uid_t cuid;
- gid_t cgid;
- mode_t mode;
- unsigned short __ipc_perm_seq;
-
- unsigned long __pad1;
- unsigned long __pad2;
-};
-
-#define IPC_64 0
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/limits.h b/lib/libc/include/aarch64-linux-musleabi/bits/limits.h
deleted file mode 100644
index 1be0deba7abfc5619657e0b90912d054efc53313..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/limits.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define LONG_BIT 64
-#endif
-
-#define LONG_MAX 0x7fffffffffffffffL
-#define LLONG_MAX 0x7fffffffffffffffLL
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/posix.h b/lib/libc/include/aarch64-linux-musleabi/bits/posix.h
deleted file mode 100644
index 9fcc205cc1a80473edac8d9d2563ca7452bcdb79..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/posix.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define _POSIX_V6_LP64_OFF64 1
-#define _POSIX_V7_LP64_OFF64 1
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/reg.h b/lib/libc/include/aarch64-linux-musleabi/bits/reg.h
deleted file mode 100644
index 0afb6bd06c1405a0f6f9b6e1833b9850d5b4aa04..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/reg.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 64
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/sem.h b/lib/libc/include/aarch64-linux-musleabi/bits/sem.h
deleted file mode 100644
index bf8e59f52ed0d501680b71f484cfeb2575bb80a5..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/sem.h
+++ /dev/null
@@ -1,14 +0,0 @@
-struct semid_ds {
- struct ipc_perm sem_perm;
- time_t sem_otime;
- time_t sem_ctime;
-#if __BYTE_ORDER == __LITTLE_ENDIAN
- unsigned short sem_nsems;
- char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-#else
- char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
- unsigned short sem_nsems;
-#endif
- time_t __unused3;
- time_t __unused4;
-};
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/setjmp.h b/lib/libc/include/aarch64-linux-musleabi/bits/setjmp.h
deleted file mode 100644
index d97fd2d084767b118aa710f702cce8ca550fdc58..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/setjmp.h
+++ /dev/null
@@ -1 +0,0 @@
-typedef unsigned long __jmp_buf[22];
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/signal.h b/lib/libc/include/aarch64-linux-musleabi/bits/signal.h
deleted file mode 100644
index cd13558bad38fd85c16fcf69ed26792fafad37a5..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/signal.h
+++ /dev/null
@@ -1,153 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 6144
-#define SIGSTKSZ 12288
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-typedef unsigned long greg_t;
-typedef unsigned long gregset_t[34];
-
-typedef struct {
- long double vregs[32];
- unsigned int fpsr;
- unsigned int fpcr;
-} fpregset_t;
-typedef struct sigcontext {
- unsigned long fault_address;
- unsigned long regs[31];
- unsigned long sp, pc, pstate;
- long double __reserved[256];
-} mcontext_t;
-
-#define FPSIMD_MAGIC 0x46508001
-#define ESR_MAGIC 0x45535201
-#define EXTRA_MAGIC 0x45585401
-#define SVE_MAGIC 0x53564501
-struct _aarch64_ctx {
- unsigned int magic;
- unsigned int size;
-};
-struct fpsimd_context {
- struct _aarch64_ctx head;
- unsigned int fpsr;
- unsigned int fpcr;
- long double vregs[32];
-};
-struct esr_context {
- struct _aarch64_ctx head;
- unsigned long esr;
-};
-struct extra_context {
- struct _aarch64_ctx head;
- unsigned long datap;
- unsigned int size;
- unsigned int __reserved[3];
-};
-struct sve_context {
- struct _aarch64_ctx head;
- unsigned short vl;
- unsigned short __reserved[3];
-};
-#define SVE_VQ_BYTES 16
-#define SVE_VQ_MIN 1
-#define SVE_VQ_MAX 512
-#define SVE_VL_MIN (SVE_VQ_MIN * SVE_VQ_BYTES)
-#define SVE_VL_MAX (SVE_VQ_MAX * SVE_VQ_BYTES)
-#define SVE_NUM_ZREGS 32
-#define SVE_NUM_PREGS 16
-#define sve_vl_valid(vl) \
- ((vl) % SVE_VQ_BYTES == 0 && (vl) >= SVE_VL_MIN && (vl) <= SVE_VL_MAX)
-#define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES)
-#define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES)
-#define SVE_SIG_ZREG_SIZE(vq) ((unsigned)(vq) * SVE_VQ_BYTES)
-#define SVE_SIG_PREG_SIZE(vq) ((unsigned)(vq) * (SVE_VQ_BYTES / 8))
-#define SVE_SIG_FFR_SIZE(vq) SVE_SIG_PREG_SIZE(vq)
-#define SVE_SIG_REGS_OFFSET \
- ((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \
- / SVE_VQ_BYTES * SVE_VQ_BYTES)
-#define SVE_SIG_ZREGS_OFFSET SVE_SIG_REGS_OFFSET
-#define SVE_SIG_ZREG_OFFSET(vq, n) \
- (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREG_SIZE(vq) * (n))
-#define SVE_SIG_ZREGS_SIZE(vq) \
- (SVE_SIG_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_SIG_ZREGS_OFFSET)
-#define SVE_SIG_PREGS_OFFSET(vq) \
- (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREGS_SIZE(vq))
-#define SVE_SIG_PREG_OFFSET(vq, n) \
- (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREG_SIZE(vq) * (n))
-#define SVE_SIG_PREGS_SIZE(vq) \
- (SVE_SIG_PREG_OFFSET(vq, SVE_NUM_PREGS) - SVE_SIG_PREGS_OFFSET(vq))
-#define SVE_SIG_FFR_OFFSET(vq) \
- (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREGS_SIZE(vq))
-#define SVE_SIG_REGS_SIZE(vq) \
- (SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET)
-#define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq))
-#else
-typedef struct {
- long double __regs[18+256];
-} mcontext_t;
-#endif
-
-struct sigaltstack {
- void *ss_sp;
- int ss_flags;
- size_t ss_size;
-};
-
-typedef struct __ucontext {
- unsigned long uc_flags;
- struct __ucontext *uc_link;
- stack_t uc_stack;
- sigset_t uc_sigmask;
- mcontext_t uc_mcontext;
-} ucontext_t;
-
-#define SA_NOCLDSTOP 1
-#define SA_NOCLDWAIT 2
-#define SA_SIGINFO 4
-#define SA_ONSTACK 0x08000000
-#define SA_RESTART 0x10000000
-#define SA_NODEFER 0x40000000
-#define SA_RESETHAND 0x80000000
-#define SA_RESTORER 0x04000000
-
-#endif
-
-#define SIGHUP 1
-#define SIGINT 2
-#define SIGQUIT 3
-#define SIGILL 4
-#define SIGTRAP 5
-#define SIGABRT 6
-#define SIGIOT SIGABRT
-#define SIGBUS 7
-#define SIGFPE 8
-#define SIGKILL 9
-#define SIGUSR1 10
-#define SIGSEGV 11
-#define SIGUSR2 12
-#define SIGPIPE 13
-#define SIGALRM 14
-#define SIGTERM 15
-#define SIGSTKFLT 16
-#define SIGCHLD 17
-#define SIGCONT 18
-#define SIGSTOP 19
-#define SIGTSTP 20
-#define SIGTTIN 21
-#define SIGTTOU 22
-#define SIGURG 23
-#define SIGXCPU 24
-#define SIGXFSZ 25
-#define SIGVTALRM 26
-#define SIGPROF 27
-#define SIGWINCH 28
-#define SIGIO 29
-#define SIGPOLL 29
-#define SIGPWR 30
-#define SIGSYS 31
-#define SIGUNUSED SIGSYS
-
-#define _NSIG 65
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/socket.h b/lib/libc/include/aarch64-linux-musleabi/bits/socket.h
deleted file mode 100644
index b4e9fb6a1cd407ada73476d64b2a6c33ab649a9a..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/socket.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#include
-
-struct msghdr {
- void *msg_name;
- socklen_t msg_namelen;
- struct iovec *msg_iov;
-#if __BYTE_ORDER == __BIG_ENDIAN
- int __pad1, msg_iovlen;
-#else
- int msg_iovlen, __pad1;
-#endif
- void *msg_control;
-#if __BYTE_ORDER == __BIG_ENDIAN
- int __pad2;
- socklen_t msg_controllen;
-#else
- socklen_t msg_controllen;
- int __pad2;
-#endif
- int msg_flags;
-};
-
-struct cmsghdr {
-#if __BYTE_ORDER == __BIG_ENDIAN
- int __pad1;
- socklen_t cmsg_len;
-#else
- socklen_t cmsg_len;
- int __pad1;
-#endif
- int cmsg_level;
- int cmsg_type;
-};
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/stat.h b/lib/libc/include/aarch64-linux-musleabi/bits/stat.h
deleted file mode 100644
index 6ce9af119f2ec29b2820bb8c8084a117b7605261..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/stat.h
+++ /dev/null
@@ -1,18 +0,0 @@
-struct stat {
- dev_t st_dev;
- ino_t st_ino;
- mode_t st_mode;
- nlink_t st_nlink;
- uid_t st_uid;
- gid_t st_gid;
- dev_t st_rdev;
- unsigned long __pad;
- off_t st_size;
- blksize_t st_blksize;
- int __pad2;
- blkcnt_t st_blocks;
- struct timespec st_atim;
- struct timespec st_mtim;
- struct timespec st_ctim;
- unsigned __unused[2];
-};
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/syscall.h b/lib/libc/include/aarch64-linux-musleabi/bits/syscall.h
deleted file mode 100644
index 917239ba98980c0a707ee0354c8b3705cb013051..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/syscall.h
+++ /dev/null
@@ -1,555 +0,0 @@
-#define __NR_io_setup 0
-#define __NR_io_destroy 1
-#define __NR_io_submit 2
-#define __NR_io_cancel 3
-#define __NR_io_getevents 4
-#define __NR_setxattr 5
-#define __NR_lsetxattr 6
-#define __NR_fsetxattr 7
-#define __NR_getxattr 8
-#define __NR_lgetxattr 9
-#define __NR_fgetxattr 10
-#define __NR_listxattr 11
-#define __NR_llistxattr 12
-#define __NR_flistxattr 13
-#define __NR_removexattr 14
-#define __NR_lremovexattr 15
-#define __NR_fremovexattr 16
-#define __NR_getcwd 17
-#define __NR_lookup_dcookie 18
-#define __NR_eventfd2 19
-#define __NR_epoll_create1 20
-#define __NR_epoll_ctl 21
-#define __NR_epoll_pwait 22
-#define __NR_dup 23
-#define __NR_dup3 24
-#define __NR_fcntl 25
-#define __NR_inotify_init1 26
-#define __NR_inotify_add_watch 27
-#define __NR_inotify_rm_watch 28
-#define __NR_ioctl 29
-#define __NR_ioprio_set 30
-#define __NR_ioprio_get 31
-#define __NR_flock 32
-#define __NR_mknodat 33
-#define __NR_mkdirat 34
-#define __NR_unlinkat 35
-#define __NR_symlinkat 36
-#define __NR_linkat 37
-#define __NR_renameat 38
-#define __NR_umount2 39
-#define __NR_mount 40
-#define __NR_pivot_root 41
-#define __NR_nfsservctl 42
-#define __NR_statfs 43
-#define __NR_fstatfs 44
-#define __NR_truncate 45
-#define __NR_ftruncate 46
-#define __NR_fallocate 47
-#define __NR_faccessat 48
-#define __NR_chdir 49
-#define __NR_fchdir 50
-#define __NR_chroot 51
-#define __NR_fchmod 52
-#define __NR_fchmodat 53
-#define __NR_fchownat 54
-#define __NR_fchown 55
-#define __NR_openat 56
-#define __NR_close 57
-#define __NR_vhangup 58
-#define __NR_pipe2 59
-#define __NR_quotactl 60
-#define __NR_getdents64 61
-#define __NR_lseek 62
-#define __NR_read 63
-#define __NR_write 64
-#define __NR_readv 65
-#define __NR_writev 66
-#define __NR_pread64 67
-#define __NR_pwrite64 68
-#define __NR_preadv 69
-#define __NR_pwritev 70
-#define __NR_sendfile 71
-#define __NR_pselect6 72
-#define __NR_ppoll 73
-#define __NR_signalfd4 74
-#define __NR_vmsplice 75
-#define __NR_splice 76
-#define __NR_tee 77
-#define __NR_readlinkat 78
-#define __NR_newfstatat 79
-#define __NR_fstat 80
-#define __NR_sync 81
-#define __NR_fsync 82
-#define __NR_fdatasync 83
-#define __NR_sync_file_range 84
-#define __NR_timerfd_create 85
-#define __NR_timerfd_settime 86
-#define __NR_timerfd_gettime 87
-#define __NR_utimensat 88
-#define __NR_acct 89
-#define __NR_capget 90
-#define __NR_capset 91
-#define __NR_personality 92
-#define __NR_exit 93
-#define __NR_exit_group 94
-#define __NR_waitid 95
-#define __NR_set_tid_address 96
-#define __NR_unshare 97
-#define __NR_futex 98
-#define __NR_set_robust_list 99
-#define __NR_get_robust_list 100
-#define __NR_nanosleep 101
-#define __NR_getitimer 102
-#define __NR_setitimer 103
-#define __NR_kexec_load 104
-#define __NR_init_module 105
-#define __NR_delete_module 106
-#define __NR_timer_create 107
-#define __NR_timer_gettime 108
-#define __NR_timer_getoverrun 109
-#define __NR_timer_settime 110
-#define __NR_timer_delete 111
-#define __NR_clock_settime 112
-#define __NR_clock_gettime 113
-#define __NR_clock_getres 114
-#define __NR_clock_nanosleep 115
-#define __NR_syslog 116
-#define __NR_ptrace 117
-#define __NR_sched_setparam 118
-#define __NR_sched_setscheduler 119
-#define __NR_sched_getscheduler 120
-#define __NR_sched_getparam 121
-#define __NR_sched_setaffinity 122
-#define __NR_sched_getaffinity 123
-#define __NR_sched_yield 124
-#define __NR_sched_get_priority_max 125
-#define __NR_sched_get_priority_min 126
-#define __NR_sched_rr_get_interval 127
-#define __NR_restart_syscall 128
-#define __NR_kill 129
-#define __NR_tkill 130
-#define __NR_tgkill 131
-#define __NR_sigaltstack 132
-#define __NR_rt_sigsuspend 133
-#define __NR_rt_sigaction 134
-#define __NR_rt_sigprocmask 135
-#define __NR_rt_sigpending 136
-#define __NR_rt_sigtimedwait 137
-#define __NR_rt_sigqueueinfo 138
-#define __NR_rt_sigreturn 139
-#define __NR_setpriority 140
-#define __NR_getpriority 141
-#define __NR_reboot 142
-#define __NR_setregid 143
-#define __NR_setgid 144
-#define __NR_setreuid 145
-#define __NR_setuid 146
-#define __NR_setresuid 147
-#define __NR_getresuid 148
-#define __NR_setresgid 149
-#define __NR_getresgid 150
-#define __NR_setfsuid 151
-#define __NR_setfsgid 152
-#define __NR_times 153
-#define __NR_setpgid 154
-#define __NR_getpgid 155
-#define __NR_getsid 156
-#define __NR_setsid 157
-#define __NR_getgroups 158
-#define __NR_setgroups 159
-#define __NR_uname 160
-#define __NR_sethostname 161
-#define __NR_setdomainname 162
-#define __NR_getrlimit 163
-#define __NR_setrlimit 164
-#define __NR_getrusage 165
-#define __NR_umask 166
-#define __NR_prctl 167
-#define __NR_getcpu 168
-#define __NR_gettimeofday 169
-#define __NR_settimeofday 170
-#define __NR_adjtimex 171
-#define __NR_getpid 172
-#define __NR_getppid 173
-#define __NR_getuid 174
-#define __NR_geteuid 175
-#define __NR_getgid 176
-#define __NR_getegid 177
-#define __NR_gettid 178
-#define __NR_sysinfo 179
-#define __NR_mq_open 180
-#define __NR_mq_unlink 181
-#define __NR_mq_timedsend 182
-#define __NR_mq_timedreceive 183
-#define __NR_mq_notify 184
-#define __NR_mq_getsetattr 185
-#define __NR_msgget 186
-#define __NR_msgctl 187
-#define __NR_msgrcv 188
-#define __NR_msgsnd 189
-#define __NR_semget 190
-#define __NR_semctl 191
-#define __NR_semtimedop 192
-#define __NR_semop 193
-#define __NR_shmget 194
-#define __NR_shmctl 195
-#define __NR_shmat 196
-#define __NR_shmdt 197
-#define __NR_socket 198
-#define __NR_socketpair 199
-#define __NR_bind 200
-#define __NR_listen 201
-#define __NR_accept 202
-#define __NR_connect 203
-#define __NR_getsockname 204
-#define __NR_getpeername 205
-#define __NR_sendto 206
-#define __NR_recvfrom 207
-#define __NR_setsockopt 208
-#define __NR_getsockopt 209
-#define __NR_shutdown 210
-#define __NR_sendmsg 211
-#define __NR_recvmsg 212
-#define __NR_readahead 213
-#define __NR_brk 214
-#define __NR_munmap 215
-#define __NR_mremap 216
-#define __NR_add_key 217
-#define __NR_request_key 218
-#define __NR_keyctl 219
-#define __NR_clone 220
-#define __NR_execve 221
-#define __NR_mmap 222
-#define __NR_fadvise64 223
-#define __NR_swapon 224
-#define __NR_swapoff 225
-#define __NR_mprotect 226
-#define __NR_msync 227
-#define __NR_mlock 228
-#define __NR_munlock 229
-#define __NR_mlockall 230
-#define __NR_munlockall 231
-#define __NR_mincore 232
-#define __NR_madvise 233
-#define __NR_remap_file_pages 234
-#define __NR_mbind 235
-#define __NR_get_mempolicy 236
-#define __NR_set_mempolicy 237
-#define __NR_migrate_pages 238
-#define __NR_move_pages 239
-#define __NR_rt_tgsigqueueinfo 240
-#define __NR_perf_event_open 241
-#define __NR_accept4 242
-#define __NR_recvmmsg 243
-#define __NR_wait4 260
-#define __NR_prlimit64 261
-#define __NR_fanotify_init 262
-#define __NR_fanotify_mark 263
-#define __NR_name_to_handle_at 264
-#define __NR_open_by_handle_at 265
-#define __NR_clock_adjtime 266
-#define __NR_syncfs 267
-#define __NR_setns 268
-#define __NR_sendmmsg 269
-#define __NR_process_vm_readv 270
-#define __NR_process_vm_writev 271
-#define __NR_kcmp 272
-#define __NR_finit_module 273
-#define __NR_sched_setattr 274
-#define __NR_sched_getattr 275
-#define __NR_renameat2 276
-#define __NR_seccomp 277
-#define __NR_getrandom 278
-#define __NR_memfd_create 279
-#define __NR_bpf 280
-#define __NR_execveat 281
-#define __NR_userfaultfd 282
-#define __NR_membarrier 283
-#define __NR_mlock2 284
-#define __NR_copy_file_range 285
-#define __NR_preadv2 286
-#define __NR_pwritev2 287
-#define __NR_pkey_mprotect 288
-#define __NR_pkey_alloc 289
-#define __NR_pkey_free 290
-#define __NR_statx 291
-#define __NR_io_pgetevents 292
-
-#define SYS_io_setup 0
-#define SYS_io_destroy 1
-#define SYS_io_submit 2
-#define SYS_io_cancel 3
-#define SYS_io_getevents 4
-#define SYS_setxattr 5
-#define SYS_lsetxattr 6
-#define SYS_fsetxattr 7
-#define SYS_getxattr 8
-#define SYS_lgetxattr 9
-#define SYS_fgetxattr 10
-#define SYS_listxattr 11
-#define SYS_llistxattr 12
-#define SYS_flistxattr 13
-#define SYS_removexattr 14
-#define SYS_lremovexattr 15
-#define SYS_fremovexattr 16
-#define SYS_getcwd 17
-#define SYS_lookup_dcookie 18
-#define SYS_eventfd2 19
-#define SYS_epoll_create1 20
-#define SYS_epoll_ctl 21
-#define SYS_epoll_pwait 22
-#define SYS_dup 23
-#define SYS_dup3 24
-#define SYS_fcntl 25
-#define SYS_inotify_init1 26
-#define SYS_inotify_add_watch 27
-#define SYS_inotify_rm_watch 28
-#define SYS_ioctl 29
-#define SYS_ioprio_set 30
-#define SYS_ioprio_get 31
-#define SYS_flock 32
-#define SYS_mknodat 33
-#define SYS_mkdirat 34
-#define SYS_unlinkat 35
-#define SYS_symlinkat 36
-#define SYS_linkat 37
-#define SYS_renameat 38
-#define SYS_umount2 39
-#define SYS_mount 40
-#define SYS_pivot_root 41
-#define SYS_nfsservctl 42
-#define SYS_statfs 43
-#define SYS_fstatfs 44
-#define SYS_truncate 45
-#define SYS_ftruncate 46
-#define SYS_fallocate 47
-#define SYS_faccessat 48
-#define SYS_chdir 49
-#define SYS_fchdir 50
-#define SYS_chroot 51
-#define SYS_fchmod 52
-#define SYS_fchmodat 53
-#define SYS_fchownat 54
-#define SYS_fchown 55
-#define SYS_openat 56
-#define SYS_close 57
-#define SYS_vhangup 58
-#define SYS_pipe2 59
-#define SYS_quotactl 60
-#define SYS_getdents64 61
-#define SYS_lseek 62
-#define SYS_read 63
-#define SYS_write 64
-#define SYS_readv 65
-#define SYS_writev 66
-#define SYS_pread64 67
-#define SYS_pwrite64 68
-#define SYS_preadv 69
-#define SYS_pwritev 70
-#define SYS_sendfile 71
-#define SYS_pselect6 72
-#define SYS_ppoll 73
-#define SYS_signalfd4 74
-#define SYS_vmsplice 75
-#define SYS_splice 76
-#define SYS_tee 77
-#define SYS_readlinkat 78
-#define SYS_newfstatat 79
-#define SYS_fstat 80
-#define SYS_sync 81
-#define SYS_fsync 82
-#define SYS_fdatasync 83
-#define SYS_sync_file_range 84
-#define SYS_timerfd_create 85
-#define SYS_timerfd_settime 86
-#define SYS_timerfd_gettime 87
-#define SYS_utimensat 88
-#define SYS_acct 89
-#define SYS_capget 90
-#define SYS_capset 91
-#define SYS_personality 92
-#define SYS_exit 93
-#define SYS_exit_group 94
-#define SYS_waitid 95
-#define SYS_set_tid_address 96
-#define SYS_unshare 97
-#define SYS_futex 98
-#define SYS_set_robust_list 99
-#define SYS_get_robust_list 100
-#define SYS_nanosleep 101
-#define SYS_getitimer 102
-#define SYS_setitimer 103
-#define SYS_kexec_load 104
-#define SYS_init_module 105
-#define SYS_delete_module 106
-#define SYS_timer_create 107
-#define SYS_timer_gettime 108
-#define SYS_timer_getoverrun 109
-#define SYS_timer_settime 110
-#define SYS_timer_delete 111
-#define SYS_clock_settime 112
-#define SYS_clock_gettime 113
-#define SYS_clock_getres 114
-#define SYS_clock_nanosleep 115
-#define SYS_syslog 116
-#define SYS_ptrace 117
-#define SYS_sched_setparam 118
-#define SYS_sched_setscheduler 119
-#define SYS_sched_getscheduler 120
-#define SYS_sched_getparam 121
-#define SYS_sched_setaffinity 122
-#define SYS_sched_getaffinity 123
-#define SYS_sched_yield 124
-#define SYS_sched_get_priority_max 125
-#define SYS_sched_get_priority_min 126
-#define SYS_sched_rr_get_interval 127
-#define SYS_restart_syscall 128
-#define SYS_kill 129
-#define SYS_tkill 130
-#define SYS_tgkill 131
-#define SYS_sigaltstack 132
-#define SYS_rt_sigsuspend 133
-#define SYS_rt_sigaction 134
-#define SYS_rt_sigprocmask 135
-#define SYS_rt_sigpending 136
-#define SYS_rt_sigtimedwait 137
-#define SYS_rt_sigqueueinfo 138
-#define SYS_rt_sigreturn 139
-#define SYS_setpriority 140
-#define SYS_getpriority 141
-#define SYS_reboot 142
-#define SYS_setregid 143
-#define SYS_setgid 144
-#define SYS_setreuid 145
-#define SYS_setuid 146
-#define SYS_setresuid 147
-#define SYS_getresuid 148
-#define SYS_setresgid 149
-#define SYS_getresgid 150
-#define SYS_setfsuid 151
-#define SYS_setfsgid 152
-#define SYS_times 153
-#define SYS_setpgid 154
-#define SYS_getpgid 155
-#define SYS_getsid 156
-#define SYS_setsid 157
-#define SYS_getgroups 158
-#define SYS_setgroups 159
-#define SYS_uname 160
-#define SYS_sethostname 161
-#define SYS_setdomainname 162
-#define SYS_getrlimit 163
-#define SYS_setrlimit 164
-#define SYS_getrusage 165
-#define SYS_umask 166
-#define SYS_prctl 167
-#define SYS_getcpu 168
-#define SYS_gettimeofday 169
-#define SYS_settimeofday 170
-#define SYS_adjtimex 171
-#define SYS_getpid 172
-#define SYS_getppid 173
-#define SYS_getuid 174
-#define SYS_geteuid 175
-#define SYS_getgid 176
-#define SYS_getegid 177
-#define SYS_gettid 178
-#define SYS_sysinfo 179
-#define SYS_mq_open 180
-#define SYS_mq_unlink 181
-#define SYS_mq_timedsend 182
-#define SYS_mq_timedreceive 183
-#define SYS_mq_notify 184
-#define SYS_mq_getsetattr 185
-#define SYS_msgget 186
-#define SYS_msgctl 187
-#define SYS_msgrcv 188
-#define SYS_msgsnd 189
-#define SYS_semget 190
-#define SYS_semctl 191
-#define SYS_semtimedop 192
-#define SYS_semop 193
-#define SYS_shmget 194
-#define SYS_shmctl 195
-#define SYS_shmat 196
-#define SYS_shmdt 197
-#define SYS_socket 198
-#define SYS_socketpair 199
-#define SYS_bind 200
-#define SYS_listen 201
-#define SYS_accept 202
-#define SYS_connect 203
-#define SYS_getsockname 204
-#define SYS_getpeername 205
-#define SYS_sendto 206
-#define SYS_recvfrom 207
-#define SYS_setsockopt 208
-#define SYS_getsockopt 209
-#define SYS_shutdown 210
-#define SYS_sendmsg 211
-#define SYS_recvmsg 212
-#define SYS_readahead 213
-#define SYS_brk 214
-#define SYS_munmap 215
-#define SYS_mremap 216
-#define SYS_add_key 217
-#define SYS_request_key 218
-#define SYS_keyctl 219
-#define SYS_clone 220
-#define SYS_execve 221
-#define SYS_mmap 222
-#define SYS_fadvise64 223
-#define SYS_swapon 224
-#define SYS_swapoff 225
-#define SYS_mprotect 226
-#define SYS_msync 227
-#define SYS_mlock 228
-#define SYS_munlock 229
-#define SYS_mlockall 230
-#define SYS_munlockall 231
-#define SYS_mincore 232
-#define SYS_madvise 233
-#define SYS_remap_file_pages 234
-#define SYS_mbind 235
-#define SYS_get_mempolicy 236
-#define SYS_set_mempolicy 237
-#define SYS_migrate_pages 238
-#define SYS_move_pages 239
-#define SYS_rt_tgsigqueueinfo 240
-#define SYS_perf_event_open 241
-#define SYS_accept4 242
-#define SYS_recvmmsg 243
-#define SYS_wait4 260
-#define SYS_prlimit64 261
-#define SYS_fanotify_init 262
-#define SYS_fanotify_mark 263
-#define SYS_name_to_handle_at 264
-#define SYS_open_by_handle_at 265
-#define SYS_clock_adjtime 266
-#define SYS_syncfs 267
-#define SYS_setns 268
-#define SYS_sendmmsg 269
-#define SYS_process_vm_readv 270
-#define SYS_process_vm_writev 271
-#define SYS_kcmp 272
-#define SYS_finit_module 273
-#define SYS_sched_setattr 274
-#define SYS_sched_getattr 275
-#define SYS_renameat2 276
-#define SYS_seccomp 277
-#define SYS_getrandom 278
-#define SYS_memfd_create 279
-#define SYS_bpf 280
-#define SYS_execveat 281
-#define SYS_userfaultfd 282
-#define SYS_membarrier 283
-#define SYS_mlock2 284
-#define SYS_copy_file_range 285
-#define SYS_preadv2 286
-#define SYS_pwritev2 287
-#define SYS_pkey_mprotect 288
-#define SYS_pkey_alloc 289
-#define SYS_pkey_free 290
-#define SYS_statx 291
-#define SYS_io_pgetevents 292
\ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/user.h b/lib/libc/include/aarch64-linux-musleabi/bits/user.h
deleted file mode 100644
index 2bd9dd5863c38e6fd0e8fea73f71e049972b975a..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64-linux-musleabi/bits/user.h
+++ /dev/null
@@ -1,16 +0,0 @@
-struct user_regs_struct {
- unsigned long long regs[31];
- unsigned long long sp;
- unsigned long long pc;
- unsigned long long pstate;
-};
-
-struct user_fpsimd_struct {
- long double vregs[32];
- unsigned int fpsr;
- unsigned int fpcr;
-};
-
-#define ELF_NREG 34
-typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NREG];
-typedef struct user_fpsimd_struct elf_fpregset_t;
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bfd_stdint.h b/lib/libc/include/aarch64_be-linux-musl/bfd_stdint.h
deleted file mode 100644
index b90c512feec1e2adf334828a38260938d5b99980..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bfd_stdint.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* generated for aarch64_be-linux-musl-gcc (GCC) 8.3.0 */
-
-#ifndef GCC_GENERATED_STDINT_H
-#define GCC_GENERATED_STDINT_H 1
-
-#include
-#include
-/* glibc uses these symbols as guards to prevent redefinitions. */
-#ifdef __int8_t_defined
-#define _INT8_T
-#define _INT16_T
-#define _INT32_T
-#endif
-#ifdef __uint32_t_defined
-#define _UINT32_T
-#endif
-
-
-/* Some systems have guard macros to prevent redefinitions, define them. */
-#ifndef _INT8_T
-#define _INT8_T
-#endif
-#ifndef _INT16_T
-#define _INT16_T
-#endif
-#ifndef _INT32_T
-#define _INT32_T
-#endif
-#ifndef _UINT8_T
-#define _UINT8_T
-#endif
-#ifndef _UINT16_T
-#define _UINT16_T
-#endif
-#ifndef _UINT32_T
-#define _UINT32_T
-#endif
-
-/* system headers have good uint64_t and int64_t */
-#ifndef _INT64_T
-#define _INT64_T
-#endif
-#ifndef _UINT64_T
-#define _UINT64_T
-#endif
-
-#endif /* GCC_GENERATED_STDINT_H */
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/alltypes.h b/lib/libc/include/aarch64_be-linux-musl/bits/alltypes.h
deleted file mode 100644
index d4e904acb7d3e9ad65af48b4c2e0f2379c344870..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/alltypes.h
+++ /dev/null
@@ -1,401 +0,0 @@
-#define _Addr long
-#define _Int64 long
-#define _Reg long
-
-#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
-typedef __builtin_va_list va_list;
-#define __DEFINED_va_list
-#endif
-
-#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
-typedef __builtin_va_list __isoc_va_list;
-#define __DEFINED___isoc_va_list
-#endif
-
-
-#ifndef __cplusplus
-#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
-typedef unsigned wchar_t;
-#define __DEFINED_wchar_t
-#endif
-
-#endif
-#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
-typedef unsigned wint_t;
-#define __DEFINED_wint_t
-#endif
-
-
-#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
-typedef int blksize_t;
-#define __DEFINED_blksize_t
-#endif
-
-#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
-typedef unsigned int nlink_t;
-#define __DEFINED_nlink_t
-#endif
-
-
-#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
-typedef float float_t;
-#define __DEFINED_float_t
-#endif
-
-#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
-typedef double double_t;
-#define __DEFINED_double_t
-#endif
-
-
-#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
-typedef struct { long long __ll; long double __ld; } max_align_t;
-#define __DEFINED_max_align_t
-#endif
-
-
-#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
-typedef long time_t;
-#define __DEFINED_time_t
-#endif
-
-#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
-typedef long suseconds_t;
-#define __DEFINED_suseconds_t
-#endif
-
-
-#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
-typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
-#define __DEFINED_pthread_attr_t
-#endif
-
-#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
-typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
-#define __DEFINED_pthread_mutex_t
-#endif
-
-#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
-typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
-#define __DEFINED_mtx_t
-#endif
-
-#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
-typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
-#define __DEFINED_pthread_cond_t
-#endif
-
-#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
-typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
-#define __DEFINED_cnd_t
-#endif
-
-#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
-typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
-#define __DEFINED_pthread_rwlock_t
-#endif
-
-#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
-typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
-#define __DEFINED_pthread_barrier_t
-#endif
-
-#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
-typedef unsigned _Addr size_t;
-#define __DEFINED_size_t
-#endif
-
-#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
-typedef unsigned _Addr uintptr_t;
-#define __DEFINED_uintptr_t
-#endif
-
-#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
-typedef _Addr ptrdiff_t;
-#define __DEFINED_ptrdiff_t
-#endif
-
-#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
-typedef _Addr ssize_t;
-#define __DEFINED_ssize_t
-#endif
-
-#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
-typedef _Addr intptr_t;
-#define __DEFINED_intptr_t
-#endif
-
-#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
-typedef _Addr regoff_t;
-#define __DEFINED_regoff_t
-#endif
-
-#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
-typedef _Reg register_t;
-#define __DEFINED_register_t
-#endif
-
-
-#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
-typedef signed char int8_t;
-#define __DEFINED_int8_t
-#endif
-
-#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
-typedef signed short int16_t;
-#define __DEFINED_int16_t
-#endif
-
-#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
-typedef signed int int32_t;
-#define __DEFINED_int32_t
-#endif
-
-#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
-typedef signed _Int64 int64_t;
-#define __DEFINED_int64_t
-#endif
-
-#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
-typedef signed _Int64 intmax_t;
-#define __DEFINED_intmax_t
-#endif
-
-#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
-typedef unsigned char uint8_t;
-#define __DEFINED_uint8_t
-#endif
-
-#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
-typedef unsigned short uint16_t;
-#define __DEFINED_uint16_t
-#endif
-
-#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
-typedef unsigned int uint32_t;
-#define __DEFINED_uint32_t
-#endif
-
-#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
-typedef unsigned _Int64 uint64_t;
-#define __DEFINED_uint64_t
-#endif
-
-#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t)
-typedef unsigned _Int64 u_int64_t;
-#define __DEFINED_u_int64_t
-#endif
-
-#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
-typedef unsigned _Int64 uintmax_t;
-#define __DEFINED_uintmax_t
-#endif
-
-
-#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
-typedef unsigned mode_t;
-#define __DEFINED_mode_t
-#endif
-
-#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
-typedef unsigned _Reg nlink_t;
-#define __DEFINED_nlink_t
-#endif
-
-#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
-typedef _Int64 off_t;
-#define __DEFINED_off_t
-#endif
-
-#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
-typedef unsigned _Int64 ino_t;
-#define __DEFINED_ino_t
-#endif
-
-#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
-typedef unsigned _Int64 dev_t;
-#define __DEFINED_dev_t
-#endif
-
-#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
-typedef long blksize_t;
-#define __DEFINED_blksize_t
-#endif
-
-#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
-typedef _Int64 blkcnt_t;
-#define __DEFINED_blkcnt_t
-#endif
-
-#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
-typedef unsigned _Int64 fsblkcnt_t;
-#define __DEFINED_fsblkcnt_t
-#endif
-
-#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
-typedef unsigned _Int64 fsfilcnt_t;
-#define __DEFINED_fsfilcnt_t
-#endif
-
-
-#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
-typedef unsigned wint_t;
-#define __DEFINED_wint_t
-#endif
-
-#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
-typedef unsigned long wctype_t;
-#define __DEFINED_wctype_t
-#endif
-
-
-#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
-typedef void * timer_t;
-#define __DEFINED_timer_t
-#endif
-
-#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
-typedef int clockid_t;
-#define __DEFINED_clockid_t
-#endif
-
-#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
-typedef long clock_t;
-#define __DEFINED_clock_t
-#endif
-
-#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
-struct timeval { time_t tv_sec; suseconds_t tv_usec; };
-#define __DEFINED_struct_timeval
-#endif
-
-#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
-struct timespec { time_t tv_sec; long tv_nsec; };
-#define __DEFINED_struct_timespec
-#endif
-
-
-#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
-typedef int pid_t;
-#define __DEFINED_pid_t
-#endif
-
-#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
-typedef unsigned id_t;
-#define __DEFINED_id_t
-#endif
-
-#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
-typedef unsigned uid_t;
-#define __DEFINED_uid_t
-#endif
-
-#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
-typedef unsigned gid_t;
-#define __DEFINED_gid_t
-#endif
-
-#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
-typedef int key_t;
-#define __DEFINED_key_t
-#endif
-
-#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
-typedef unsigned useconds_t;
-#define __DEFINED_useconds_t
-#endif
-
-
-#ifdef __cplusplus
-#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
-typedef unsigned long pthread_t;
-#define __DEFINED_pthread_t
-#endif
-
-#else
-#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
-typedef struct __pthread * pthread_t;
-#define __DEFINED_pthread_t
-#endif
-
-#endif
-#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
-typedef int pthread_once_t;
-#define __DEFINED_pthread_once_t
-#endif
-
-#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
-typedef unsigned pthread_key_t;
-#define __DEFINED_pthread_key_t
-#endif
-
-#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
-typedef int pthread_spinlock_t;
-#define __DEFINED_pthread_spinlock_t
-#endif
-
-#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
-typedef struct { unsigned __attr; } pthread_mutexattr_t;
-#define __DEFINED_pthread_mutexattr_t
-#endif
-
-#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
-typedef struct { unsigned __attr; } pthread_condattr_t;
-#define __DEFINED_pthread_condattr_t
-#endif
-
-#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
-typedef struct { unsigned __attr; } pthread_barrierattr_t;
-#define __DEFINED_pthread_barrierattr_t
-#endif
-
-#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
-typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t;
-#define __DEFINED_pthread_rwlockattr_t
-#endif
-
-
-#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
-typedef struct _IO_FILE FILE;
-#define __DEFINED_FILE
-#endif
-
-
-#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
-typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
-#define __DEFINED_mbstate_t
-#endif
-
-
-#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
-typedef struct __locale_struct * locale_t;
-#define __DEFINED_locale_t
-#endif
-
-
-#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
-typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t;
-#define __DEFINED_sigset_t
-#endif
-
-
-#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
-struct iovec { void *iov_base; size_t iov_len; };
-#define __DEFINED_struct_iovec
-#endif
-
-
-#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
-typedef unsigned socklen_t;
-#define __DEFINED_socklen_t
-#endif
-
-#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
-typedef unsigned short sa_family_t;
-#define __DEFINED_sa_family_t
-#endif
-
-
-#undef _Addr
-#undef _Int64
-#undef _Reg
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/endian.h b/lib/libc/include/aarch64_be-linux-musl/bits/endian.h
deleted file mode 100644
index 3ab24cc932287bfdb8170b6cda4f5f75b15c460b..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/endian.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#if __AARCH64EB__
-#define __BYTE_ORDER __BIG_ENDIAN
-#else
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/fenv.h b/lib/libc/include/aarch64_be-linux-musl/bits/fenv.h
deleted file mode 100644
index f2de6e6a172a512b9d434e8bfb6dba3c8baf5a20..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/fenv.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#define FE_INVALID 1
-#define FE_DIVBYZERO 2
-#define FE_OVERFLOW 4
-#define FE_UNDERFLOW 8
-#define FE_INEXACT 16
-#define FE_ALL_EXCEPT 31
-#define FE_TONEAREST 0
-#define FE_DOWNWARD 0x800000
-#define FE_UPWARD 0x400000
-#define FE_TOWARDZERO 0xc00000
-
-typedef unsigned int fexcept_t;
-
-typedef struct {
- unsigned int __fpcr;
- unsigned int __fpsr;
-} fenv_t;
-
-#define FE_DFL_ENV ((const fenv_t *) -1)
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/float.h b/lib/libc/include/aarch64_be-linux-musl/bits/float.h
deleted file mode 100644
index f8cb54bb3f6a45c2a01b746263391dfed5b7434a..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/float.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#define FLT_EVAL_METHOD 0
-
-#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L
-#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L
-#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L
-#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L
-
-#define LDBL_MANT_DIG 113
-#define LDBL_MIN_EXP (-16381)
-#define LDBL_MAX_EXP 16384
-
-#define LDBL_DIG 33
-#define LDBL_MIN_10_EXP (-4931)
-#define LDBL_MAX_10_EXP 4932
-
-#define DECIMAL_DIG 36
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/hwcap.h b/lib/libc/include/aarch64_be-linux-musl/bits/hwcap.h
deleted file mode 100644
index be613dab59c8a25d79ef9457f220eef4079fd055..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/hwcap.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#define HWCAP_FP (1 << 0)
-#define HWCAP_ASIMD (1 << 1)
-#define HWCAP_EVTSTRM (1 << 2)
-#define HWCAP_AES (1 << 3)
-#define HWCAP_PMULL (1 << 4)
-#define HWCAP_SHA1 (1 << 5)
-#define HWCAP_SHA2 (1 << 6)
-#define HWCAP_CRC32 (1 << 7)
-#define HWCAP_ATOMICS (1 << 8)
-#define HWCAP_FPHP (1 << 9)
-#define HWCAP_ASIMDHP (1 << 10)
-#define HWCAP_CPUID (1 << 11)
-#define HWCAP_ASIMDRDM (1 << 12)
-#define HWCAP_JSCVT (1 << 13)
-#define HWCAP_FCMA (1 << 14)
-#define HWCAP_LRCPC (1 << 15)
-#define HWCAP_DCPOP (1 << 16)
-#define HWCAP_SHA3 (1 << 17)
-#define HWCAP_SM3 (1 << 18)
-#define HWCAP_SM4 (1 << 19)
-#define HWCAP_ASIMDDP (1 << 20)
-#define HWCAP_SHA512 (1 << 21)
-#define HWCAP_SVE (1 << 22)
-#define HWCAP_ASIMDFHM (1 << 23)
-#define HWCAP_DIT (1 << 24)
-#define HWCAP_USCAT (1 << 25)
-#define HWCAP_ILRCPC (1 << 26)
-#define HWCAP_FLAGM (1 << 27)
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/ipc.h b/lib/libc/include/aarch64_be-linux-musl/bits/ipc.h
deleted file mode 100644
index 37561db60d0f64fc428b4f407ade6cbcc61335cb..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/ipc.h
+++ /dev/null
@@ -1,14 +0,0 @@
-struct ipc_perm {
- key_t __ipc_perm_key;
- uid_t uid;
- gid_t gid;
- uid_t cuid;
- gid_t cgid;
- mode_t mode;
- unsigned short __ipc_perm_seq;
-
- unsigned long __pad1;
- unsigned long __pad2;
-};
-
-#define IPC_64 0
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/limits.h b/lib/libc/include/aarch64_be-linux-musl/bits/limits.h
deleted file mode 100644
index 1be0deba7abfc5619657e0b90912d054efc53313..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/limits.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define LONG_BIT 64
-#endif
-
-#define LONG_MAX 0x7fffffffffffffffL
-#define LLONG_MAX 0x7fffffffffffffffLL
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/posix.h b/lib/libc/include/aarch64_be-linux-musl/bits/posix.h
deleted file mode 100644
index 9fcc205cc1a80473edac8d9d2563ca7452bcdb79..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/posix.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define _POSIX_V6_LP64_OFF64 1
-#define _POSIX_V7_LP64_OFF64 1
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/reg.h b/lib/libc/include/aarch64_be-linux-musl/bits/reg.h
deleted file mode 100644
index 0afb6bd06c1405a0f6f9b6e1833b9850d5b4aa04..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/reg.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 64
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/sem.h b/lib/libc/include/aarch64_be-linux-musl/bits/sem.h
deleted file mode 100644
index bf8e59f52ed0d501680b71f484cfeb2575bb80a5..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/sem.h
+++ /dev/null
@@ -1,14 +0,0 @@
-struct semid_ds {
- struct ipc_perm sem_perm;
- time_t sem_otime;
- time_t sem_ctime;
-#if __BYTE_ORDER == __LITTLE_ENDIAN
- unsigned short sem_nsems;
- char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
-#else
- char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
- unsigned short sem_nsems;
-#endif
- time_t __unused3;
- time_t __unused4;
-};
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/setjmp.h b/lib/libc/include/aarch64_be-linux-musl/bits/setjmp.h
deleted file mode 100644
index d97fd2d084767b118aa710f702cce8ca550fdc58..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/setjmp.h
+++ /dev/null
@@ -1 +0,0 @@
-typedef unsigned long __jmp_buf[22];
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/signal.h b/lib/libc/include/aarch64_be-linux-musl/bits/signal.h
deleted file mode 100644
index cd13558bad38fd85c16fcf69ed26792fafad37a5..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/signal.h
+++ /dev/null
@@ -1,153 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 6144
-#define SIGSTKSZ 12288
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-typedef unsigned long greg_t;
-typedef unsigned long gregset_t[34];
-
-typedef struct {
- long double vregs[32];
- unsigned int fpsr;
- unsigned int fpcr;
-} fpregset_t;
-typedef struct sigcontext {
- unsigned long fault_address;
- unsigned long regs[31];
- unsigned long sp, pc, pstate;
- long double __reserved[256];
-} mcontext_t;
-
-#define FPSIMD_MAGIC 0x46508001
-#define ESR_MAGIC 0x45535201
-#define EXTRA_MAGIC 0x45585401
-#define SVE_MAGIC 0x53564501
-struct _aarch64_ctx {
- unsigned int magic;
- unsigned int size;
-};
-struct fpsimd_context {
- struct _aarch64_ctx head;
- unsigned int fpsr;
- unsigned int fpcr;
- long double vregs[32];
-};
-struct esr_context {
- struct _aarch64_ctx head;
- unsigned long esr;
-};
-struct extra_context {
- struct _aarch64_ctx head;
- unsigned long datap;
- unsigned int size;
- unsigned int __reserved[3];
-};
-struct sve_context {
- struct _aarch64_ctx head;
- unsigned short vl;
- unsigned short __reserved[3];
-};
-#define SVE_VQ_BYTES 16
-#define SVE_VQ_MIN 1
-#define SVE_VQ_MAX 512
-#define SVE_VL_MIN (SVE_VQ_MIN * SVE_VQ_BYTES)
-#define SVE_VL_MAX (SVE_VQ_MAX * SVE_VQ_BYTES)
-#define SVE_NUM_ZREGS 32
-#define SVE_NUM_PREGS 16
-#define sve_vl_valid(vl) \
- ((vl) % SVE_VQ_BYTES == 0 && (vl) >= SVE_VL_MIN && (vl) <= SVE_VL_MAX)
-#define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES)
-#define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES)
-#define SVE_SIG_ZREG_SIZE(vq) ((unsigned)(vq) * SVE_VQ_BYTES)
-#define SVE_SIG_PREG_SIZE(vq) ((unsigned)(vq) * (SVE_VQ_BYTES / 8))
-#define SVE_SIG_FFR_SIZE(vq) SVE_SIG_PREG_SIZE(vq)
-#define SVE_SIG_REGS_OFFSET \
- ((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \
- / SVE_VQ_BYTES * SVE_VQ_BYTES)
-#define SVE_SIG_ZREGS_OFFSET SVE_SIG_REGS_OFFSET
-#define SVE_SIG_ZREG_OFFSET(vq, n) \
- (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREG_SIZE(vq) * (n))
-#define SVE_SIG_ZREGS_SIZE(vq) \
- (SVE_SIG_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_SIG_ZREGS_OFFSET)
-#define SVE_SIG_PREGS_OFFSET(vq) \
- (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREGS_SIZE(vq))
-#define SVE_SIG_PREG_OFFSET(vq, n) \
- (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREG_SIZE(vq) * (n))
-#define SVE_SIG_PREGS_SIZE(vq) \
- (SVE_SIG_PREG_OFFSET(vq, SVE_NUM_PREGS) - SVE_SIG_PREGS_OFFSET(vq))
-#define SVE_SIG_FFR_OFFSET(vq) \
- (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREGS_SIZE(vq))
-#define SVE_SIG_REGS_SIZE(vq) \
- (SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET)
-#define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq))
-#else
-typedef struct {
- long double __regs[18+256];
-} mcontext_t;
-#endif
-
-struct sigaltstack {
- void *ss_sp;
- int ss_flags;
- size_t ss_size;
-};
-
-typedef struct __ucontext {
- unsigned long uc_flags;
- struct __ucontext *uc_link;
- stack_t uc_stack;
- sigset_t uc_sigmask;
- mcontext_t uc_mcontext;
-} ucontext_t;
-
-#define SA_NOCLDSTOP 1
-#define SA_NOCLDWAIT 2
-#define SA_SIGINFO 4
-#define SA_ONSTACK 0x08000000
-#define SA_RESTART 0x10000000
-#define SA_NODEFER 0x40000000
-#define SA_RESETHAND 0x80000000
-#define SA_RESTORER 0x04000000
-
-#endif
-
-#define SIGHUP 1
-#define SIGINT 2
-#define SIGQUIT 3
-#define SIGILL 4
-#define SIGTRAP 5
-#define SIGABRT 6
-#define SIGIOT SIGABRT
-#define SIGBUS 7
-#define SIGFPE 8
-#define SIGKILL 9
-#define SIGUSR1 10
-#define SIGSEGV 11
-#define SIGUSR2 12
-#define SIGPIPE 13
-#define SIGALRM 14
-#define SIGTERM 15
-#define SIGSTKFLT 16
-#define SIGCHLD 17
-#define SIGCONT 18
-#define SIGSTOP 19
-#define SIGTSTP 20
-#define SIGTTIN 21
-#define SIGTTOU 22
-#define SIGURG 23
-#define SIGXCPU 24
-#define SIGXFSZ 25
-#define SIGVTALRM 26
-#define SIGPROF 27
-#define SIGWINCH 28
-#define SIGIO 29
-#define SIGPOLL 29
-#define SIGPWR 30
-#define SIGSYS 31
-#define SIGUNUSED SIGSYS
-
-#define _NSIG 65
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/socket.h b/lib/libc/include/aarch64_be-linux-musl/bits/socket.h
deleted file mode 100644
index b4e9fb6a1cd407ada73476d64b2a6c33ab649a9a..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/socket.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#include
-
-struct msghdr {
- void *msg_name;
- socklen_t msg_namelen;
- struct iovec *msg_iov;
-#if __BYTE_ORDER == __BIG_ENDIAN
- int __pad1, msg_iovlen;
-#else
- int msg_iovlen, __pad1;
-#endif
- void *msg_control;
-#if __BYTE_ORDER == __BIG_ENDIAN
- int __pad2;
- socklen_t msg_controllen;
-#else
- socklen_t msg_controllen;
- int __pad2;
-#endif
- int msg_flags;
-};
-
-struct cmsghdr {
-#if __BYTE_ORDER == __BIG_ENDIAN
- int __pad1;
- socklen_t cmsg_len;
-#else
- socklen_t cmsg_len;
- int __pad1;
-#endif
- int cmsg_level;
- int cmsg_type;
-};
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/stat.h b/lib/libc/include/aarch64_be-linux-musl/bits/stat.h
deleted file mode 100644
index 6ce9af119f2ec29b2820bb8c8084a117b7605261..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/stat.h
+++ /dev/null
@@ -1,18 +0,0 @@
-struct stat {
- dev_t st_dev;
- ino_t st_ino;
- mode_t st_mode;
- nlink_t st_nlink;
- uid_t st_uid;
- gid_t st_gid;
- dev_t st_rdev;
- unsigned long __pad;
- off_t st_size;
- blksize_t st_blksize;
- int __pad2;
- blkcnt_t st_blocks;
- struct timespec st_atim;
- struct timespec st_mtim;
- struct timespec st_ctim;
- unsigned __unused[2];
-};
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/syscall.h b/lib/libc/include/aarch64_be-linux-musl/bits/syscall.h
deleted file mode 100644
index 917239ba98980c0a707ee0354c8b3705cb013051..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/syscall.h
+++ /dev/null
@@ -1,555 +0,0 @@
-#define __NR_io_setup 0
-#define __NR_io_destroy 1
-#define __NR_io_submit 2
-#define __NR_io_cancel 3
-#define __NR_io_getevents 4
-#define __NR_setxattr 5
-#define __NR_lsetxattr 6
-#define __NR_fsetxattr 7
-#define __NR_getxattr 8
-#define __NR_lgetxattr 9
-#define __NR_fgetxattr 10
-#define __NR_listxattr 11
-#define __NR_llistxattr 12
-#define __NR_flistxattr 13
-#define __NR_removexattr 14
-#define __NR_lremovexattr 15
-#define __NR_fremovexattr 16
-#define __NR_getcwd 17
-#define __NR_lookup_dcookie 18
-#define __NR_eventfd2 19
-#define __NR_epoll_create1 20
-#define __NR_epoll_ctl 21
-#define __NR_epoll_pwait 22
-#define __NR_dup 23
-#define __NR_dup3 24
-#define __NR_fcntl 25
-#define __NR_inotify_init1 26
-#define __NR_inotify_add_watch 27
-#define __NR_inotify_rm_watch 28
-#define __NR_ioctl 29
-#define __NR_ioprio_set 30
-#define __NR_ioprio_get 31
-#define __NR_flock 32
-#define __NR_mknodat 33
-#define __NR_mkdirat 34
-#define __NR_unlinkat 35
-#define __NR_symlinkat 36
-#define __NR_linkat 37
-#define __NR_renameat 38
-#define __NR_umount2 39
-#define __NR_mount 40
-#define __NR_pivot_root 41
-#define __NR_nfsservctl 42
-#define __NR_statfs 43
-#define __NR_fstatfs 44
-#define __NR_truncate 45
-#define __NR_ftruncate 46
-#define __NR_fallocate 47
-#define __NR_faccessat 48
-#define __NR_chdir 49
-#define __NR_fchdir 50
-#define __NR_chroot 51
-#define __NR_fchmod 52
-#define __NR_fchmodat 53
-#define __NR_fchownat 54
-#define __NR_fchown 55
-#define __NR_openat 56
-#define __NR_close 57
-#define __NR_vhangup 58
-#define __NR_pipe2 59
-#define __NR_quotactl 60
-#define __NR_getdents64 61
-#define __NR_lseek 62
-#define __NR_read 63
-#define __NR_write 64
-#define __NR_readv 65
-#define __NR_writev 66
-#define __NR_pread64 67
-#define __NR_pwrite64 68
-#define __NR_preadv 69
-#define __NR_pwritev 70
-#define __NR_sendfile 71
-#define __NR_pselect6 72
-#define __NR_ppoll 73
-#define __NR_signalfd4 74
-#define __NR_vmsplice 75
-#define __NR_splice 76
-#define __NR_tee 77
-#define __NR_readlinkat 78
-#define __NR_newfstatat 79
-#define __NR_fstat 80
-#define __NR_sync 81
-#define __NR_fsync 82
-#define __NR_fdatasync 83
-#define __NR_sync_file_range 84
-#define __NR_timerfd_create 85
-#define __NR_timerfd_settime 86
-#define __NR_timerfd_gettime 87
-#define __NR_utimensat 88
-#define __NR_acct 89
-#define __NR_capget 90
-#define __NR_capset 91
-#define __NR_personality 92
-#define __NR_exit 93
-#define __NR_exit_group 94
-#define __NR_waitid 95
-#define __NR_set_tid_address 96
-#define __NR_unshare 97
-#define __NR_futex 98
-#define __NR_set_robust_list 99
-#define __NR_get_robust_list 100
-#define __NR_nanosleep 101
-#define __NR_getitimer 102
-#define __NR_setitimer 103
-#define __NR_kexec_load 104
-#define __NR_init_module 105
-#define __NR_delete_module 106
-#define __NR_timer_create 107
-#define __NR_timer_gettime 108
-#define __NR_timer_getoverrun 109
-#define __NR_timer_settime 110
-#define __NR_timer_delete 111
-#define __NR_clock_settime 112
-#define __NR_clock_gettime 113
-#define __NR_clock_getres 114
-#define __NR_clock_nanosleep 115
-#define __NR_syslog 116
-#define __NR_ptrace 117
-#define __NR_sched_setparam 118
-#define __NR_sched_setscheduler 119
-#define __NR_sched_getscheduler 120
-#define __NR_sched_getparam 121
-#define __NR_sched_setaffinity 122
-#define __NR_sched_getaffinity 123
-#define __NR_sched_yield 124
-#define __NR_sched_get_priority_max 125
-#define __NR_sched_get_priority_min 126
-#define __NR_sched_rr_get_interval 127
-#define __NR_restart_syscall 128
-#define __NR_kill 129
-#define __NR_tkill 130
-#define __NR_tgkill 131
-#define __NR_sigaltstack 132
-#define __NR_rt_sigsuspend 133
-#define __NR_rt_sigaction 134
-#define __NR_rt_sigprocmask 135
-#define __NR_rt_sigpending 136
-#define __NR_rt_sigtimedwait 137
-#define __NR_rt_sigqueueinfo 138
-#define __NR_rt_sigreturn 139
-#define __NR_setpriority 140
-#define __NR_getpriority 141
-#define __NR_reboot 142
-#define __NR_setregid 143
-#define __NR_setgid 144
-#define __NR_setreuid 145
-#define __NR_setuid 146
-#define __NR_setresuid 147
-#define __NR_getresuid 148
-#define __NR_setresgid 149
-#define __NR_getresgid 150
-#define __NR_setfsuid 151
-#define __NR_setfsgid 152
-#define __NR_times 153
-#define __NR_setpgid 154
-#define __NR_getpgid 155
-#define __NR_getsid 156
-#define __NR_setsid 157
-#define __NR_getgroups 158
-#define __NR_setgroups 159
-#define __NR_uname 160
-#define __NR_sethostname 161
-#define __NR_setdomainname 162
-#define __NR_getrlimit 163
-#define __NR_setrlimit 164
-#define __NR_getrusage 165
-#define __NR_umask 166
-#define __NR_prctl 167
-#define __NR_getcpu 168
-#define __NR_gettimeofday 169
-#define __NR_settimeofday 170
-#define __NR_adjtimex 171
-#define __NR_getpid 172
-#define __NR_getppid 173
-#define __NR_getuid 174
-#define __NR_geteuid 175
-#define __NR_getgid 176
-#define __NR_getegid 177
-#define __NR_gettid 178
-#define __NR_sysinfo 179
-#define __NR_mq_open 180
-#define __NR_mq_unlink 181
-#define __NR_mq_timedsend 182
-#define __NR_mq_timedreceive 183
-#define __NR_mq_notify 184
-#define __NR_mq_getsetattr 185
-#define __NR_msgget 186
-#define __NR_msgctl 187
-#define __NR_msgrcv 188
-#define __NR_msgsnd 189
-#define __NR_semget 190
-#define __NR_semctl 191
-#define __NR_semtimedop 192
-#define __NR_semop 193
-#define __NR_shmget 194
-#define __NR_shmctl 195
-#define __NR_shmat 196
-#define __NR_shmdt 197
-#define __NR_socket 198
-#define __NR_socketpair 199
-#define __NR_bind 200
-#define __NR_listen 201
-#define __NR_accept 202
-#define __NR_connect 203
-#define __NR_getsockname 204
-#define __NR_getpeername 205
-#define __NR_sendto 206
-#define __NR_recvfrom 207
-#define __NR_setsockopt 208
-#define __NR_getsockopt 209
-#define __NR_shutdown 210
-#define __NR_sendmsg 211
-#define __NR_recvmsg 212
-#define __NR_readahead 213
-#define __NR_brk 214
-#define __NR_munmap 215
-#define __NR_mremap 216
-#define __NR_add_key 217
-#define __NR_request_key 218
-#define __NR_keyctl 219
-#define __NR_clone 220
-#define __NR_execve 221
-#define __NR_mmap 222
-#define __NR_fadvise64 223
-#define __NR_swapon 224
-#define __NR_swapoff 225
-#define __NR_mprotect 226
-#define __NR_msync 227
-#define __NR_mlock 228
-#define __NR_munlock 229
-#define __NR_mlockall 230
-#define __NR_munlockall 231
-#define __NR_mincore 232
-#define __NR_madvise 233
-#define __NR_remap_file_pages 234
-#define __NR_mbind 235
-#define __NR_get_mempolicy 236
-#define __NR_set_mempolicy 237
-#define __NR_migrate_pages 238
-#define __NR_move_pages 239
-#define __NR_rt_tgsigqueueinfo 240
-#define __NR_perf_event_open 241
-#define __NR_accept4 242
-#define __NR_recvmmsg 243
-#define __NR_wait4 260
-#define __NR_prlimit64 261
-#define __NR_fanotify_init 262
-#define __NR_fanotify_mark 263
-#define __NR_name_to_handle_at 264
-#define __NR_open_by_handle_at 265
-#define __NR_clock_adjtime 266
-#define __NR_syncfs 267
-#define __NR_setns 268
-#define __NR_sendmmsg 269
-#define __NR_process_vm_readv 270
-#define __NR_process_vm_writev 271
-#define __NR_kcmp 272
-#define __NR_finit_module 273
-#define __NR_sched_setattr 274
-#define __NR_sched_getattr 275
-#define __NR_renameat2 276
-#define __NR_seccomp 277
-#define __NR_getrandom 278
-#define __NR_memfd_create 279
-#define __NR_bpf 280
-#define __NR_execveat 281
-#define __NR_userfaultfd 282
-#define __NR_membarrier 283
-#define __NR_mlock2 284
-#define __NR_copy_file_range 285
-#define __NR_preadv2 286
-#define __NR_pwritev2 287
-#define __NR_pkey_mprotect 288
-#define __NR_pkey_alloc 289
-#define __NR_pkey_free 290
-#define __NR_statx 291
-#define __NR_io_pgetevents 292
-
-#define SYS_io_setup 0
-#define SYS_io_destroy 1
-#define SYS_io_submit 2
-#define SYS_io_cancel 3
-#define SYS_io_getevents 4
-#define SYS_setxattr 5
-#define SYS_lsetxattr 6
-#define SYS_fsetxattr 7
-#define SYS_getxattr 8
-#define SYS_lgetxattr 9
-#define SYS_fgetxattr 10
-#define SYS_listxattr 11
-#define SYS_llistxattr 12
-#define SYS_flistxattr 13
-#define SYS_removexattr 14
-#define SYS_lremovexattr 15
-#define SYS_fremovexattr 16
-#define SYS_getcwd 17
-#define SYS_lookup_dcookie 18
-#define SYS_eventfd2 19
-#define SYS_epoll_create1 20
-#define SYS_epoll_ctl 21
-#define SYS_epoll_pwait 22
-#define SYS_dup 23
-#define SYS_dup3 24
-#define SYS_fcntl 25
-#define SYS_inotify_init1 26
-#define SYS_inotify_add_watch 27
-#define SYS_inotify_rm_watch 28
-#define SYS_ioctl 29
-#define SYS_ioprio_set 30
-#define SYS_ioprio_get 31
-#define SYS_flock 32
-#define SYS_mknodat 33
-#define SYS_mkdirat 34
-#define SYS_unlinkat 35
-#define SYS_symlinkat 36
-#define SYS_linkat 37
-#define SYS_renameat 38
-#define SYS_umount2 39
-#define SYS_mount 40
-#define SYS_pivot_root 41
-#define SYS_nfsservctl 42
-#define SYS_statfs 43
-#define SYS_fstatfs 44
-#define SYS_truncate 45
-#define SYS_ftruncate 46
-#define SYS_fallocate 47
-#define SYS_faccessat 48
-#define SYS_chdir 49
-#define SYS_fchdir 50
-#define SYS_chroot 51
-#define SYS_fchmod 52
-#define SYS_fchmodat 53
-#define SYS_fchownat 54
-#define SYS_fchown 55
-#define SYS_openat 56
-#define SYS_close 57
-#define SYS_vhangup 58
-#define SYS_pipe2 59
-#define SYS_quotactl 60
-#define SYS_getdents64 61
-#define SYS_lseek 62
-#define SYS_read 63
-#define SYS_write 64
-#define SYS_readv 65
-#define SYS_writev 66
-#define SYS_pread64 67
-#define SYS_pwrite64 68
-#define SYS_preadv 69
-#define SYS_pwritev 70
-#define SYS_sendfile 71
-#define SYS_pselect6 72
-#define SYS_ppoll 73
-#define SYS_signalfd4 74
-#define SYS_vmsplice 75
-#define SYS_splice 76
-#define SYS_tee 77
-#define SYS_readlinkat 78
-#define SYS_newfstatat 79
-#define SYS_fstat 80
-#define SYS_sync 81
-#define SYS_fsync 82
-#define SYS_fdatasync 83
-#define SYS_sync_file_range 84
-#define SYS_timerfd_create 85
-#define SYS_timerfd_settime 86
-#define SYS_timerfd_gettime 87
-#define SYS_utimensat 88
-#define SYS_acct 89
-#define SYS_capget 90
-#define SYS_capset 91
-#define SYS_personality 92
-#define SYS_exit 93
-#define SYS_exit_group 94
-#define SYS_waitid 95
-#define SYS_set_tid_address 96
-#define SYS_unshare 97
-#define SYS_futex 98
-#define SYS_set_robust_list 99
-#define SYS_get_robust_list 100
-#define SYS_nanosleep 101
-#define SYS_getitimer 102
-#define SYS_setitimer 103
-#define SYS_kexec_load 104
-#define SYS_init_module 105
-#define SYS_delete_module 106
-#define SYS_timer_create 107
-#define SYS_timer_gettime 108
-#define SYS_timer_getoverrun 109
-#define SYS_timer_settime 110
-#define SYS_timer_delete 111
-#define SYS_clock_settime 112
-#define SYS_clock_gettime 113
-#define SYS_clock_getres 114
-#define SYS_clock_nanosleep 115
-#define SYS_syslog 116
-#define SYS_ptrace 117
-#define SYS_sched_setparam 118
-#define SYS_sched_setscheduler 119
-#define SYS_sched_getscheduler 120
-#define SYS_sched_getparam 121
-#define SYS_sched_setaffinity 122
-#define SYS_sched_getaffinity 123
-#define SYS_sched_yield 124
-#define SYS_sched_get_priority_max 125
-#define SYS_sched_get_priority_min 126
-#define SYS_sched_rr_get_interval 127
-#define SYS_restart_syscall 128
-#define SYS_kill 129
-#define SYS_tkill 130
-#define SYS_tgkill 131
-#define SYS_sigaltstack 132
-#define SYS_rt_sigsuspend 133
-#define SYS_rt_sigaction 134
-#define SYS_rt_sigprocmask 135
-#define SYS_rt_sigpending 136
-#define SYS_rt_sigtimedwait 137
-#define SYS_rt_sigqueueinfo 138
-#define SYS_rt_sigreturn 139
-#define SYS_setpriority 140
-#define SYS_getpriority 141
-#define SYS_reboot 142
-#define SYS_setregid 143
-#define SYS_setgid 144
-#define SYS_setreuid 145
-#define SYS_setuid 146
-#define SYS_setresuid 147
-#define SYS_getresuid 148
-#define SYS_setresgid 149
-#define SYS_getresgid 150
-#define SYS_setfsuid 151
-#define SYS_setfsgid 152
-#define SYS_times 153
-#define SYS_setpgid 154
-#define SYS_getpgid 155
-#define SYS_getsid 156
-#define SYS_setsid 157
-#define SYS_getgroups 158
-#define SYS_setgroups 159
-#define SYS_uname 160
-#define SYS_sethostname 161
-#define SYS_setdomainname 162
-#define SYS_getrlimit 163
-#define SYS_setrlimit 164
-#define SYS_getrusage 165
-#define SYS_umask 166
-#define SYS_prctl 167
-#define SYS_getcpu 168
-#define SYS_gettimeofday 169
-#define SYS_settimeofday 170
-#define SYS_adjtimex 171
-#define SYS_getpid 172
-#define SYS_getppid 173
-#define SYS_getuid 174
-#define SYS_geteuid 175
-#define SYS_getgid 176
-#define SYS_getegid 177
-#define SYS_gettid 178
-#define SYS_sysinfo 179
-#define SYS_mq_open 180
-#define SYS_mq_unlink 181
-#define SYS_mq_timedsend 182
-#define SYS_mq_timedreceive 183
-#define SYS_mq_notify 184
-#define SYS_mq_getsetattr 185
-#define SYS_msgget 186
-#define SYS_msgctl 187
-#define SYS_msgrcv 188
-#define SYS_msgsnd 189
-#define SYS_semget 190
-#define SYS_semctl 191
-#define SYS_semtimedop 192
-#define SYS_semop 193
-#define SYS_shmget 194
-#define SYS_shmctl 195
-#define SYS_shmat 196
-#define SYS_shmdt 197
-#define SYS_socket 198
-#define SYS_socketpair 199
-#define SYS_bind 200
-#define SYS_listen 201
-#define SYS_accept 202
-#define SYS_connect 203
-#define SYS_getsockname 204
-#define SYS_getpeername 205
-#define SYS_sendto 206
-#define SYS_recvfrom 207
-#define SYS_setsockopt 208
-#define SYS_getsockopt 209
-#define SYS_shutdown 210
-#define SYS_sendmsg 211
-#define SYS_recvmsg 212
-#define SYS_readahead 213
-#define SYS_brk 214
-#define SYS_munmap 215
-#define SYS_mremap 216
-#define SYS_add_key 217
-#define SYS_request_key 218
-#define SYS_keyctl 219
-#define SYS_clone 220
-#define SYS_execve 221
-#define SYS_mmap 222
-#define SYS_fadvise64 223
-#define SYS_swapon 224
-#define SYS_swapoff 225
-#define SYS_mprotect 226
-#define SYS_msync 227
-#define SYS_mlock 228
-#define SYS_munlock 229
-#define SYS_mlockall 230
-#define SYS_munlockall 231
-#define SYS_mincore 232
-#define SYS_madvise 233
-#define SYS_remap_file_pages 234
-#define SYS_mbind 235
-#define SYS_get_mempolicy 236
-#define SYS_set_mempolicy 237
-#define SYS_migrate_pages 238
-#define SYS_move_pages 239
-#define SYS_rt_tgsigqueueinfo 240
-#define SYS_perf_event_open 241
-#define SYS_accept4 242
-#define SYS_recvmmsg 243
-#define SYS_wait4 260
-#define SYS_prlimit64 261
-#define SYS_fanotify_init 262
-#define SYS_fanotify_mark 263
-#define SYS_name_to_handle_at 264
-#define SYS_open_by_handle_at 265
-#define SYS_clock_adjtime 266
-#define SYS_syncfs 267
-#define SYS_setns 268
-#define SYS_sendmmsg 269
-#define SYS_process_vm_readv 270
-#define SYS_process_vm_writev 271
-#define SYS_kcmp 272
-#define SYS_finit_module 273
-#define SYS_sched_setattr 274
-#define SYS_sched_getattr 275
-#define SYS_renameat2 276
-#define SYS_seccomp 277
-#define SYS_getrandom 278
-#define SYS_memfd_create 279
-#define SYS_bpf 280
-#define SYS_execveat 281
-#define SYS_userfaultfd 282
-#define SYS_membarrier 283
-#define SYS_mlock2 284
-#define SYS_copy_file_range 285
-#define SYS_preadv2 286
-#define SYS_pwritev2 287
-#define SYS_pkey_mprotect 288
-#define SYS_pkey_alloc 289
-#define SYS_pkey_free 290
-#define SYS_statx 291
-#define SYS_io_pgetevents 292
\ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/user.h b/lib/libc/include/aarch64_be-linux-musl/bits/user.h
deleted file mode 100644
index 2bd9dd5863c38e6fd0e8fea73f71e049972b975a..0000000000000000000000000000000000000000
--- a/lib/libc/include/aarch64_be-linux-musl/bits/user.h
+++ /dev/null
@@ -1,16 +0,0 @@
-struct user_regs_struct {
- unsigned long long regs[31];
- unsigned long long sp;
- unsigned long long pc;
- unsigned long long pstate;
-};
-
-struct user_fpsimd_struct {
- long double vregs[32];
- unsigned int fpsr;
- unsigned int fpcr;
-};
-
-#define ELF_NREG 34
-typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NREG];
-typedef struct user_fpsimd_struct elf_fpregset_t;
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musl/bits/endian.h b/lib/libc/include/arm-linux-musl/bits/endian.h
new file mode 100644
index 0000000000000000000000000000000000000000..e4d86deb111d15b2e331e364e12649ec8155d03b
--- /dev/null
+++ b/lib/libc/include/arm-linux-musl/bits/endian.h
@@ -0,0 +1,5 @@
+#if __ARMEB__
+#define __BYTE_ORDER __BIG_ENDIAN
+#else
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musl/bits/fcntl.h b/lib/libc/include/arm-linux-musl/bits/fcntl.h
new file mode 100644
index 0000000000000000000000000000000000000000..2408640910a08a79b5dc06ebb934bff061d6f89f
--- /dev/null
+++ b/lib/libc/include/arm-linux-musl/bits/fcntl.h
@@ -0,0 +1,40 @@
+#define O_CREAT 0100
+#define O_EXCL 0200
+#define O_NOCTTY 0400
+#define O_TRUNC 01000
+#define O_APPEND 02000
+#define O_NONBLOCK 04000
+#define O_DSYNC 010000
+#define O_SYNC 04010000
+#define O_RSYNC 04010000
+#define O_DIRECTORY 040000
+#define O_NOFOLLOW 0100000
+#define O_CLOEXEC 02000000
+
+#define O_ASYNC 020000
+#define O_DIRECT 0200000
+#define O_LARGEFILE 0400000
+#define O_NOATIME 01000000
+#define O_PATH 010000000
+#define O_TMPFILE 020040000
+#define O_NDELAY O_NONBLOCK
+
+#define F_DUPFD 0
+#define F_GETFD 1
+#define F_SETFD 2
+#define F_GETFL 3
+#define F_SETFL 4
+
+#define F_SETOWN 8
+#define F_GETOWN 9
+#define F_SETSIG 10
+#define F_GETSIG 11
+
+#define F_GETLK 12
+#define F_SETLK 13
+#define F_SETLKW 14
+
+#define F_SETOWN_EX 15
+#define F_GETOWN_EX 16
+
+#define F_GETOWNER_UIDS 17
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musl/bits/fenv.h b/lib/libc/include/arm-linux-musl/bits/fenv.h
new file mode 100644
index 0000000000000000000000000000000000000000..54d7b35962e871058df1e47c3f8fe8a14f0b2038
--- /dev/null
+++ b/lib/libc/include/arm-linux-musl/bits/fenv.h
@@ -0,0 +1,23 @@
+#ifndef __ARM_PCS_VFP
+#define FE_ALL_EXCEPT 0
+#define FE_TONEAREST 0
+#else
+#define FE_INVALID 1
+#define FE_DIVBYZERO 2
+#define FE_OVERFLOW 4
+#define FE_UNDERFLOW 8
+#define FE_INEXACT 16
+#define FE_ALL_EXCEPT 31
+#define FE_TONEAREST 0
+#define FE_DOWNWARD 0x800000
+#define FE_UPWARD 0x400000
+#define FE_TOWARDZERO 0xc00000
+#endif
+
+typedef unsigned long fexcept_t;
+
+typedef struct {
+ unsigned long __cw;
+} fenv_t;
+
+#define FE_DFL_ENV ((const fenv_t *) -1)
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musl/bits/hwcap.h b/lib/libc/include/arm-linux-musl/bits/hwcap.h
new file mode 100644
index 0000000000000000000000000000000000000000..c1c1fb1683d7710287af82ec59c42e27149eebf0
--- /dev/null
+++ b/lib/libc/include/arm-linux-musl/bits/hwcap.h
@@ -0,0 +1,53 @@
+#define HWCAP_SWP (1 << 0)
+#define HWCAP_HALF (1 << 1)
+#define HWCAP_THUMB (1 << 2)
+#define HWCAP_26BIT (1 << 3)
+#define HWCAP_FAST_MULT (1 << 4)
+#define HWCAP_FPA (1 << 5)
+#define HWCAP_VFP (1 << 6)
+#define HWCAP_EDSP (1 << 7)
+#define HWCAP_JAVA (1 << 8)
+#define HWCAP_IWMMXT (1 << 9)
+#define HWCAP_CRUNCH (1 << 10)
+#define HWCAP_THUMBEE (1 << 11)
+#define HWCAP_NEON (1 << 12)
+#define HWCAP_VFPv3 (1 << 13)
+#define HWCAP_VFPv3D16 (1 << 14)
+#define HWCAP_TLS (1 << 15)
+#define HWCAP_VFPv4 (1 << 16)
+#define HWCAP_IDIVA (1 << 17)
+#define HWCAP_IDIVT (1 << 18)
+#define HWCAP_VFPD32 (1 << 19)
+#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)
+#define HWCAP_LPAE (1 << 20)
+#define HWCAP_EVTSTRM (1 << 21)
+
+#define HWCAP2_AES (1 << 0)
+#define HWCAP2_PMULL (1 << 1)
+#define HWCAP2_SHA1 (1 << 2)
+#define HWCAP2_SHA2 (1 << 3)
+#define HWCAP2_CRC32 (1 << 4)
+
+#define HWCAP_ARM_SWP (1 << 0)
+#define HWCAP_ARM_HALF (1 << 1)
+#define HWCAP_ARM_THUMB (1 << 2)
+#define HWCAP_ARM_26BIT (1 << 3)
+#define HWCAP_ARM_FAST_MULT (1 << 4)
+#define HWCAP_ARM_FPA (1 << 5)
+#define HWCAP_ARM_VFP (1 << 6)
+#define HWCAP_ARM_EDSP (1 << 7)
+#define HWCAP_ARM_JAVA (1 << 8)
+#define HWCAP_ARM_IWMMXT (1 << 9)
+#define HWCAP_ARM_CRUNCH (1 << 10)
+#define HWCAP_ARM_THUMBEE (1 << 11)
+#define HWCAP_ARM_NEON (1 << 12)
+#define HWCAP_ARM_VFPv3 (1 << 13)
+#define HWCAP_ARM_VFPv3D16 (1 << 14)
+#define HWCAP_ARM_TLS (1 << 15)
+#define HWCAP_ARM_VFPv4 (1 << 16)
+#define HWCAP_ARM_IDIVA (1 << 17)
+#define HWCAP_ARM_IDIVT (1 << 18)
+#define HWCAP_ARM_VFPD32 (1 << 19)
+#define HWCAP_ARM_IDIV (HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT)
+#define HWCAP_ARM_LPAE (1 << 20)
+#define HWCAP_ARM_EVTSTRM (1 << 21)
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musl/bits/ioctl_fix.h b/lib/libc/include/arm-linux-musl/bits/ioctl_fix.h
new file mode 100644
index 0000000000000000000000000000000000000000..9c177f7679e4ddf3a89e03a984cc3cd45476d773
--- /dev/null
+++ b/lib/libc/include/arm-linux-musl/bits/ioctl_fix.h
@@ -0,0 +1,2 @@
+#undef FIOQSIZE
+#define FIOQSIZE 0x545e
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musl/bits/msg.h b/lib/libc/include/arm-linux-musl/bits/msg.h
new file mode 100644
index 0000000000000000000000000000000000000000..e5c8ba75208c2ed80da66995f1afe78fdab39893
--- /dev/null
+++ b/lib/libc/include/arm-linux-musl/bits/msg.h
@@ -0,0 +1,15 @@
+struct msqid_ds {
+ struct ipc_perm msg_perm;
+ time_t msg_stime;
+ int __unused1;
+ time_t msg_rtime;
+ int __unused2;
+ time_t msg_ctime;
+ int __unused3;
+ unsigned long msg_cbytes;
+ msgqnum_t msg_qnum;
+ msglen_t msg_qbytes;
+ pid_t msg_lspid;
+ pid_t msg_lrpid;
+ unsigned long __unused[2];
+};
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musl/bits/ptrace.h b/lib/libc/include/arm-linux-musl/bits/ptrace.h
new file mode 100644
index 0000000000000000000000000000000000000000..cd96d836f1fdae143f8b0faa5ea72695152b995f
--- /dev/null
+++ b/lib/libc/include/arm-linux-musl/bits/ptrace.h
@@ -0,0 +1,25 @@
+#define PTRACE_GETWMMXREGS 18
+#define PTRACE_SETWMMXREGS 19
+#define PTRACE_GET_THREAD_AREA 22
+#define PTRACE_SET_SYSCALL 23
+#define PTRACE_GETCRUNCHREGS 25
+#define PTRACE_SETCRUNCHREGS 26
+#define PTRACE_GETVFPREGS 27
+#define PTRACE_SETVFPREGS 28
+#define PTRACE_GETHBPREGS 29
+#define PTRACE_SETHBPREGS 30
+#define PTRACE_GETFDPIC 31
+#define PTRACE_GETFDPIC_EXEC 0
+#define PTRACE_GETFDPIC_INTERP 1
+
+#define PT_GETWMMXREGS PTRACE_GETWMMXREGS
+#define PT_SETWMMXREGS PTRACE_SETWMMXREGS
+#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
+#define PT_SET_SYSCALL PTRACE_SET_SYSCALL
+#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS
+#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS
+#define PT_GETVFPREGS PTRACE_GETVFPREGS
+#define PT_SETVFPREGS PTRACE_SETVFPREGS
+#define PT_GETHBPREGS PTRACE_GETHBPREGS
+#define PT_SETHBPREGS PTRACE_SETHBPREGS
+#define PT_GETFDPIC PTRACE_GETFDPIC
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musl/bits/setjmp.h b/lib/libc/include/arm-linux-musl/bits/setjmp.h
new file mode 100644
index 0000000000000000000000000000000000000000..2d8f0ef3dcc7587f133de9ed73a25a742e6b6036
--- /dev/null
+++ b/lib/libc/include/arm-linux-musl/bits/setjmp.h
@@ -0,0 +1 @@
+typedef unsigned long long __jmp_buf[32];
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musl/bits/shm.h b/lib/libc/include/arm-linux-musl/bits/shm.h
new file mode 100644
index 0000000000000000000000000000000000000000..aa5587127ab24a71b87e7bef5946234c46a9c916
--- /dev/null
+++ b/lib/libc/include/arm-linux-musl/bits/shm.h
@@ -0,0 +1,27 @@
+#define SHMLBA 4096
+
+struct shmid_ds {
+ struct ipc_perm shm_perm;
+ size_t shm_segsz;
+ time_t shm_atime;
+ int __unused1;
+ time_t shm_dtime;
+ int __unused2;
+ time_t shm_ctime;
+ int __unused3;
+ pid_t shm_cpid;
+ pid_t shm_lpid;
+ unsigned long shm_nattch;
+ unsigned long __pad1;
+ unsigned long __pad2;
+};
+
+struct shminfo {
+ unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
+};
+
+struct shm_info {
+ int __used_ids;
+ unsigned long shm_tot, shm_rss, shm_swp;
+ unsigned long __swap_attempts, __swap_successes;
+};
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musl/bits/signal.h b/lib/libc/include/arm-linux-musl/bits/signal.h
new file mode 100644
index 0000000000000000000000000000000000000000..1c6a679ed42a73bc3a9f5fe00d6c7e78361952f4
--- /dev/null
+++ b/lib/libc/include/arm-linux-musl/bits/signal.h
@@ -0,0 +1,86 @@
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define MINSIGSTKSZ 2048
+#define SIGSTKSZ 8192
+#endif
+
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+typedef int greg_t, gregset_t[18];
+typedef struct sigcontext {
+ unsigned long trap_no, error_code, oldmask;
+ unsigned long arm_r0, arm_r1, arm_r2, arm_r3;
+ unsigned long arm_r4, arm_r5, arm_r6, arm_r7;
+ unsigned long arm_r8, arm_r9, arm_r10, arm_fp;
+ unsigned long arm_ip, arm_sp, arm_lr, arm_pc;
+ unsigned long arm_cpsr, fault_address;
+} mcontext_t;
+#else
+typedef struct {
+ unsigned long __regs[21];
+} mcontext_t;
+#endif
+
+struct sigaltstack {
+ void *ss_sp;
+ int ss_flags;
+ size_t ss_size;
+};
+
+typedef struct __ucontext {
+ unsigned long uc_flags;
+ struct __ucontext *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ sigset_t uc_sigmask;
+ unsigned long long uc_regspace[64];
+} ucontext_t;
+
+#define SA_NOCLDSTOP 1
+#define SA_NOCLDWAIT 2
+#define SA_SIGINFO 4
+#define SA_ONSTACK 0x08000000
+#define SA_RESTART 0x10000000
+#define SA_NODEFER 0x40000000
+#define SA_RESETHAND 0x80000000
+#define SA_RESTORER 0x04000000
+
+#endif
+
+#define SIGHUP 1
+#define SIGINT 2
+#define SIGQUIT 3
+#define SIGILL 4
+#define SIGTRAP 5
+#define SIGABRT 6
+#define SIGIOT SIGABRT
+#define SIGBUS 7
+#define SIGFPE 8
+#define SIGKILL 9
+#define SIGUSR1 10
+#define SIGSEGV 11
+#define SIGUSR2 12
+#define SIGPIPE 13
+#define SIGALRM 14
+#define SIGTERM 15
+#define SIGSTKFLT 16
+#define SIGCHLD 17
+#define SIGCONT 18
+#define SIGSTOP 19
+#define SIGTSTP 20
+#define SIGTTIN 21
+#define SIGTTOU 22
+#define SIGURG 23
+#define SIGXCPU 24
+#define SIGXFSZ 25
+#define SIGVTALRM 26
+#define SIGPROF 27
+#define SIGWINCH 28
+#define SIGIO 29
+#define SIGPOLL 29
+#define SIGPWR 30
+#define SIGSYS 31
+#define SIGUNUSED SIGSYS
+
+#define _NSIG 65
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musl/bits/stdint.h b/lib/libc/include/arm-linux-musl/bits/stdint.h
new file mode 100644
index 0000000000000000000000000000000000000000..b70a87dc9d5868de097ab14ec47980f3980e9e65
--- /dev/null
+++ b/lib/libc/include/arm-linux-musl/bits/stdint.h
@@ -0,0 +1,20 @@
+typedef int32_t int_fast16_t;
+typedef int32_t int_fast32_t;
+typedef uint32_t uint_fast16_t;
+typedef uint32_t uint_fast32_t;
+
+#define INT_FAST16_MIN INT32_MIN
+#define INT_FAST32_MIN INT32_MIN
+
+#define INT_FAST16_MAX INT32_MAX
+#define INT_FAST32_MAX INT32_MAX
+
+#define UINT_FAST16_MAX UINT32_MAX
+#define UINT_FAST32_MAX UINT32_MAX
+
+#define INTPTR_MIN INT32_MIN
+#define INTPTR_MAX INT32_MAX
+#define UINTPTR_MAX UINT32_MAX
+#define PTRDIFF_MIN INT32_MIN
+#define PTRDIFF_MAX INT32_MAX
+#define SIZE_MAX UINT32_MAX
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musl/bits/user.h b/lib/libc/include/arm-linux-musl/bits/user.h
new file mode 100644
index 0000000000000000000000000000000000000000..cd3b3fdc6a0660d219a3d66249bb14ee37cc832c
--- /dev/null
+++ b/lib/libc/include/arm-linux-musl/bits/user.h
@@ -0,0 +1,36 @@
+typedef struct user_fpregs {
+ struct fp_reg {
+ unsigned sign1:1;
+ unsigned unused:15;
+ unsigned sign2:1;
+ unsigned exponent:14;
+ unsigned j:1;
+ unsigned mantissa1:31;
+ unsigned mantissa0:32;
+ } fpregs[8];
+ unsigned fpsr:32;
+ unsigned fpcr:32;
+ unsigned char ftype[8];
+ unsigned int init_flag;
+} elf_fpregset_t;
+
+struct user_regs {
+ unsigned long uregs[18];
+};
+#define ELF_NGREG 18
+typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG];
+
+struct user {
+ struct user_regs regs;
+ int u_fpvalid;
+ unsigned long u_tsize, u_dsize, u_ssize;
+ unsigned long start_code, start_stack;
+ long signal;
+ int reserved;
+ struct user_regs *u_ar0;
+ unsigned long magic;
+ char u_comm[32];
+ int u_debugreg[8];
+ struct user_fpregs u_fp;
+ struct user_fpregs *u_fp0;
+};
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabi/bfd.h b/lib/libc/include/arm-linux-musleabi/bfd.h
deleted file mode 100644
index 73d2dccfe27dcdd2c636e967e661b2ff7a035116..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabi/bfd.h
+++ /dev/null
@@ -1,8034 +0,0 @@
-/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
- generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
- "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
- "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
- "linker.c", "simple.c" and "compress.c".
- Run "make headers" in your build bfd/ to regenerate. */
-
-/* Main header file for the bfd library -- portable access to object files.
-
- Copyright (C) 1990-2019 Free Software Foundation, Inc.
-
- Contributed by Cygnus Support.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef __BFD_H_SEEN__
-#define __BFD_H_SEEN__
-
-/* PR 14072: Ensure that config.h is included first. */
-#if !defined PACKAGE && !defined PACKAGE_VERSION
-#error config.h must be included before this header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ansidecl.h"
-#include "symcat.h"
-#include "bfd_stdint.h"
-#include "diagnostics.h"
-#include
-#include
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#ifndef SABER
-/* This hack is to avoid a problem with some strict ANSI C preprocessors.
- The problem is, "32_" is not a valid preprocessing token, and we don't
- want extra underscores (e.g., "nlm_32_"). The XCONCAT2 macro will
- cause the inner CONCAT2 macros to be evaluated first, producing
- still-valid pp-tokens. Then the final concatenation can be done. */
-#undef CONCAT4
-#define CONCAT4(a,b,c,d) XCONCAT2(CONCAT2(a,b),CONCAT2(c,d))
-#endif
-#endif
-
-/* This is a utility macro to handle the situation where the code
- wants to place a constant string into the code, followed by a
- comma and then the length of the string. Doing this by hand
- is error prone, so using this macro is safer. */
-#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
-/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
- to create the arguments to another macro, since the preprocessor
- will mis-count the number of arguments to the outer macro (by not
- evaluating STRING_COMMA_LEN and so missing the comma). This is a
- problem for example when trying to use STRING_COMMA_LEN to build
- the arguments to the strncmp() macro. Hence this alternative
- definition of strncmp is provided here.
-
- Note - these macros do NOT work if STR2 is not a constant string. */
-#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
- /* strcpy() can have a similar problem, but since we know we are
- copying a constant string, we can use memcpy which will be faster
- since there is no need to check for a NUL byte inside STR. We
- can also save time if we do not need to copy the terminating NUL. */
-#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
-#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
-
-
-#define BFD_SUPPORTS_PLUGINS 1
-
-/* The word size used by BFD on the host. This may be 64 with a 32
- bit target if the host is 64 bit, or if other 64 bit targets have
- been selected with --enable-targets, or if --enable-64-bit-bfd. */
-#define BFD_ARCH_SIZE 32
-
-/* The word size of the default bfd target. */
-#define BFD_DEFAULT_TARGET_SIZE 32
-
-#define BFD_HOST_64BIT_LONG 0
-#define BFD_HOST_64BIT_LONG_LONG 1
-#if 1
-#define BFD_HOST_64_BIT long long
-#define BFD_HOST_U_64_BIT unsigned long long
-typedef BFD_HOST_64_BIT bfd_int64_t;
-typedef BFD_HOST_U_64_BIT bfd_uint64_t;
-#endif
-
-#ifdef HAVE_INTTYPES_H
-# include
-#else
-# if BFD_HOST_64BIT_LONG
-# define BFD_PRI64 "l"
-# elif defined (__MSVCRT__)
-# define BFD_PRI64 "I64"
-# else
-# define BFD_PRI64 "ll"
-# endif
-# undef PRId64
-# define PRId64 BFD_PRI64 "d"
-# undef PRIu64
-# define PRIu64 BFD_PRI64 "u"
-# undef PRIx64
-# define PRIx64 BFD_PRI64 "x"
-#endif
-
-#if BFD_ARCH_SIZE >= 64
-#define BFD64
-#endif
-
-#ifndef INLINE
-#if __GNUC__ >= 2
-#define INLINE __inline__
-#else
-#define INLINE
-#endif
-#endif
-
-/* Declaring a type wide enough to hold a host long and a host pointer. */
-#define BFD_HOSTPTR_T unsigned long
-typedef BFD_HOSTPTR_T bfd_hostptr_t;
-
-/* Forward declaration. */
-typedef struct bfd bfd;
-
-/* Boolean type used in bfd. Too many systems define their own
- versions of "boolean" for us to safely typedef a "boolean" of
- our own. Using an enum for "bfd_boolean" has its own set of
- problems, with strange looking casts required to avoid warnings
- on some older compilers. Thus we just use an int.
-
- General rule: Functions which are bfd_boolean return TRUE on
- success and FALSE on failure (unless they're a predicate). */
-
-typedef int bfd_boolean;
-#undef FALSE
-#undef TRUE
-#define FALSE 0
-#define TRUE 1
-
-#ifdef BFD64
-
-#ifndef BFD_HOST_64_BIT
- #error No 64 bit integer type available
-#endif /* ! defined (BFD_HOST_64_BIT) */
-
-typedef BFD_HOST_U_64_BIT bfd_vma;
-typedef BFD_HOST_64_BIT bfd_signed_vma;
-typedef BFD_HOST_U_64_BIT bfd_size_type;
-typedef BFD_HOST_U_64_BIT symvalue;
-
-#if BFD_HOST_64BIT_LONG
-#define BFD_VMA_FMT "l"
-#elif defined (__MSVCRT__)
-#define BFD_VMA_FMT "I64"
-#else
-#define BFD_VMA_FMT "ll"
-#endif
-
-#ifndef fprintf_vma
-#define sprintf_vma(s,x) sprintf (s, "%016" BFD_VMA_FMT "x", x)
-#define fprintf_vma(f,x) fprintf (f, "%016" BFD_VMA_FMT "x", x)
-#endif
-
-#else /* not BFD64 */
-
-/* Represent a target address. Also used as a generic unsigned type
- which is guaranteed to be big enough to hold any arithmetic types
- we need to deal with. */
-typedef unsigned long bfd_vma;
-
-/* A generic signed type which is guaranteed to be big enough to hold any
- arithmetic types we need to deal with. Can be assumed to be compatible
- with bfd_vma in the same way that signed and unsigned ints are compatible
- (as parameters, in assignment, etc). */
-typedef long bfd_signed_vma;
-
-typedef unsigned long symvalue;
-typedef unsigned long bfd_size_type;
-
-/* Print a bfd_vma x on stream s. */
-#define BFD_VMA_FMT "l"
-#define fprintf_vma(s,x) fprintf (s, "%08" BFD_VMA_FMT "x", x)
-#define sprintf_vma(s,x) sprintf (s, "%08" BFD_VMA_FMT "x", x)
-
-#endif /* not BFD64 */
-
-#define HALF_BFD_SIZE_TYPE \
- (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2))
-
-#ifndef BFD_HOST_64_BIT
-/* Fall back on a 32 bit type. The idea is to make these types always
- available for function return types, but in the case that
- BFD_HOST_64_BIT is undefined such a function should abort or
- otherwise signal an error. */
-typedef bfd_signed_vma bfd_int64_t;
-typedef bfd_vma bfd_uint64_t;
-#endif
-
-/* An offset into a file. BFD always uses the largest possible offset
- based on the build time availability of fseek, fseeko, or fseeko64. */
-typedef BFD_HOST_64_BIT file_ptr;
-typedef unsigned BFD_HOST_64_BIT ufile_ptr;
-
-extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
-extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
-
-#define printf_vma(x) fprintf_vma(stdout,x)
-#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
-
-typedef unsigned int flagword; /* 32 bits of flags */
-typedef unsigned char bfd_byte;
-
-/* File formats. */
-
-typedef enum bfd_format
-{
- bfd_unknown = 0, /* File format is unknown. */
- bfd_object, /* Linker/assembler/compiler output. */
- bfd_archive, /* Object archive file. */
- bfd_core, /* Core dump. */
- bfd_type_end /* Marks the end; don't use it! */
-}
-bfd_format;
-
-/* Symbols and relocation. */
-
-/* A count of carsyms (canonical archive symbols). */
-typedef unsigned long symindex;
-
-#define BFD_NO_MORE_SYMBOLS ((symindex) ~0)
-
-/* General purpose part of a symbol X;
- target specific parts are in libcoff.h, libaout.h, etc. */
-
-#define bfd_get_section(x) ((x)->section)
-#define bfd_get_output_section(x) ((x)->section->output_section)
-#define bfd_set_section(x,y) ((x)->section) = (y)
-#define bfd_asymbol_base(x) ((x)->section->vma)
-#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value)
-#define bfd_asymbol_name(x) ((x)->name)
-/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/
-#define bfd_asymbol_bfd(x) ((x)->the_bfd)
-#define bfd_asymbol_flavour(x) \
- (((x)->flags & BSF_SYNTHETIC) != 0 \
- ? bfd_target_unknown_flavour \
- : bfd_asymbol_bfd (x)->xvec->flavour)
-
-/* A canonical archive symbol. */
-/* This is a type pun with struct ranlib on purpose! */
-typedef struct carsym
-{
- char *name;
- file_ptr file_offset; /* Look here to find the file. */
-}
-carsym; /* To make these you call a carsymogen. */
-
-/* Used in generating armaps (archive tables of contents).
- Perhaps just a forward definition would do? */
-struct orl /* Output ranlib. */
-{
- char **name; /* Symbol name. */
- union
- {
- file_ptr pos;
- bfd *abfd;
- } u; /* bfd* or file position. */
- int namidx; /* Index into string table. */
-};
-
-/* Linenumber stuff. */
-typedef struct lineno_cache_entry
-{
- unsigned int line_number; /* Linenumber from start of function. */
- union
- {
- struct bfd_symbol *sym; /* Function name. */
- bfd_vma offset; /* Offset into section. */
- } u;
-}
-alent;
-
-/* Object and core file sections. */
-typedef struct bfd_section *sec_ptr;
-
-#define align_power(addr, align) \
- (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align))))
-
-/* Align an address upward to a boundary, expressed as a number of bytes.
- E.g. align to an 8-byte boundary with argument of 8. Take care never
- to wrap around if the address is within boundary-1 of the end of the
- address space. */
-#define BFD_ALIGN(this, boundary) \
- ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
- ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \
- : ~ (bfd_vma) 0)
-
-#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name)
-#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma)
-#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma)
-#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \
- (ptr)->alignment_power)
-#define bfd_section_name(bfd, ptr) ((ptr)->name)
-#define bfd_section_size(bfd, ptr) ((ptr)->size)
-#define bfd_get_section_size(ptr) ((ptr)->size)
-#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
-#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
-#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
-#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags)
-#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata)
-
-#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
-
-#define bfd_get_section_limit_octets(bfd, sec) \
- ((bfd)->direction != write_direction && (sec)->rawsize != 0 \
- ? (sec)->rawsize : (sec)->size)
-
-/* Find the address one past the end of SEC. */
-#define bfd_get_section_limit(bfd, sec) \
- (bfd_get_section_limit_octets(bfd, sec) / bfd_octets_per_byte (bfd))
-
-/* Return TRUE if input section SEC has been discarded. */
-#define discarded_section(sec) \
- (!bfd_is_abs_section (sec) \
- && bfd_is_abs_section ((sec)->output_section) \
- && (sec)->sec_info_type != SEC_INFO_TYPE_MERGE \
- && (sec)->sec_info_type != SEC_INFO_TYPE_JUST_SYMS)
-
-typedef enum bfd_print_symbol
-{
- bfd_print_symbol_name,
- bfd_print_symbol_more,
- bfd_print_symbol_all
-} bfd_print_symbol_type;
-
-/* Information about a symbol that nm needs. */
-
-typedef struct _symbol_info
-{
- symvalue value;
- char type;
- const char *name; /* Symbol name. */
- unsigned char stab_type; /* Stab type. */
- char stab_other; /* Stab other. */
- short stab_desc; /* Stab desc. */
- const char *stab_name; /* String for stab type. */
-} symbol_info;
-
-/* Get the name of a stabs type code. */
-
-extern const char *bfd_get_stab_name (int);
-
-/* Hash table routines. There is no way to free up a hash table. */
-
-/* An element in the hash table. Most uses will actually use a larger
- structure, and an instance of this will be the first field. */
-
-struct bfd_hash_entry
-{
- /* Next entry for this hash code. */
- struct bfd_hash_entry *next;
- /* String being hashed. */
- const char *string;
- /* Hash code. This is the full hash code, not the index into the
- table. */
- unsigned long hash;
-};
-
-/* A hash table. */
-
-struct bfd_hash_table
-{
- /* The hash array. */
- struct bfd_hash_entry **table;
- /* A function used to create new elements in the hash table. The
- first entry is itself a pointer to an element. When this
- function is first invoked, this pointer will be NULL. However,
- having the pointer permits a hierarchy of method functions to be
- built each of which calls the function in the superclass. Thus
- each function should be written to allocate a new block of memory
- only if the argument is NULL. */
- struct bfd_hash_entry *(*newfunc)
- (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
- /* An objalloc for this hash table. This is a struct objalloc *,
- but we use void * to avoid requiring the inclusion of objalloc.h. */
- void *memory;
- /* The number of slots in the hash table. */
- unsigned int size;
- /* The number of entries in the hash table. */
- unsigned int count;
- /* The size of elements. */
- unsigned int entsize;
- /* If non-zero, don't grow the hash table. */
- unsigned int frozen:1;
-};
-
-/* Initialize a hash table. */
-extern bfd_boolean bfd_hash_table_init
- (struct bfd_hash_table *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *),
- unsigned int);
-
-/* Initialize a hash table specifying a size. */
-extern bfd_boolean bfd_hash_table_init_n
- (struct bfd_hash_table *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *),
- unsigned int, unsigned int);
-
-/* Free up a hash table. */
-extern void bfd_hash_table_free
- (struct bfd_hash_table *);
-
-/* Look up a string in a hash table. If CREATE is TRUE, a new entry
- will be created for this string if one does not already exist. The
- COPY argument must be TRUE if this routine should copy the string
- into newly allocated memory when adding an entry. */
-extern struct bfd_hash_entry *bfd_hash_lookup
- (struct bfd_hash_table *, const char *, bfd_boolean create,
- bfd_boolean copy);
-
-/* Insert an entry in a hash table. */
-extern struct bfd_hash_entry *bfd_hash_insert
- (struct bfd_hash_table *, const char *, unsigned long);
-
-/* Rename an entry in a hash table. */
-extern void bfd_hash_rename
- (struct bfd_hash_table *, const char *, struct bfd_hash_entry *);
-
-/* Replace an entry in a hash table. */
-extern void bfd_hash_replace
- (struct bfd_hash_table *, struct bfd_hash_entry *old,
- struct bfd_hash_entry *nw);
-
-/* Base method for creating a hash table entry. */
-extern struct bfd_hash_entry *bfd_hash_newfunc
- (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
-
-/* Grab some space for a hash table entry. */
-extern void *bfd_hash_allocate
- (struct bfd_hash_table *, unsigned int);
-
-/* Traverse a hash table in a random order, calling a function on each
- element. If the function returns FALSE, the traversal stops. The
- INFO argument is passed to the function. */
-extern void bfd_hash_traverse
- (struct bfd_hash_table *,
- bfd_boolean (*) (struct bfd_hash_entry *, void *),
- void *info);
-
-/* Allows the default size of a hash table to be configured. New hash
- tables allocated using bfd_hash_table_init will be created with
- this size. */
-extern unsigned long bfd_hash_set_default_size (unsigned long);
-
-/* Types of compressed DWARF debug sections. We currently support
- zlib. */
-enum compressed_debug_section_type
-{
- COMPRESS_DEBUG_NONE = 0,
- COMPRESS_DEBUG = 1 << 0,
- COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1,
- COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2
-};
-
-/* This structure is used to keep track of stabs in sections
- information while linking. */
-
-struct stab_info
-{
- /* A hash table used to hold stabs strings. */
- struct bfd_strtab_hash *strings;
- /* The header file hash table. */
- struct bfd_hash_table includes;
- /* The first .stabstr section. */
- struct bfd_section *stabstr;
-};
-
-#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table
-
-/* User program access to BFD facilities. */
-
-/* Direct I/O routines, for programs which know more about the object
- file than BFD does. Use higher level routines if possible. */
-
-extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *);
-extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *);
-extern int bfd_seek (bfd *, file_ptr, int);
-extern file_ptr bfd_tell (bfd *);
-extern int bfd_flush (bfd *);
-extern int bfd_stat (bfd *, struct stat *);
-
-/* Deprecated old routines. */
-#if __GNUC__
-#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \
- bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \
- bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#else
-#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
- bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
- bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#endif
-extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
-
-/* Cast from const char * to char * so that caller can assign to
- a char * without a warning. */
-#define bfd_get_filename(abfd) ((char *) (abfd)->filename)
-#define bfd_get_cacheable(abfd) ((abfd)->cacheable)
-#define bfd_get_format(abfd) ((abfd)->format)
-#define bfd_get_target(abfd) ((abfd)->xvec->name)
-#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
-#define bfd_family_coff(abfd) \
- (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \
- bfd_get_flavour (abfd) == bfd_target_xcoff_flavour)
-#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
-#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
-#define bfd_header_big_endian(abfd) \
- ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG)
-#define bfd_header_little_endian(abfd) \
- ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE)
-#define bfd_get_file_flags(abfd) ((abfd)->flags)
-#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
-#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
-#define bfd_has_map(abfd) ((abfd)->has_armap)
-#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive)
-
-#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types)
-#define bfd_usrdata(abfd) ((abfd)->usrdata)
-
-#define bfd_get_start_address(abfd) ((abfd)->start_address)
-#define bfd_get_symcount(abfd) ((abfd)->symcount)
-#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols)
-#define bfd_count_sections(abfd) ((abfd)->section_count)
-
-#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount)
-
-#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
-
-extern bfd_boolean bfd_cache_close
- (bfd *abfd);
-/* NB: This declaration should match the autogenerated one in libbfd.h. */
-
-extern bfd_boolean bfd_cache_close_all (void);
-
-extern bfd_boolean bfd_record_phdr
- (bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
- bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
-
-/* Byte swapping routines. */
-
-bfd_uint64_t bfd_getb64 (const void *);
-bfd_uint64_t bfd_getl64 (const void *);
-bfd_int64_t bfd_getb_signed_64 (const void *);
-bfd_int64_t bfd_getl_signed_64 (const void *);
-bfd_vma bfd_getb32 (const void *);
-bfd_vma bfd_getl32 (const void *);
-bfd_signed_vma bfd_getb_signed_32 (const void *);
-bfd_signed_vma bfd_getl_signed_32 (const void *);
-bfd_vma bfd_getb16 (const void *);
-bfd_vma bfd_getl16 (const void *);
-bfd_signed_vma bfd_getb_signed_16 (const void *);
-bfd_signed_vma bfd_getl_signed_16 (const void *);
-void bfd_putb64 (bfd_uint64_t, void *);
-void bfd_putl64 (bfd_uint64_t, void *);
-void bfd_putb32 (bfd_vma, void *);
-void bfd_putl32 (bfd_vma, void *);
-void bfd_putb24 (bfd_vma, void *);
-void bfd_putl24 (bfd_vma, void *);
-void bfd_putb16 (bfd_vma, void *);
-void bfd_putl16 (bfd_vma, void *);
-
-/* Byte swapping routines which take size and endiannes as arguments. */
-
-bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
-void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
-
-#if defined(__STDC__) || defined(ALMOST_STDC)
-struct ecoff_debug_info;
-struct ecoff_debug_swap;
-struct ecoff_extr;
-struct bfd_symbol;
-struct bfd_link_info;
-struct bfd_link_hash_entry;
-struct bfd_section_already_linked;
-struct bfd_elf_version_tree;
-#endif
-
-extern bfd_boolean bfd_section_already_linked_table_init (void);
-extern void bfd_section_already_linked_table_free (void);
-extern bfd_boolean _bfd_handle_already_linked
- (struct bfd_section *, struct bfd_section_already_linked *,
- struct bfd_link_info *);
-
-/* Externally visible ECOFF routines. */
-
-extern bfd_boolean bfd_ecoff_set_gp_value
- (bfd *abfd, bfd_vma gp_value);
-extern bfd_boolean bfd_ecoff_set_regmasks
- (bfd *abfd, unsigned long gprmask, unsigned long fprmask,
- unsigned long *cprmask);
-extern void *bfd_ecoff_debug_init
- (bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
-extern void bfd_ecoff_debug_free
- (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_accumulate
- (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
- struct ecoff_debug_info *input_debug,
- const struct ecoff_debug_swap *input_swap, struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_accumulate_other
- (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
- struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_externals
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap, bfd_boolean relocatable,
- bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *),
- void (*set_index) (struct bfd_symbol *, bfd_size_type));
-extern bfd_boolean bfd_ecoff_debug_one_external
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap, const char *name,
- struct ecoff_extr *esym);
-extern bfd_size_type bfd_ecoff_debug_size
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap);
-extern bfd_boolean bfd_ecoff_write_debug
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap, file_ptr where);
-extern bfd_boolean bfd_ecoff_write_accumulated_debug
- (void *handle, bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap,
- struct bfd_link_info *info, file_ptr where);
-
-/* Externally visible ELF routines. */
-
-struct bfd_link_needed_list
-{
- struct bfd_link_needed_list *next;
- bfd *by;
- const char *name;
-};
-
-enum dynamic_lib_link_class {
- DYN_NORMAL = 0,
- DYN_AS_NEEDED = 1,
- DYN_DT_NEEDED = 2,
- DYN_NO_ADD_NEEDED = 4,
- DYN_NO_NEEDED = 8
-};
-
-enum notice_asneeded_action {
- notice_as_needed,
- notice_not_needed,
- notice_needed
-};
-
-extern bfd_boolean bfd_elf_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
- bfd_boolean);
-extern struct bfd_link_needed_list *bfd_elf_get_needed_list
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_elf_get_bfd_needed_list
- (bfd *, struct bfd_link_needed_list **);
-extern bfd_boolean bfd_elf_stack_segment_size (bfd *, struct bfd_link_info *,
- const char *, bfd_vma);
-extern bfd_boolean bfd_elf_size_dynamic_sections
- (bfd *, const char *, const char *, const char *, const char *, const char *,
- const char * const *, struct bfd_link_info *, struct bfd_section **);
-extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr
- (bfd *, struct bfd_link_info *);
-extern void bfd_elf_set_dt_needed_name
- (bfd *, const char *);
-extern const char *bfd_elf_get_dt_soname
- (bfd *);
-extern void bfd_elf_set_dyn_lib_class
- (bfd *, enum dynamic_lib_link_class);
-extern int bfd_elf_get_dyn_lib_class
- (bfd *);
-extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
- (bfd *, struct bfd_link_info *);
-extern int bfd_elf_discard_info
- (bfd *, struct bfd_link_info *);
-extern unsigned int _bfd_elf_default_action_discarded
- (struct bfd_section *);
-
-/* Return an upper bound on the number of bytes required to store a
- copy of ABFD's program header table entries. Return -1 if an error
- occurs; bfd_get_error will return an appropriate code. */
-extern long bfd_get_elf_phdr_upper_bound
- (bfd *abfd);
-
-/* Copy ABFD's program header table entries to *PHDRS. The entries
- will be stored as an array of Elf_Internal_Phdr structures, as
- defined in include/elf/internal.h. To find out how large the
- buffer needs to be, call bfd_get_elf_phdr_upper_bound.
-
- Return the number of program header table entries read, or -1 if an
- error occurs; bfd_get_error will return an appropriate code. */
-extern int bfd_get_elf_phdrs
- (bfd *abfd, void *phdrs);
-
-/* Create a new BFD as if by bfd_openr. Rather than opening a file,
- reconstruct an ELF file by reading the segments out of remote
- memory based on the ELF file header at EHDR_VMA and the ELF program
- headers it points to. If non-zero, SIZE is the known extent of the
- object. If not null, *LOADBASEP is filled in with the difference
- between the VMAs from which the segments were read, and the VMAs
- the file headers (and hence BFD's idea of each section's VMA) put
- them at.
-
- The function TARGET_READ_MEMORY is called to copy LEN bytes from
- the remote memory at target address VMA into the local buffer at
- MYADDR; it should return zero on success or an `errno' code on
- failure. TEMPL must be a BFD for a target with the word size and
- byte order found in the remote memory. */
-extern bfd *bfd_elf_bfd_from_remote_memory
- (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr,
- bfd_size_type len));
-
-extern struct bfd_section *_bfd_elf_tls_setup
- (bfd *, struct bfd_link_info *);
-
-extern struct bfd_section *
-_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma);
-
-extern void _bfd_fix_excluded_sec_syms
- (bfd *, struct bfd_link_info *);
-
-extern unsigned bfd_m68k_mach_to_features (int);
-
-extern int bfd_m68k_features_to_mach (unsigned);
-
-extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
- char **);
-
-extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
- char **);
-
-extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
- char **);
-
-/* SunOS shared library support routines for the linker. */
-
-extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_sunos_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_sunos_size_dynamic_sections
- (bfd *, struct bfd_link_info *, struct bfd_section **,
- struct bfd_section **, struct bfd_section **);
-
-/* Linux shared library support routines for the linker. */
-
-extern bfd_boolean bfd_i386linux_size_dynamic_sections
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_sparclinux_size_dynamic_sections
- (bfd *, struct bfd_link_info *);
-
-/* mmap hacks */
-
-struct _bfd_window_internal;
-typedef struct _bfd_window_internal bfd_window_internal;
-
-typedef struct _bfd_window
-{
- /* What the user asked for. */
- void *data;
- bfd_size_type size;
- /* The actual window used by BFD. Small user-requested read-only
- regions sharing a page may share a single window into the object
- file. Read-write versions shouldn't until I've fixed things to
- keep track of which portions have been claimed by the
- application; don't want to give the same region back when the
- application wants two writable copies! */
- struct _bfd_window_internal *i;
-}
-bfd_window;
-
-extern void bfd_init_window
- (bfd_window *);
-extern void bfd_free_window
- (bfd_window *);
-extern bfd_boolean bfd_get_file_window
- (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean);
-
-/* XCOFF support routines for the linker. */
-
-extern bfd_boolean bfd_xcoff_split_import_path
- (bfd *, const char *, const char **, const char **);
-extern bfd_boolean bfd_xcoff_set_archive_import_path
- (struct bfd_link_info *, bfd *, const char *);
-extern bfd_boolean bfd_xcoff_link_record_set
- (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
-extern bfd_boolean bfd_xcoff_import_symbol
- (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
- const char *, const char *, const char *, unsigned int);
-extern bfd_boolean bfd_xcoff_export_symbol
- (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
-extern bfd_boolean bfd_xcoff_link_count_reloc
- (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_xcoff_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_xcoff_size_dynamic_sections
- (bfd *, struct bfd_link_info *, const char *, const char *,
- unsigned long, unsigned long, unsigned long, bfd_boolean,
- int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean);
-extern bfd_boolean bfd_xcoff_link_generate_rtinit
- (bfd *, const char *, const char *, bfd_boolean);
-
-/* XCOFF support routines for ar. */
-extern bfd_boolean bfd_xcoff_ar_archive_set_magic
- (bfd *, char *);
-
-/* Externally visible COFF routines. */
-
-#if defined(__STDC__) || defined(ALMOST_STDC)
-struct internal_syment;
-union internal_auxent;
-#endif
-
-extern bfd_boolean bfd_coff_set_symbol_class
- (bfd *, struct bfd_symbol *, unsigned int);
-
-/* ARM VFP11 erratum workaround support. */
-typedef enum
-{
- BFD_ARM_VFP11_FIX_DEFAULT,
- BFD_ARM_VFP11_FIX_NONE,
- BFD_ARM_VFP11_FIX_SCALAR,
- BFD_ARM_VFP11_FIX_VECTOR
-} bfd_arm_vfp11_fix;
-
-extern void bfd_elf32_arm_init_maps
- (bfd *);
-
-extern void bfd_elf32_arm_set_vfp11_fix
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_set_cortex_a8_fix
- (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_vfp11_fix_veneer_locations
- (bfd *, struct bfd_link_info *);
-
-/* ARM STM STM32L4XX erratum workaround support. */
-typedef enum
-{
- BFD_ARM_STM32L4XX_FIX_NONE,
- BFD_ARM_STM32L4XX_FIX_DEFAULT,
- BFD_ARM_STM32L4XX_FIX_ALL
-} bfd_arm_stm32l4xx_fix;
-
-extern void bfd_elf32_arm_set_stm32l4xx_fix
- (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations
- (bfd *, struct bfd_link_info *);
-
-/* ARM Interworking support. Called from linker. */
-extern bfd_boolean bfd_arm_allocate_interworking_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean bfd_arm_process_before_allocation
- (bfd *, struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_arm_get_bfd_for_interworking
- (bfd *, struct bfd_link_info *);
-
-/* PE ARM Interworking support. Called from linker. */
-extern bfd_boolean bfd_arm_pe_allocate_interworking_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean bfd_arm_pe_process_before_allocation
- (bfd *, struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking
- (bfd *, struct bfd_link_info *);
-
-/* ELF ARM Interworking support. Called from linker. */
-extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_process_before_allocation
- (bfd *, struct bfd_link_info *);
-
-struct elf32_arm_params {
- char *thumb_entry_symbol;
- int byteswap_code;
- int target1_is_rel;
- char * target2_type;
- int fix_v4bx;
- int use_blx;
- bfd_arm_vfp11_fix vfp11_denorm_fix;
- bfd_arm_stm32l4xx_fix stm32l4xx_fix;
- int no_enum_size_warning;
- int no_wchar_size_warning;
- int pic_veneer;
- int fix_cortex_a8;
- int fix_arm1176;
- int merge_exidx_entries;
- int cmse_implib;
- bfd *in_implib_bfd;
-};
-
-void bfd_elf32_arm_set_target_params
- (bfd *, struct bfd_link_info *, struct elf32_arm_params *);
-
-extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
- (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_keep_private_stub_output_sections
- (struct bfd_link_info *);
-
-/* ELF ARM mapping symbol support. */
-#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0)
-#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1)
-#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2)
-#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0)
-
-extern bfd_boolean bfd_is_arm_special_symbol_name
- (const char *, int);
-
-extern void bfd_elf32_arm_set_byteswap_code
- (struct bfd_link_info *, int);
-
-extern void bfd_elf32_arm_use_long_plt (void);
-
-/* ARM Note section processing. */
-extern bfd_boolean bfd_arm_merge_machines
- (bfd *, bfd *);
-
-extern bfd_boolean bfd_arm_update_notes
- (bfd *, const char *);
-
-extern unsigned int bfd_arm_get_mach_from_notes
- (bfd *, const char *);
-
-/* ARM stub generation support. Called from the linker. */
-extern int elf32_arm_setup_section_lists
- (bfd *, struct bfd_link_info *);
-extern void elf32_arm_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf32_arm_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *,
- struct bfd_section *, unsigned int),
- void (*) (void));
-extern bfd_boolean elf32_arm_build_stubs
- (struct bfd_link_info *);
-
-/* ARM unwind section editing support. */
-extern bfd_boolean elf32_arm_fix_exidx_coverage
-(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
-
-/* C6x unwind section editing support. */
-extern bfd_boolean elf32_tic6x_fix_exidx_coverage
-(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
-
-extern void bfd_elf64_aarch64_init_maps
- (bfd *);
-
-extern void bfd_elf32_aarch64_init_maps
- (bfd *);
-
-extern void bfd_elf64_aarch64_set_options
- (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
-
-extern void bfd_elf32_aarch64_set_options
- (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
-
-/* ELF AArch64 mapping symbol support. */
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0)
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1)
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2)
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0)
-extern bfd_boolean bfd_is_aarch64_special_symbol_name
- (const char * name, int type);
-
-/* AArch64 stub generation support for ELF64. Called from the linker. */
-extern int elf64_aarch64_setup_section_lists
- (bfd *, struct bfd_link_info *);
-extern void elf64_aarch64_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf64_aarch64_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *),
- void (*) (void));
-extern bfd_boolean elf64_aarch64_build_stubs
- (struct bfd_link_info *);
-/* AArch64 stub generation support for ELF32. Called from the linker. */
-extern int elf32_aarch64_setup_section_lists
- (bfd *, struct bfd_link_info *);
-extern void elf32_aarch64_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf32_aarch64_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *),
- void (*) (void));
-extern bfd_boolean elf32_aarch64_build_stubs
- (struct bfd_link_info *);
-
-
-/* TI COFF load page support. */
-extern void bfd_ticoff_set_section_load_page
- (struct bfd_section *, int);
-
-extern int bfd_ticoff_get_section_load_page
- (struct bfd_section *);
-
-/* H8/300 functions. */
-extern bfd_vma bfd_h8300_pad_address
- (bfd *, bfd_vma);
-
-/* IA64 Itanium code generation. Called from linker. */
-extern void bfd_elf32_ia64_after_parse
- (int);
-
-extern void bfd_elf64_ia64_after_parse
- (int);
-
-/* V850 Note manipulation routines. */
-extern bfd_boolean v850_elf_create_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean v850_elf_set_note
- (bfd *, unsigned int, unsigned int);
-
-/* MIPS ABI flags data access. For the disassembler. */
-struct elf_internal_abiflags_v0;
-extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *);
-
-/* C-SKY functions. */
-extern bfd_boolean elf32_csky_build_stubs
- (struct bfd_link_info *);
-extern bfd_boolean elf32_csky_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section *(*) (const char*, struct bfd_section*),
- void (*) (void));
-extern void elf32_csky_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern int elf32_csky_setup_section_lists
- (bfd *, struct bfd_link_info *);
-/* Extracted from init.c. */
-unsigned int bfd_init (void);
-
-
-/* Value returned by bfd_init. */
-
-#define BFD_INIT_MAGIC (sizeof (struct bfd_section))
-/* Extracted from opncls.c. */
-/* Set to N to open the next N BFDs using an alternate id space. */
-extern unsigned int bfd_use_reserved_id;
-bfd *bfd_fopen (const char *filename, const char *target,
- const char *mode, int fd);
-
-bfd *bfd_openr (const char *filename, const char *target);
-
-bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
-
-bfd *bfd_openstreamr (const char * filename, const char * target,
- void * stream);
-
-bfd *bfd_openr_iovec (const char *filename, const char *target,
- void *(*open_func) (struct bfd *nbfd,
- void *open_closure),
- void *open_closure,
- file_ptr (*pread_func) (struct bfd *nbfd,
- void *stream,
- void *buf,
- file_ptr nbytes,
- file_ptr offset),
- int (*close_func) (struct bfd *nbfd,
- void *stream),
- int (*stat_func) (struct bfd *abfd,
- void *stream,
- struct stat *sb));
-
-bfd *bfd_openw (const char *filename, const char *target);
-
-bfd_boolean bfd_close (bfd *abfd);
-
-bfd_boolean bfd_close_all_done (bfd *);
-
-bfd *bfd_create (const char *filename, bfd *templ);
-
-bfd_boolean bfd_make_writable (bfd *abfd);
-
-bfd_boolean bfd_make_readable (bfd *abfd);
-
-void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
-
-void *bfd_zalloc (bfd *abfd, bfd_size_type wanted);
-
-unsigned long bfd_calc_gnu_debuglink_crc32
- (unsigned long crc, const unsigned char *buf, bfd_size_type len);
-
-char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
-
-char *bfd_get_alt_debug_link_info (bfd * abfd,
- bfd_size_type *buildid_len,
- bfd_byte **buildid_out);
-
-char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
-
-char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir);
-
-struct bfd_section *bfd_create_gnu_debuglink_section
- (bfd *abfd, const char *filename);
-
-bfd_boolean bfd_fill_in_gnu_debuglink_section
- (bfd *abfd, struct bfd_section *sect, const char *filename);
-
-char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir);
-
-/* Extracted from libbfd.c. */
-
-/* Byte swapping macros for user section data. */
-
-#define bfd_put_8(abfd, val, ptr) \
- ((void) (*((unsigned char *) (ptr)) = (val) & 0xff))
-#define bfd_put_signed_8 \
- bfd_put_8
-#define bfd_get_8(abfd, ptr) \
- (*(const unsigned char *) (ptr) & 0xff)
-#define bfd_get_signed_8(abfd, ptr) \
- (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
-
-#define bfd_put_16(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
-#define bfd_put_signed_16 \
- bfd_put_16
-#define bfd_get_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx16, (ptr))
-#define bfd_get_signed_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
-
-#define bfd_put_24(abfd, val, ptr) \
- do \
- if (bfd_big_endian (abfd)) \
- bfd_putb24 ((val), (ptr)); \
- else \
- bfd_putl24 ((val), (ptr)); \
- while (0)
-
-bfd_vma bfd_getb24 (const void *p);
-bfd_vma bfd_getl24 (const void *p);
-
-#define bfd_get_24(abfd, ptr) \
- (bfd_big_endian (abfd) ? bfd_getb24 (ptr) : bfd_getl24 (ptr))
-
-#define bfd_put_32(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
-#define bfd_put_signed_32 \
- bfd_put_32
-#define bfd_get_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx32, (ptr))
-#define bfd_get_signed_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_32, (ptr))
-
-#define bfd_put_64(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx64, ((val), (ptr)))
-#define bfd_put_signed_64 \
- bfd_put_64
-#define bfd_get_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx64, (ptr))
-#define bfd_get_signed_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
-
-#define bfd_get(bits, abfd, ptr) \
- ((bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr) \
- : (bits) == 16 ? bfd_get_16 (abfd, ptr) \
- : (bits) == 32 ? bfd_get_32 (abfd, ptr) \
- : (bits) == 64 ? bfd_get_64 (abfd, ptr) \
- : (abort (), (bfd_vma) - 1))
-
-#define bfd_put(bits, abfd, val, ptr) \
- ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
- : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
- : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
- : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
- : (abort (), (void) 0))
-
-
-/* Byte swapping macros for file header data. */
-
-#define bfd_h_put_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
-#define bfd_h_put_signed_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
-#define bfd_h_get_8(abfd, ptr) \
- bfd_get_8 (abfd, ptr)
-#define bfd_h_get_signed_8(abfd, ptr) \
- bfd_get_signed_8 (abfd, ptr)
-
-#define bfd_h_put_16(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
-#define bfd_h_put_signed_16 \
- bfd_h_put_16
-#define bfd_h_get_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx16, (ptr))
-#define bfd_h_get_signed_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
-
-#define bfd_h_put_32(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
-#define bfd_h_put_signed_32 \
- bfd_h_put_32
-#define bfd_h_get_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx32, (ptr))
-#define bfd_h_get_signed_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
-
-#define bfd_h_put_64(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
-#define bfd_h_put_signed_64 \
- bfd_h_put_64
-#define bfd_h_get_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx64, (ptr))
-#define bfd_h_get_signed_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
-
-/* Aliases for the above, which should eventually go away. */
-
-#define H_PUT_64 bfd_h_put_64
-#define H_PUT_32 bfd_h_put_32
-#define H_PUT_16 bfd_h_put_16
-#define H_PUT_8 bfd_h_put_8
-#define H_PUT_S64 bfd_h_put_signed_64
-#define H_PUT_S32 bfd_h_put_signed_32
-#define H_PUT_S16 bfd_h_put_signed_16
-#define H_PUT_S8 bfd_h_put_signed_8
-#define H_GET_64 bfd_h_get_64
-#define H_GET_32 bfd_h_get_32
-#define H_GET_16 bfd_h_get_16
-#define H_GET_8 bfd_h_get_8
-#define H_GET_S64 bfd_h_get_signed_64
-#define H_GET_S32 bfd_h_get_signed_32
-#define H_GET_S16 bfd_h_get_signed_16
-#define H_GET_S8 bfd_h_get_signed_8
-
-
-/* Extracted from bfdio.c. */
-long bfd_get_mtime (bfd *abfd);
-
-ufile_ptr bfd_get_size (bfd *abfd);
-
-ufile_ptr bfd_get_file_size (bfd *abfd);
-
-void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
- int prot, int flags, file_ptr offset,
- void **map_addr, bfd_size_type *map_len);
-
-/* Extracted from bfdwin.c. */
-/* Extracted from section.c. */
-
-typedef struct bfd_section
-{
- /* The name of the section; the name isn't a copy, the pointer is
- the same as that passed to bfd_make_section. */
- const char *name;
-
- /* A unique sequence number. */
- unsigned int id;
-
- /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
- unsigned int index;
-
- /* The next section in the list belonging to the BFD, or NULL. */
- struct bfd_section *next;
-
- /* The previous section in the list belonging to the BFD, or NULL. */
- struct bfd_section *prev;
-
- /* The field flags contains attributes of the section. Some
- flags are read in from the object file, and some are
- synthesized from other information. */
- flagword flags;
-
-#define SEC_NO_FLAGS 0x0
-
- /* Tells the OS to allocate space for this section when loading.
- This is clear for a section containing debug information only. */
-#define SEC_ALLOC 0x1
-
- /* Tells the OS to load the section from the file when loading.
- This is clear for a .bss section. */
-#define SEC_LOAD 0x2
-
- /* The section contains data still to be relocated, so there is
- some relocation information too. */
-#define SEC_RELOC 0x4
-
- /* A signal to the OS that the section contains read only data. */
-#define SEC_READONLY 0x8
-
- /* The section contains code only. */
-#define SEC_CODE 0x10
-
- /* The section contains data only. */
-#define SEC_DATA 0x20
-
- /* The section will reside in ROM. */
-#define SEC_ROM 0x40
-
- /* The section contains constructor information. This section
- type is used by the linker to create lists of constructors and
- destructors used by <>. When a back end sees a symbol
- which should be used in a constructor list, it creates a new
- section for the type of name (e.g., <<__CTOR_LIST__>>), attaches
- the symbol to it, and builds a relocation. To build the lists
- of constructors, all the linker has to do is catenate all the
- sections called <<__CTOR_LIST__>> and relocate the data
- contained within - exactly the operations it would peform on
- standard data. */
-#define SEC_CONSTRUCTOR 0x80
-
- /* The section has contents - a data section could be
- <> | <>; a debug section could be
- <> */
-#define SEC_HAS_CONTENTS 0x100
-
- /* An instruction to the linker to not output the section
- even if it has information which would normally be written. */
-#define SEC_NEVER_LOAD 0x200
-
- /* The section contains thread local data. */
-#define SEC_THREAD_LOCAL 0x400
-
- /* The section's size is fixed. Generic linker code will not
- recalculate it and it is up to whoever has set this flag to
- get the size right. */
-#define SEC_FIXED_SIZE 0x800
-
- /* The section contains common symbols (symbols may be defined
- multiple times, the value of a symbol is the amount of
- space it requires, and the largest symbol value is the one
- used). Most targets have exactly one of these (which we
- translate to bfd_com_section_ptr), but ECOFF has two. */
-#define SEC_IS_COMMON 0x1000
-
- /* The section contains only debugging information. For
- example, this is set for ELF .debug and .stab sections.
- strip tests this flag to see if a section can be
- discarded. */
-#define SEC_DEBUGGING 0x2000
-
- /* The contents of this section are held in memory pointed to
- by the contents field. This is checked by bfd_get_section_contents,
- and the data is retrieved from memory if appropriate. */
-#define SEC_IN_MEMORY 0x4000
-
- /* The contents of this section are to be excluded by the
- linker for executable and shared objects unless those
- objects are to be further relocated. */
-#define SEC_EXCLUDE 0x8000
-
- /* The contents of this section are to be sorted based on the sum of
- the symbol and addend values specified by the associated relocation
- entries. Entries without associated relocation entries will be
- appended to the end of the section in an unspecified order. */
-#define SEC_SORT_ENTRIES 0x10000
-
- /* When linking, duplicate sections of the same name should be
- discarded, rather than being combined into a single section as
- is usually done. This is similar to how common symbols are
- handled. See SEC_LINK_DUPLICATES below. */
-#define SEC_LINK_ONCE 0x20000
-
- /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
- should handle duplicate sections. */
-#define SEC_LINK_DUPLICATES 0xc0000
-
- /* This value for SEC_LINK_DUPLICATES means that duplicate
- sections with the same name should simply be discarded. */
-#define SEC_LINK_DUPLICATES_DISCARD 0x0
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if there are any duplicate sections, although
- it should still only link one copy. */
-#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections are a different size. */
-#define SEC_LINK_DUPLICATES_SAME_SIZE 0x80000
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections contain different
- contents. */
-#define SEC_LINK_DUPLICATES_SAME_CONTENTS \
- (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
-
- /* This section was created by the linker as part of dynamic
- relocation or other arcane processing. It is skipped when
- going through the first-pass output, trusting that someone
- else up the line will take care of it later. */
-#define SEC_LINKER_CREATED 0x100000
-
- /* This section should not be subject to garbage collection.
- Also set to inform the linker that this section should not be
- listed in the link map as discarded. */
-#define SEC_KEEP 0x200000
-
- /* This section contains "short" data, and should be placed
- "near" the GP. */
-#define SEC_SMALL_DATA 0x400000
-
- /* Attempt to merge identical entities in the section.
- Entity size is given in the entsize field. */
-#define SEC_MERGE 0x800000
-
- /* If given with SEC_MERGE, entities to merge are zero terminated
- strings where entsize specifies character size instead of fixed
- size entries. */
-#define SEC_STRINGS 0x1000000
-
- /* This section contains data about section groups. */
-#define SEC_GROUP 0x2000000
-
- /* The section is a COFF shared library section. This flag is
- only for the linker. If this type of section appears in
- the input file, the linker must copy it to the output file
- without changing the vma or size. FIXME: Although this
- was originally intended to be general, it really is COFF
- specific (and the flag was renamed to indicate this). It
- might be cleaner to have some more general mechanism to
- allow the back end to control what the linker does with
- sections. */
-#define SEC_COFF_SHARED_LIBRARY 0x4000000
-
- /* This input section should be copied to output in reverse order
- as an array of pointers. This is for ELF linker internal use
- only. */
-#define SEC_ELF_REVERSE_COPY 0x4000000
-
- /* This section contains data which may be shared with other
- executables or shared objects. This is for COFF only. */
-#define SEC_COFF_SHARED 0x8000000
-
- /* This section should be compressed. This is for ELF linker
- internal use only. */
-#define SEC_ELF_COMPRESS 0x8000000
-
- /* When a section with this flag is being linked, then if the size of
- the input section is less than a page, it should not cross a page
- boundary. If the size of the input section is one page or more,
- it should be aligned on a page boundary. This is for TI
- TMS320C54X only. */
-#define SEC_TIC54X_BLOCK 0x10000000
-
- /* This section should be renamed. This is for ELF linker
- internal use only. */
-#define SEC_ELF_RENAME 0x10000000
-
- /* Conditionally link this section; do not link if there are no
- references found to any symbol in the section. This is for TI
- TMS320C54X only. */
-#define SEC_TIC54X_CLINK 0x20000000
-
- /* This section contains vliw code. This is for Toshiba MeP only. */
-#define SEC_MEP_VLIW 0x20000000
-
- /* Indicate that section has the no read flag set. This happens
- when memory read flag isn't set. */
-#define SEC_COFF_NOREAD 0x40000000
-
- /* Indicate that section has the purecode flag set. */
-#define SEC_ELF_PURECODE 0x80000000
-
- /* End of section flags. */
-
- /* Some internal packed boolean fields. */
-
- /* See the vma field. */
- unsigned int user_set_vma : 1;
-
- /* A mark flag used by some of the linker backends. */
- unsigned int linker_mark : 1;
-
- /* Another mark flag used by some of the linker backends. Set for
- output sections that have an input section. */
- unsigned int linker_has_input : 1;
-
- /* Mark flag used by some linker backends for garbage collection. */
- unsigned int gc_mark : 1;
-
- /* Section compression status. */
- unsigned int compress_status : 2;
-#define COMPRESS_SECTION_NONE 0
-#define COMPRESS_SECTION_DONE 1
-#define DECOMPRESS_SECTION_SIZED 2
-
- /* The following flags are used by the ELF linker. */
-
- /* Mark sections which have been allocated to segments. */
- unsigned int segment_mark : 1;
-
- /* Type of sec_info information. */
- unsigned int sec_info_type:3;
-#define SEC_INFO_TYPE_NONE 0
-#define SEC_INFO_TYPE_STABS 1
-#define SEC_INFO_TYPE_MERGE 2
-#define SEC_INFO_TYPE_EH_FRAME 3
-#define SEC_INFO_TYPE_JUST_SYMS 4
-#define SEC_INFO_TYPE_TARGET 5
-#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6
-
- /* Nonzero if this section uses RELA relocations, rather than REL. */
- unsigned int use_rela_p:1;
-
- /* Bits used by various backends. The generic code doesn't touch
- these fields. */
-
- unsigned int sec_flg0:1;
- unsigned int sec_flg1:1;
- unsigned int sec_flg2:1;
- unsigned int sec_flg3:1;
- unsigned int sec_flg4:1;
- unsigned int sec_flg5:1;
-
- /* End of internal packed boolean fields. */
-
- /* The virtual memory address of the section - where it will be
- at run time. The symbols are relocated against this. The
- user_set_vma flag is maintained by bfd; if it's not set, the
- backend can assign addresses (for example, in <>, where
- the default address for <<.data>> is dependent on the specific
- target and various flags). */
- bfd_vma vma;
-
- /* The load address of the section - where it would be in a
- rom image; really only used for writing section header
- information. */
- bfd_vma lma;
-
- /* The size of the section in *octets*, as it will be output.
- Contains a value even if the section has no contents (e.g., the
- size of <<.bss>>). */
- bfd_size_type size;
-
- /* For input sections, the original size on disk of the section, in
- octets. This field should be set for any section whose size is
- changed by linker relaxation. It is required for sections where
- the linker relaxation scheme doesn't cache altered section and
- reloc contents (stabs, eh_frame, SEC_MERGE, some coff relaxing
- targets), and thus the original size needs to be kept to read the
- section multiple times. For output sections, rawsize holds the
- section size calculated on a previous linker relaxation pass. */
- bfd_size_type rawsize;
-
- /* The compressed size of the section in octets. */
- bfd_size_type compressed_size;
-
- /* Relaxation table. */
- struct relax_table *relax;
-
- /* Count of used relaxation table entries. */
- int relax_count;
-
-
- /* If this section is going to be output, then this value is the
- offset in *bytes* into the output section of the first byte in the
- input section (byte ==> smallest addressable unit on the
- target). In most cases, if this was going to start at the
- 100th octet (8-bit quantity) in the output section, this value
- would be 100. However, if the target byte size is 16 bits
- (bfd_octets_per_byte is "2"), this value would be 50. */
- bfd_vma output_offset;
-
- /* The output section through which to map on output. */
- struct bfd_section *output_section;
-
- /* The alignment requirement of the section, as an exponent of 2 -
- e.g., 3 aligns to 2^3 (or 8). */
- unsigned int alignment_power;
-
- /* If an input section, a pointer to a vector of relocation
- records for the data in this section. */
- struct reloc_cache_entry *relocation;
-
- /* If an output section, a pointer to a vector of pointers to
- relocation records for the data in this section. */
- struct reloc_cache_entry **orelocation;
-
- /* The number of relocation records in one of the above. */
- unsigned reloc_count;
-
- /* Information below is back end specific - and not always used
- or updated. */
-
- /* File position of section data. */
- file_ptr filepos;
-
- /* File position of relocation info. */
- file_ptr rel_filepos;
-
- /* File position of line data. */
- file_ptr line_filepos;
-
- /* Pointer to data for applications. */
- void *userdata;
-
- /* If the SEC_IN_MEMORY flag is set, this points to the actual
- contents. */
- unsigned char *contents;
-
- /* Attached line number information. */
- alent *lineno;
-
- /* Number of line number records. */
- unsigned int lineno_count;
-
- /* Entity size for merging purposes. */
- unsigned int entsize;
-
- /* Points to the kept section if this section is a link-once section,
- and is discarded. */
- struct bfd_section *kept_section;
-
- /* When a section is being output, this value changes as more
- linenumbers are written out. */
- file_ptr moving_line_filepos;
-
- /* What the section number is in the target world. */
- int target_index;
-
- void *used_by_bfd;
-
- /* If this is a constructor section then here is a list of the
- relocations created to relocate items within it. */
- struct relent_chain *constructor_chain;
-
- /* The BFD which owns the section. */
- bfd *owner;
-
- /* A symbol which points at this section only. */
- struct bfd_symbol *symbol;
- struct bfd_symbol **symbol_ptr_ptr;
-
- /* Early in the link process, map_head and map_tail are used to build
- a list of input sections attached to an output section. Later,
- output sections use these fields for a list of bfd_link_order
- structs. */
- union {
- struct bfd_link_order *link_order;
- struct bfd_section *s;
- } map_head, map_tail;
-} asection;
-
-/* Relax table contains information about instructions which can
- be removed by relaxation -- replacing a long address with a
- short address. */
-struct relax_table {
- /* Address where bytes may be deleted. */
- bfd_vma addr;
-
- /* Number of bytes to be deleted. */
- int size;
-};
-
-/* Note: the following are provided as inline functions rather than macros
- because not all callers use the return value. A macro implementation
- would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
- compilers will complain about comma expressions that have no effect. */
-static inline bfd_boolean
-bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr,
- void * val)
-{
- ptr->userdata = val;
- return TRUE;
-}
-
-static inline bfd_boolean
-bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
-{
- ptr->vma = ptr->lma = val;
- ptr->user_set_vma = TRUE;
- return TRUE;
-}
-
-static inline bfd_boolean
-bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr,
- unsigned int val)
-{
- ptr->alignment_power = val;
- return TRUE;
-}
-
-/* These sections are global, and are managed by BFD. The application
- and target back end are not permitted to change the values in
- these sections. */
-extern asection _bfd_std_section[4];
-
-#define BFD_ABS_SECTION_NAME "*ABS*"
-#define BFD_UND_SECTION_NAME "*UND*"
-#define BFD_COM_SECTION_NAME "*COM*"
-#define BFD_IND_SECTION_NAME "*IND*"
-
-/* Pointer to the common section. */
-#define bfd_com_section_ptr (&_bfd_std_section[0])
-/* Pointer to the undefined section. */
-#define bfd_und_section_ptr (&_bfd_std_section[1])
-/* Pointer to the absolute section. */
-#define bfd_abs_section_ptr (&_bfd_std_section[2])
-/* Pointer to the indirect section. */
-#define bfd_ind_section_ptr (&_bfd_std_section[3])
-
-#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
-#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
-#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
-
-#define bfd_is_const_section(SEC) \
- ( ((SEC) == bfd_abs_section_ptr) \
- || ((SEC) == bfd_und_section_ptr) \
- || ((SEC) == bfd_com_section_ptr) \
- || ((SEC) == bfd_ind_section_ptr))
-
-/* Macros to handle insertion and deletion of a bfd's sections. These
- only handle the list pointers, ie. do not adjust section_count,
- target_index etc. */
-#define bfd_section_list_remove(ABFD, S) \
- do \
- { \
- asection *_s = S; \
- asection *_next = _s->next; \
- asection *_prev = _s->prev; \
- if (_prev) \
- _prev->next = _next; \
- else \
- (ABFD)->sections = _next; \
- if (_next) \
- _next->prev = _prev; \
- else \
- (ABFD)->section_last = _prev; \
- } \
- while (0)
-#define bfd_section_list_append(ABFD, S) \
- do \
- { \
- asection *_s = S; \
- bfd *_abfd = ABFD; \
- _s->next = NULL; \
- if (_abfd->section_last) \
- { \
- _s->prev = _abfd->section_last; \
- _abfd->section_last->next = _s; \
- } \
- else \
- { \
- _s->prev = NULL; \
- _abfd->sections = _s; \
- } \
- _abfd->section_last = _s; \
- } \
- while (0)
-#define bfd_section_list_prepend(ABFD, S) \
- do \
- { \
- asection *_s = S; \
- bfd *_abfd = ABFD; \
- _s->prev = NULL; \
- if (_abfd->sections) \
- { \
- _s->next = _abfd->sections; \
- _abfd->sections->prev = _s; \
- } \
- else \
- { \
- _s->next = NULL; \
- _abfd->section_last = _s; \
- } \
- _abfd->sections = _s; \
- } \
- while (0)
-#define bfd_section_list_insert_after(ABFD, A, S) \
- do \
- { \
- asection *_a = A; \
- asection *_s = S; \
- asection *_next = _a->next; \
- _s->next = _next; \
- _s->prev = _a; \
- _a->next = _s; \
- if (_next) \
- _next->prev = _s; \
- else \
- (ABFD)->section_last = _s; \
- } \
- while (0)
-#define bfd_section_list_insert_before(ABFD, B, S) \
- do \
- { \
- asection *_b = B; \
- asection *_s = S; \
- asection *_prev = _b->prev; \
- _s->prev = _prev; \
- _s->next = _b; \
- _b->prev = _s; \
- if (_prev) \
- _prev->next = _s; \
- else \
- (ABFD)->sections = _s; \
- } \
- while (0)
-#define bfd_section_removed_from_list(ABFD, S) \
- ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
-
-#define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS) \
- /* name, id, index, next, prev, flags, user_set_vma, */ \
- { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \
- \
- /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \
- 0, 0, 1, 0, \
- \
- /* segment_mark, sec_info_type, use_rela_p, */ \
- 0, 0, 0, \
- \
- /* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5, */ \
- 0, 0, 0, 0, 0, 0, \
- \
- /* vma, lma, size, rawsize, compressed_size, relax, relax_count, */ \
- 0, 0, 0, 0, 0, 0, 0, \
- \
- /* output_offset, output_section, alignment_power, */ \
- 0, &SEC, 0, \
- \
- /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
- NULL, NULL, 0, 0, 0, \
- \
- /* line_filepos, userdata, contents, lineno, lineno_count, */ \
- 0, NULL, NULL, NULL, 0, \
- \
- /* entsize, kept_section, moving_line_filepos, */ \
- 0, NULL, 0, \
- \
- /* target_index, used_by_bfd, constructor_chain, owner, */ \
- 0, NULL, NULL, NULL, \
- \
- /* symbol, symbol_ptr_ptr, */ \
- (struct bfd_symbol *) SYM, &SEC.symbol, \
- \
- /* map_head, map_tail */ \
- { NULL }, { NULL } \
- }
-
-/* We use a macro to initialize the static asymbol structures because
- traditional C does not permit us to initialize a union member while
- gcc warns if we don't initialize it.
- the_bfd, name, value, attr, section [, udata] */
-#ifdef __STDC__
-#define GLOBAL_SYM_INIT(NAME, SECTION) \
- { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }}
-#else
-#define GLOBAL_SYM_INIT(NAME, SECTION) \
- { 0, NAME, 0, BSF_SECTION_SYM, SECTION }
-#endif
-
-void bfd_section_list_clear (bfd *);
-
-asection *bfd_get_section_by_name (bfd *abfd, const char *name);
-
-asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec);
-
-asection *bfd_get_linker_section (bfd *abfd, const char *name);
-
-asection *bfd_get_section_by_name_if
- (bfd *abfd,
- const char *name,
- bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-
-char *bfd_get_unique_section_name
- (bfd *abfd, const char *templat, int *count);
-
-asection *bfd_make_section_old_way (bfd *abfd, const char *name);
-
-asection *bfd_make_section_anyway_with_flags
- (bfd *abfd, const char *name, flagword flags);
-
-asection *bfd_make_section_anyway (bfd *abfd, const char *name);
-
-asection *bfd_make_section_with_flags
- (bfd *, const char *name, flagword flags);
-
-asection *bfd_make_section (bfd *, const char *name);
-
-bfd_boolean bfd_set_section_flags
- (bfd *abfd, asection *sec, flagword flags);
-
-void bfd_rename_section
- (bfd *abfd, asection *sec, const char *newname);
-
-void bfd_map_over_sections
- (bfd *abfd,
- void (*func) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-
-asection *bfd_sections_find_if
- (bfd *abfd,
- bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-
-bfd_boolean bfd_set_section_size
- (bfd *abfd, asection *sec, bfd_size_type val);
-
-bfd_boolean bfd_set_section_contents
- (bfd *abfd, asection *section, const void *data,
- file_ptr offset, bfd_size_type count);
-
-bfd_boolean bfd_get_section_contents
- (bfd *abfd, asection *section, void *location, file_ptr offset,
- bfd_size_type count);
-
-bfd_boolean bfd_malloc_and_get_section
- (bfd *abfd, asection *section, bfd_byte **buf);
-
-bfd_boolean bfd_copy_private_section_data
- (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
-
-#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
- BFD_SEND (obfd, _bfd_copy_private_section_data, \
- (ibfd, isection, obfd, osection))
-bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
-
-bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
-
-/* Extracted from archures.c. */
-enum bfd_architecture
-{
- bfd_arch_unknown, /* File arch not known. */
- bfd_arch_obscure, /* Arch known, not one of these. */
- bfd_arch_m68k, /* Motorola 68xxx. */
-#define bfd_mach_m68000 1
-#define bfd_mach_m68008 2
-#define bfd_mach_m68010 3
-#define bfd_mach_m68020 4
-#define bfd_mach_m68030 5
-#define bfd_mach_m68040 6
-#define bfd_mach_m68060 7
-#define bfd_mach_cpu32 8
-#define bfd_mach_fido 9
-#define bfd_mach_mcf_isa_a_nodiv 10
-#define bfd_mach_mcf_isa_a 11
-#define bfd_mach_mcf_isa_a_mac 12
-#define bfd_mach_mcf_isa_a_emac 13
-#define bfd_mach_mcf_isa_aplus 14
-#define bfd_mach_mcf_isa_aplus_mac 15
-#define bfd_mach_mcf_isa_aplus_emac 16
-#define bfd_mach_mcf_isa_b_nousp 17
-#define bfd_mach_mcf_isa_b_nousp_mac 18
-#define bfd_mach_mcf_isa_b_nousp_emac 19
-#define bfd_mach_mcf_isa_b 20
-#define bfd_mach_mcf_isa_b_mac 21
-#define bfd_mach_mcf_isa_b_emac 22
-#define bfd_mach_mcf_isa_b_float 23
-#define bfd_mach_mcf_isa_b_float_mac 24
-#define bfd_mach_mcf_isa_b_float_emac 25
-#define bfd_mach_mcf_isa_c 26
-#define bfd_mach_mcf_isa_c_mac 27
-#define bfd_mach_mcf_isa_c_emac 28
-#define bfd_mach_mcf_isa_c_nodiv 29
-#define bfd_mach_mcf_isa_c_nodiv_mac 30
-#define bfd_mach_mcf_isa_c_nodiv_emac 31
- bfd_arch_vax, /* DEC Vax. */
-
- bfd_arch_or1k, /* OpenRISC 1000. */
-#define bfd_mach_or1k 1
-#define bfd_mach_or1knd 2
-
- bfd_arch_sparc, /* SPARC. */
-#define bfd_mach_sparc 1
-/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
-#define bfd_mach_sparc_sparclet 2
-#define bfd_mach_sparc_sparclite 3
-#define bfd_mach_sparc_v8plus 4
-#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */
-#define bfd_mach_sparc_sparclite_le 6
-#define bfd_mach_sparc_v9 7
-#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */
-#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */
-#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */
-#define bfd_mach_sparc_v8plusc 11 /* with UA2005 and T1 add'ns. */
-#define bfd_mach_sparc_v9c 12 /* with UA2005 and T1 add'ns. */
-#define bfd_mach_sparc_v8plusd 13 /* with UA2007 and T3 add'ns. */
-#define bfd_mach_sparc_v9d 14 /* with UA2007 and T3 add'ns. */
-#define bfd_mach_sparc_v8pluse 15 /* with OSA2001 and T4 add'ns (no IMA). */
-#define bfd_mach_sparc_v9e 16 /* with OSA2001 and T4 add'ns (no IMA). */
-#define bfd_mach_sparc_v8plusv 17 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
-#define bfd_mach_sparc_v9v 18 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
-#define bfd_mach_sparc_v8plusm 19 /* with OSA2015 and M7 add'ns. */
-#define bfd_mach_sparc_v9m 20 /* with OSA2015 and M7 add'ns. */
-#define bfd_mach_sparc_v8plusm8 21 /* with OSA2017 and M8 add'ns. */
-#define bfd_mach_sparc_v9m8 22 /* with OSA2017 and M8 add'ns. */
-/* Nonzero if MACH has the v9 instruction set. */
-#define bfd_mach_sparc_v9_p(mach) \
- ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9m8 \
- && (mach) != bfd_mach_sparc_sparclite_le)
-/* Nonzero if MACH is a 64 bit sparc architecture. */
-#define bfd_mach_sparc_64bit_p(mach) \
- ((mach) >= bfd_mach_sparc_v9 \
- && (mach) != bfd_mach_sparc_v8plusb \
- && (mach) != bfd_mach_sparc_v8plusc \
- && (mach) != bfd_mach_sparc_v8plusd \
- && (mach) != bfd_mach_sparc_v8pluse \
- && (mach) != bfd_mach_sparc_v8plusv \
- && (mach) != bfd_mach_sparc_v8plusm \
- && (mach) != bfd_mach_sparc_v8plusm8)
- bfd_arch_spu, /* PowerPC SPU. */
-#define bfd_mach_spu 256
- bfd_arch_mips, /* MIPS Rxxxx. */
-#define bfd_mach_mips3000 3000
-#define bfd_mach_mips3900 3900
-#define bfd_mach_mips4000 4000
-#define bfd_mach_mips4010 4010
-#define bfd_mach_mips4100 4100
-#define bfd_mach_mips4111 4111
-#define bfd_mach_mips4120 4120
-#define bfd_mach_mips4300 4300
-#define bfd_mach_mips4400 4400
-#define bfd_mach_mips4600 4600
-#define bfd_mach_mips4650 4650
-#define bfd_mach_mips5000 5000
-#define bfd_mach_mips5400 5400
-#define bfd_mach_mips5500 5500
-#define bfd_mach_mips5900 5900
-#define bfd_mach_mips6000 6000
-#define bfd_mach_mips7000 7000
-#define bfd_mach_mips8000 8000
-#define bfd_mach_mips9000 9000
-#define bfd_mach_mips10000 10000
-#define bfd_mach_mips12000 12000
-#define bfd_mach_mips14000 14000
-#define bfd_mach_mips16000 16000
-#define bfd_mach_mips16 16
-#define bfd_mach_mips5 5
-#define bfd_mach_mips_loongson_2e 3001
-#define bfd_mach_mips_loongson_2f 3002
-#define bfd_mach_mips_gs464 3003
-#define bfd_mach_mips_gs464e 3004
-#define bfd_mach_mips_gs264e 3005
-#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01. */
-#define bfd_mach_mips_octeon 6501
-#define bfd_mach_mips_octeonp 6601
-#define bfd_mach_mips_octeon2 6502
-#define bfd_mach_mips_octeon3 6503
-#define bfd_mach_mips_xlr 887682 /* decimal 'XLR'. */
-#define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2'. */
-#define bfd_mach_mipsisa32 32
-#define bfd_mach_mipsisa32r2 33
-#define bfd_mach_mipsisa32r3 34
-#define bfd_mach_mipsisa32r5 36
-#define bfd_mach_mipsisa32r6 37
-#define bfd_mach_mipsisa64 64
-#define bfd_mach_mipsisa64r2 65
-#define bfd_mach_mipsisa64r3 66
-#define bfd_mach_mipsisa64r5 68
-#define bfd_mach_mipsisa64r6 69
-#define bfd_mach_mips_micromips 96
- bfd_arch_i386, /* Intel 386. */
-#define bfd_mach_i386_intel_syntax (1 << 0)
-#define bfd_mach_i386_i8086 (1 << 1)
-#define bfd_mach_i386_i386 (1 << 2)
-#define bfd_mach_x86_64 (1 << 3)
-#define bfd_mach_x64_32 (1 << 4)
-#define bfd_mach_i386_i386_intel_syntax (bfd_mach_i386_i386 | bfd_mach_i386_intel_syntax)
-#define bfd_mach_x86_64_intel_syntax (bfd_mach_x86_64 | bfd_mach_i386_intel_syntax)
-#define bfd_mach_x64_32_intel_syntax (bfd_mach_x64_32 | bfd_mach_i386_intel_syntax)
- bfd_arch_l1om, /* Intel L1OM. */
-#define bfd_mach_l1om (1 << 5)
-#define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax)
- bfd_arch_k1om, /* Intel K1OM. */
-#define bfd_mach_k1om (1 << 6)
-#define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax)
-#define bfd_mach_i386_nacl (1 << 7)
-#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl)
-#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl)
-#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl)
- bfd_arch_iamcu, /* Intel MCU. */
-#define bfd_mach_iamcu (1 << 8)
-#define bfd_mach_i386_iamcu (bfd_mach_i386_i386 | bfd_mach_iamcu)
-#define bfd_mach_i386_iamcu_intel_syntax (bfd_mach_i386_iamcu | bfd_mach_i386_intel_syntax)
- bfd_arch_romp, /* IBM ROMP PC/RT. */
- bfd_arch_convex, /* Convex. */
- bfd_arch_m98k, /* Motorola 98xxx. */
- bfd_arch_pyramid, /* Pyramid Technology. */
- bfd_arch_h8300, /* Renesas H8/300 (formerly Hitachi H8/300). */
-#define bfd_mach_h8300 1
-#define bfd_mach_h8300h 2
-#define bfd_mach_h8300s 3
-#define bfd_mach_h8300hn 4
-#define bfd_mach_h8300sn 5
-#define bfd_mach_h8300sx 6
-#define bfd_mach_h8300sxn 7
- bfd_arch_pdp11, /* DEC PDP-11. */
- bfd_arch_plugin,
- bfd_arch_powerpc, /* PowerPC. */
-#define bfd_mach_ppc 32
-#define bfd_mach_ppc64 64
-#define bfd_mach_ppc_403 403
-#define bfd_mach_ppc_403gc 4030
-#define bfd_mach_ppc_405 405
-#define bfd_mach_ppc_505 505
-#define bfd_mach_ppc_601 601
-#define bfd_mach_ppc_602 602
-#define bfd_mach_ppc_603 603
-#define bfd_mach_ppc_ec603e 6031
-#define bfd_mach_ppc_604 604
-#define bfd_mach_ppc_620 620
-#define bfd_mach_ppc_630 630
-#define bfd_mach_ppc_750 750
-#define bfd_mach_ppc_860 860
-#define bfd_mach_ppc_a35 35
-#define bfd_mach_ppc_rs64ii 642
-#define bfd_mach_ppc_rs64iii 643
-#define bfd_mach_ppc_7400 7400
-#define bfd_mach_ppc_e500 500
-#define bfd_mach_ppc_e500mc 5001
-#define bfd_mach_ppc_e500mc64 5005
-#define bfd_mach_ppc_e5500 5006
-#define bfd_mach_ppc_e6500 5007
-#define bfd_mach_ppc_titan 83
-#define bfd_mach_ppc_vle 84
- bfd_arch_rs6000, /* IBM RS/6000. */
-#define bfd_mach_rs6k 6000
-#define bfd_mach_rs6k_rs1 6001
-#define bfd_mach_rs6k_rsc 6003
-#define bfd_mach_rs6k_rs2 6002
- bfd_arch_hppa, /* HP PA RISC. */
-#define bfd_mach_hppa10 10
-#define bfd_mach_hppa11 11
-#define bfd_mach_hppa20 20
-#define bfd_mach_hppa20w 25
- bfd_arch_d10v, /* Mitsubishi D10V. */
-#define bfd_mach_d10v 1
-#define bfd_mach_d10v_ts2 2
-#define bfd_mach_d10v_ts3 3
- bfd_arch_d30v, /* Mitsubishi D30V. */
- bfd_arch_dlx, /* DLX. */
- bfd_arch_m68hc11, /* Motorola 68HC11. */
- bfd_arch_m68hc12, /* Motorola 68HC12. */
-#define bfd_mach_m6812_default 0
-#define bfd_mach_m6812 1
-#define bfd_mach_m6812s 2
- bfd_arch_m9s12x, /* Freescale S12X. */
- bfd_arch_m9s12xg, /* Freescale XGATE. */
- bfd_arch_s12z, /* Freescale S12Z. */
-#define bfd_mach_s12z_default 0
- bfd_arch_z8k, /* Zilog Z8000. */
-#define bfd_mach_z8001 1
-#define bfd_mach_z8002 2
- bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */
-#define bfd_mach_sh 1
-#define bfd_mach_sh2 0x20
-#define bfd_mach_sh_dsp 0x2d
-#define bfd_mach_sh2a 0x2a
-#define bfd_mach_sh2a_nofpu 0x2b
-#define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
-#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2
-#define bfd_mach_sh2a_or_sh4 0x2a3
-#define bfd_mach_sh2a_or_sh3e 0x2a4
-#define bfd_mach_sh2e 0x2e
-#define bfd_mach_sh3 0x30
-#define bfd_mach_sh3_nommu 0x31
-#define bfd_mach_sh3_dsp 0x3d
-#define bfd_mach_sh3e 0x3e
-#define bfd_mach_sh4 0x40
-#define bfd_mach_sh4_nofpu 0x41
-#define bfd_mach_sh4_nommu_nofpu 0x42
-#define bfd_mach_sh4a 0x4a
-#define bfd_mach_sh4a_nofpu 0x4b
-#define bfd_mach_sh4al_dsp 0x4d
- bfd_arch_alpha, /* Dec Alpha. */
-#define bfd_mach_alpha_ev4 0x10
-#define bfd_mach_alpha_ev5 0x20
-#define bfd_mach_alpha_ev6 0x30
- bfd_arch_arm, /* Advanced Risc Machines ARM. */
-#define bfd_mach_arm_unknown 0
-#define bfd_mach_arm_2 1
-#define bfd_mach_arm_2a 2
-#define bfd_mach_arm_3 3
-#define bfd_mach_arm_3M 4
-#define bfd_mach_arm_4 5
-#define bfd_mach_arm_4T 6
-#define bfd_mach_arm_5 7
-#define bfd_mach_arm_5T 8
-#define bfd_mach_arm_5TE 9
-#define bfd_mach_arm_XScale 10
-#define bfd_mach_arm_ep9312 11
-#define bfd_mach_arm_iWMMXt 12
-#define bfd_mach_arm_iWMMXt2 13
-#define bfd_mach_arm_5TEJ 14
-#define bfd_mach_arm_6 15
-#define bfd_mach_arm_6KZ 16
-#define bfd_mach_arm_6T2 17
-#define bfd_mach_arm_6K 18
-#define bfd_mach_arm_7 19
-#define bfd_mach_arm_6M 20
-#define bfd_mach_arm_6SM 21
-#define bfd_mach_arm_7EM 22
-#define bfd_mach_arm_8 23
-#define bfd_mach_arm_8R 24
-#define bfd_mach_arm_8M_BASE 25
-#define bfd_mach_arm_8M_MAIN 26
- bfd_arch_nds32, /* Andes NDS32. */
-#define bfd_mach_n1 1
-#define bfd_mach_n1h 2
-#define bfd_mach_n1h_v2 3
-#define bfd_mach_n1h_v3 4
-#define bfd_mach_n1h_v3m 5
- bfd_arch_ns32k, /* National Semiconductors ns32000. */
- bfd_arch_tic30, /* Texas Instruments TMS320C30. */
- bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */
-#define bfd_mach_tic3x 30
-#define bfd_mach_tic4x 40
- bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */
- bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */
- bfd_arch_tic80, /* TI TMS320c80 (MVP). */
- bfd_arch_v850, /* NEC V850. */
- bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */
-#define bfd_mach_v850 1
-#define bfd_mach_v850e 'E'
-#define bfd_mach_v850e1 '1'
-#define bfd_mach_v850e2 0x4532
-#define bfd_mach_v850e2v3 0x45325633
-#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */
- bfd_arch_arc, /* ARC Cores. */
-#define bfd_mach_arc_a4 0
-#define bfd_mach_arc_a5 1
-#define bfd_mach_arc_arc600 2
-#define bfd_mach_arc_arc601 4
-#define bfd_mach_arc_arc700 3
-#define bfd_mach_arc_arcv2 5
- bfd_arch_m32c, /* Renesas M16C/M32C. */
-#define bfd_mach_m16c 0x75
-#define bfd_mach_m32c 0x78
- bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */
-#define bfd_mach_m32r 1 /* For backwards compatibility. */
-#define bfd_mach_m32rx 'x'
-#define bfd_mach_m32r2 '2'
- bfd_arch_mn10200, /* Matsushita MN10200. */
- bfd_arch_mn10300, /* Matsushita MN10300. */
-#define bfd_mach_mn10300 300
-#define bfd_mach_am33 330
-#define bfd_mach_am33_2 332
- bfd_arch_fr30,
-#define bfd_mach_fr30 0x46523330
- bfd_arch_frv,
-#define bfd_mach_frv 1
-#define bfd_mach_frvsimple 2
-#define bfd_mach_fr300 300
-#define bfd_mach_fr400 400
-#define bfd_mach_fr450 450
-#define bfd_mach_frvtomcat 499 /* fr500 prototype. */
-#define bfd_mach_fr500 500
-#define bfd_mach_fr550 550
- bfd_arch_moxie, /* The moxie processor. */
-#define bfd_mach_moxie 1
- bfd_arch_ft32, /* The ft32 processor. */
-#define bfd_mach_ft32 1
-#define bfd_mach_ft32b 2
- bfd_arch_mcore,
- bfd_arch_mep,
-#define bfd_mach_mep 1
-#define bfd_mach_mep_h1 0x6831
-#define bfd_mach_mep_c5 0x6335
- bfd_arch_metag,
-#define bfd_mach_metag 1
- bfd_arch_ia64, /* HP/Intel ia64. */
-#define bfd_mach_ia64_elf64 64
-#define bfd_mach_ia64_elf32 32
- bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */
-#define bfd_mach_ip2022 1
-#define bfd_mach_ip2022ext 2
- bfd_arch_iq2000, /* Vitesse IQ2000. */
-#define bfd_mach_iq2000 1
-#define bfd_mach_iq10 2
- bfd_arch_epiphany, /* Adapteva EPIPHANY. */
-#define bfd_mach_epiphany16 1
-#define bfd_mach_epiphany32 2
- bfd_arch_mt,
-#define bfd_mach_ms1 1
-#define bfd_mach_mrisc2 2
-#define bfd_mach_ms2 3
- bfd_arch_pj,
- bfd_arch_avr, /* Atmel AVR microcontrollers. */
-#define bfd_mach_avr1 1
-#define bfd_mach_avr2 2
-#define bfd_mach_avr25 25
-#define bfd_mach_avr3 3
-#define bfd_mach_avr31 31
-#define bfd_mach_avr35 35
-#define bfd_mach_avr4 4
-#define bfd_mach_avr5 5
-#define bfd_mach_avr51 51
-#define bfd_mach_avr6 6
-#define bfd_mach_avrtiny 100
-#define bfd_mach_avrxmega1 101
-#define bfd_mach_avrxmega2 102
-#define bfd_mach_avrxmega3 103
-#define bfd_mach_avrxmega4 104
-#define bfd_mach_avrxmega5 105
-#define bfd_mach_avrxmega6 106
-#define bfd_mach_avrxmega7 107
- bfd_arch_bfin, /* ADI Blackfin. */
-#define bfd_mach_bfin 1
- bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */
-#define bfd_mach_cr16 1
- bfd_arch_cr16c, /* National Semiconductor CompactRISC. */
-#define bfd_mach_cr16c 1
- bfd_arch_crx, /* National Semiconductor CRX. */
-#define bfd_mach_crx 1
- bfd_arch_cris, /* Axis CRIS. */
-#define bfd_mach_cris_v0_v10 255
-#define bfd_mach_cris_v32 32
-#define bfd_mach_cris_v10_v32 1032
- bfd_arch_riscv,
-#define bfd_mach_riscv32 132
-#define bfd_mach_riscv64 164
- bfd_arch_rl78,
-#define bfd_mach_rl78 0x75
- bfd_arch_rx, /* Renesas RX. */
-#define bfd_mach_rx 0x75
-#define bfd_mach_rx_v2 0x76
-#define bfd_mach_rx_v3 0x77
- bfd_arch_s390, /* IBM s390. */
-#define bfd_mach_s390_31 31
-#define bfd_mach_s390_64 64
- bfd_arch_score, /* Sunplus score. */
-#define bfd_mach_score3 3
-#define bfd_mach_score7 7
- bfd_arch_mmix, /* Donald Knuth's educational processor. */
- bfd_arch_xstormy16,
-#define bfd_mach_xstormy16 1
- bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */
-#define bfd_mach_msp11 11
-#define bfd_mach_msp110 110
-#define bfd_mach_msp12 12
-#define bfd_mach_msp13 13
-#define bfd_mach_msp14 14
-#define bfd_mach_msp15 15
-#define bfd_mach_msp16 16
-#define bfd_mach_msp20 20
-#define bfd_mach_msp21 21
-#define bfd_mach_msp22 22
-#define bfd_mach_msp23 23
-#define bfd_mach_msp24 24
-#define bfd_mach_msp26 26
-#define bfd_mach_msp31 31
-#define bfd_mach_msp32 32
-#define bfd_mach_msp33 33
-#define bfd_mach_msp41 41
-#define bfd_mach_msp42 42
-#define bfd_mach_msp43 43
-#define bfd_mach_msp44 44
-#define bfd_mach_msp430x 45
-#define bfd_mach_msp46 46
-#define bfd_mach_msp47 47
-#define bfd_mach_msp54 54
- bfd_arch_xc16x, /* Infineon's XC16X Series. */
-#define bfd_mach_xc16x 1
-#define bfd_mach_xc16xl 2
-#define bfd_mach_xc16xs 3
- bfd_arch_xgate, /* Freescale XGATE. */
-#define bfd_mach_xgate 1
- bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
-#define bfd_mach_xtensa 1
- bfd_arch_z80,
-#define bfd_mach_z80strict 1 /* No undocumented opcodes. */
-#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */
-#define bfd_mach_z80full 7 /* All undocumented instructions. */
-#define bfd_mach_r800 11 /* R800: successor with multiplication. */
- bfd_arch_lm32, /* Lattice Mico32. */
-#define bfd_mach_lm32 1
- bfd_arch_microblaze,/* Xilinx MicroBlaze. */
- bfd_arch_tilepro, /* Tilera TILEPro. */
- bfd_arch_tilegx, /* Tilera TILE-Gx. */
-#define bfd_mach_tilepro 1
-#define bfd_mach_tilegx 1
-#define bfd_mach_tilegx32 2
- bfd_arch_aarch64, /* AArch64. */
-#define bfd_mach_aarch64 0
-#define bfd_mach_aarch64_ilp32 32
- bfd_arch_nios2, /* Nios II. */
-#define bfd_mach_nios2 0
-#define bfd_mach_nios2r1 1
-#define bfd_mach_nios2r2 2
- bfd_arch_visium, /* Visium. */
-#define bfd_mach_visium 1
- bfd_arch_wasm32, /* WebAssembly. */
-#define bfd_mach_wasm32 1
- bfd_arch_pru, /* PRU. */
-#define bfd_mach_pru 0
- bfd_arch_nfp, /* Netronome Flow Processor */
-#define bfd_mach_nfp3200 0x3200
-#define bfd_mach_nfp6000 0x6000
- bfd_arch_csky, /* C-SKY. */
-#define bfd_mach_ck_unknown 0
-#define bfd_mach_ck510 1
-#define bfd_mach_ck610 2
-#define bfd_mach_ck801 3
-#define bfd_mach_ck802 4
-#define bfd_mach_ck803 5
-#define bfd_mach_ck807 6
-#define bfd_mach_ck810 7
- bfd_arch_last
- };
-
-typedef struct bfd_arch_info
-{
- int bits_per_word;
- int bits_per_address;
- int bits_per_byte;
- enum bfd_architecture arch;
- unsigned long mach;
- const char *arch_name;
- const char *printable_name;
- unsigned int section_align_power;
- /* TRUE if this is the default machine for the architecture.
- The default arch should be the first entry for an arch so that
- all the entries for that arch can be accessed via <>. */
- bfd_boolean the_default;
- const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *,
- const struct bfd_arch_info *);
-
- bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
-
- /* Allocate via bfd_malloc and return a fill buffer of size COUNT. If
- IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is
- TRUE, the buffer contains code. */
- void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian,
- bfd_boolean code);
-
- const struct bfd_arch_info *next;
-}
-bfd_arch_info_type;
-
-const char *bfd_printable_name (bfd *abfd);
-
-const bfd_arch_info_type *bfd_scan_arch (const char *string);
-
-const char **bfd_arch_list (void);
-
-const bfd_arch_info_type *bfd_arch_get_compatible
- (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
-
-void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
-
-bfd_boolean bfd_default_set_arch_mach
- (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
-
-enum bfd_architecture bfd_get_arch (bfd *abfd);
-
-unsigned long bfd_get_mach (bfd *abfd);
-
-unsigned int bfd_arch_bits_per_byte (bfd *abfd);
-
-unsigned int bfd_arch_bits_per_address (bfd *abfd);
-
-const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
-
-const bfd_arch_info_type *bfd_lookup_arch
- (enum bfd_architecture arch, unsigned long machine);
-
-const char *bfd_printable_arch_mach
- (enum bfd_architecture arch, unsigned long machine);
-
-unsigned int bfd_octets_per_byte (bfd *abfd);
-
-unsigned int bfd_arch_mach_octets_per_byte
- (enum bfd_architecture arch, unsigned long machine);
-
-/* Extracted from reloc.c. */
-
-typedef enum bfd_reloc_status
-{
- /* No errors detected. Note - the value 2 is used so that it
- will not be mistaken for the boolean TRUE or FALSE values. */
- bfd_reloc_ok = 2,
-
- /* The relocation was performed, but there was an overflow. */
- bfd_reloc_overflow,
-
- /* The address to relocate was not within the section supplied. */
- bfd_reloc_outofrange,
-
- /* Used by special functions. */
- bfd_reloc_continue,
-
- /* Unsupported relocation size requested. */
- bfd_reloc_notsupported,
-
- /* Unused. */
- bfd_reloc_other,
-
- /* The symbol to relocate against was undefined. */
- bfd_reloc_undefined,
-
- /* The relocation was performed, but may not be ok. If this type is
- returned, the error_message argument to bfd_perform_relocation
- will be set. */
- bfd_reloc_dangerous
- }
- bfd_reloc_status_type;
-
-typedef const struct reloc_howto_struct reloc_howto_type;
-
-typedef struct reloc_cache_entry
-{
- /* A pointer into the canonical table of pointers. */
- struct bfd_symbol **sym_ptr_ptr;
-
- /* offset in section. */
- bfd_size_type address;
-
- /* addend for relocation value. */
- bfd_vma addend;
-
- /* Pointer to how to perform the required relocation. */
- reloc_howto_type *howto;
-
-}
-arelent;
-
-
-enum complain_overflow
-{
- /* Do not complain on overflow. */
- complain_overflow_dont,
-
- /* Complain if the value overflows when considered as a signed
- number one bit larger than the field. ie. A bitfield of N bits
- is allowed to represent -2**n to 2**n-1. */
- complain_overflow_bitfield,
-
- /* Complain if the value overflows when considered as a signed
- number. */
- complain_overflow_signed,
-
- /* Complain if the value overflows when considered as an
- unsigned number. */
- complain_overflow_unsigned
-};
-struct reloc_howto_struct
-{
- /* The type field has mainly a documentary use - the back end can
- do what it wants with it, though normally the back end's idea of
- an external reloc number is stored in this field. */
- unsigned int type;
-
- /* The encoded size of the item to be relocated. This is *not* a
- power-of-two measure. Use bfd_get_reloc_size to find the size
- of the item in bytes. */
- unsigned int size:3;
-
- /* The number of bits in the field to be relocated. This is used
- when doing overflow checking. */
- unsigned int bitsize:7;
-
- /* The value the final relocation is shifted right by. This drops
- unwanted data from the relocation. */
- unsigned int rightshift:6;
-
- /* The bit position of the reloc value in the destination.
- The relocated value is left shifted by this amount. */
- unsigned int bitpos:6;
-
- /* What type of overflow error should be checked for when
- relocating. */
- ENUM_BITFIELD (complain_overflow) complain_on_overflow:2;
-
- /* The relocation value should be negated before applying. */
- unsigned int negate:1;
-
- /* The relocation is relative to the item being relocated. */
- unsigned int pc_relative:1;
-
- /* Some formats record a relocation addend in the section contents
- rather than with the relocation. For ELF formats this is the
- distinction between USE_REL and USE_RELA (though the code checks
- for USE_REL == 1/0). The value of this field is TRUE if the
- addend is recorded with the section contents; when performing a
- partial link (ld -r) the section contents (the data) will be
- modified. The value of this field is FALSE if addends are
- recorded with the relocation (in arelent.addend); when performing
- a partial link the relocation will be modified.
- All relocations for all ELF USE_RELA targets should set this field
- to FALSE (values of TRUE should be looked on with suspicion).
- However, the converse is not true: not all relocations of all ELF
- USE_REL targets set this field to TRUE. Why this is so is peculiar
- to each particular target. For relocs that aren't used in partial
- links (e.g. GOT stuff) it doesn't matter what this is set to. */
- unsigned int partial_inplace:1;
-
- /* When some formats create PC relative instructions, they leave
- the value of the pc of the place being relocated in the offset
- slot of the instruction, so that a PC relative relocation can
- be made just by adding in an ordinary offset (e.g., sun3 a.out).
- Some formats leave the displacement part of an instruction
- empty (e.g., ELF); this flag signals the fact. */
- unsigned int pcrel_offset:1;
-
- /* src_mask selects the part of the instruction (or data) to be used
- in the relocation sum. If the target relocations don't have an
- addend in the reloc, eg. ELF USE_REL, src_mask will normally equal
- dst_mask to extract the addend from the section contents. If
- relocations do have an addend in the reloc, eg. ELF USE_RELA, this
- field should normally be zero. Non-zero values for ELF USE_RELA
- targets should be viewed with suspicion as normally the value in
- the dst_mask part of the section contents should be ignored. */
- bfd_vma src_mask;
-
- /* dst_mask selects which parts of the instruction (or data) are
- replaced with a relocated value. */
- bfd_vma dst_mask;
-
- /* If this field is non null, then the supplied function is
- called rather than the normal function. This allows really
- strange relocation methods to be accommodated. */
- bfd_reloc_status_type (*special_function)
- (bfd *, arelent *, struct bfd_symbol *, void *, asection *,
- bfd *, char **);
-
- /* The textual name of the relocation type. */
- char *name;
-};
-
-#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \
- inplace, src_mask, dst_mask, pcrel_off) \
- { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \
- size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name }
-#define EMPTY_HOWTO(C) \
- HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \
- NULL, FALSE, 0, 0, FALSE)
-
-unsigned int bfd_get_reloc_size (reloc_howto_type *);
-
-typedef struct relent_chain
-{
- arelent relent;
- struct relent_chain *next;
-}
-arelent_chain;
-
-bfd_reloc_status_type bfd_check_overflow
- (enum complain_overflow how,
- unsigned int bitsize,
- unsigned int rightshift,
- unsigned int addrsize,
- bfd_vma relocation);
-
-bfd_boolean bfd_reloc_offset_in_range
- (reloc_howto_type *howto,
- bfd *abfd,
- asection *section,
- bfd_size_type offset);
-
-bfd_reloc_status_type bfd_perform_relocation
- (bfd *abfd,
- arelent *reloc_entry,
- void *data,
- asection *input_section,
- bfd *output_bfd,
- char **error_message);
-
-bfd_reloc_status_type bfd_install_relocation
- (bfd *abfd,
- arelent *reloc_entry,
- void *data, bfd_vma data_start,
- asection *input_section,
- char **error_message);
-
-enum bfd_reloc_code_real {
- _dummy_first_bfd_reloc_code_real,
-
-
-/* Basic absolute relocations of N bits. */
- BFD_RELOC_64,
- BFD_RELOC_32,
- BFD_RELOC_26,
- BFD_RELOC_24,
- BFD_RELOC_16,
- BFD_RELOC_14,
- BFD_RELOC_8,
-
-/* PC-relative relocations. Sometimes these are relative to the address
-of the relocation itself; sometimes they are relative to the start of
-the section containing the relocation. It depends on the specific target. */
- BFD_RELOC_64_PCREL,
- BFD_RELOC_32_PCREL,
- BFD_RELOC_24_PCREL,
- BFD_RELOC_16_PCREL,
- BFD_RELOC_12_PCREL,
- BFD_RELOC_8_PCREL,
-
-/* Section relative relocations. Some targets need this for DWARF2. */
- BFD_RELOC_32_SECREL,
-
-/* For ELF. */
- BFD_RELOC_32_GOT_PCREL,
- BFD_RELOC_16_GOT_PCREL,
- BFD_RELOC_8_GOT_PCREL,
- BFD_RELOC_32_GOTOFF,
- BFD_RELOC_16_GOTOFF,
- BFD_RELOC_LO16_GOTOFF,
- BFD_RELOC_HI16_GOTOFF,
- BFD_RELOC_HI16_S_GOTOFF,
- BFD_RELOC_8_GOTOFF,
- BFD_RELOC_64_PLT_PCREL,
- BFD_RELOC_32_PLT_PCREL,
- BFD_RELOC_24_PLT_PCREL,
- BFD_RELOC_16_PLT_PCREL,
- BFD_RELOC_8_PLT_PCREL,
- BFD_RELOC_64_PLTOFF,
- BFD_RELOC_32_PLTOFF,
- BFD_RELOC_16_PLTOFF,
- BFD_RELOC_LO16_PLTOFF,
- BFD_RELOC_HI16_PLTOFF,
- BFD_RELOC_HI16_S_PLTOFF,
- BFD_RELOC_8_PLTOFF,
-
-/* Size relocations. */
- BFD_RELOC_SIZE32,
- BFD_RELOC_SIZE64,
-
-/* Relocations used by 68K ELF. */
- BFD_RELOC_68K_GLOB_DAT,
- BFD_RELOC_68K_JMP_SLOT,
- BFD_RELOC_68K_RELATIVE,
- BFD_RELOC_68K_TLS_GD32,
- BFD_RELOC_68K_TLS_GD16,
- BFD_RELOC_68K_TLS_GD8,
- BFD_RELOC_68K_TLS_LDM32,
- BFD_RELOC_68K_TLS_LDM16,
- BFD_RELOC_68K_TLS_LDM8,
- BFD_RELOC_68K_TLS_LDO32,
- BFD_RELOC_68K_TLS_LDO16,
- BFD_RELOC_68K_TLS_LDO8,
- BFD_RELOC_68K_TLS_IE32,
- BFD_RELOC_68K_TLS_IE16,
- BFD_RELOC_68K_TLS_IE8,
- BFD_RELOC_68K_TLS_LE32,
- BFD_RELOC_68K_TLS_LE16,
- BFD_RELOC_68K_TLS_LE8,
-
-/* Linkage-table relative. */
- BFD_RELOC_32_BASEREL,
- BFD_RELOC_16_BASEREL,
- BFD_RELOC_LO16_BASEREL,
- BFD_RELOC_HI16_BASEREL,
- BFD_RELOC_HI16_S_BASEREL,
- BFD_RELOC_8_BASEREL,
- BFD_RELOC_RVA,
-
-/* Absolute 8-bit relocation, but used to form an address like 0xFFnn. */
- BFD_RELOC_8_FFnn,
-
-/* These PC-relative relocations are stored as word displacements --
-i.e., byte displacements shifted right two bits. The 30-bit word
-displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the
-SPARC. (SPARC tools generally refer to this as <>.) The
-signed 16-bit displacement is used on the MIPS, and the 23-bit
-displacement is used on the Alpha. */
- BFD_RELOC_32_PCREL_S2,
- BFD_RELOC_16_PCREL_S2,
- BFD_RELOC_23_PCREL_S2,
-
-/* High 22 bits and low 10 bits of 32-bit value, placed into lower bits of
-the target word. These are used on the SPARC. */
- BFD_RELOC_HI22,
- BFD_RELOC_LO10,
-
-/* For systems that allocate a Global Pointer register, these are
-displacements off that register. These relocation types are
-handled specially, because the value the register will have is
-decided relatively late. */
- BFD_RELOC_GPREL16,
- BFD_RELOC_GPREL32,
-
-/* SPARC ELF relocations. There is probably some overlap with other
-relocation types already defined. */
- BFD_RELOC_NONE,
- BFD_RELOC_SPARC_WDISP22,
- BFD_RELOC_SPARC22,
- BFD_RELOC_SPARC13,
- BFD_RELOC_SPARC_GOT10,
- BFD_RELOC_SPARC_GOT13,
- BFD_RELOC_SPARC_GOT22,
- BFD_RELOC_SPARC_PC10,
- BFD_RELOC_SPARC_PC22,
- BFD_RELOC_SPARC_WPLT30,
- BFD_RELOC_SPARC_COPY,
- BFD_RELOC_SPARC_GLOB_DAT,
- BFD_RELOC_SPARC_JMP_SLOT,
- BFD_RELOC_SPARC_RELATIVE,
- BFD_RELOC_SPARC_UA16,
- BFD_RELOC_SPARC_UA32,
- BFD_RELOC_SPARC_UA64,
- BFD_RELOC_SPARC_GOTDATA_HIX22,
- BFD_RELOC_SPARC_GOTDATA_LOX10,
- BFD_RELOC_SPARC_GOTDATA_OP_HIX22,
- BFD_RELOC_SPARC_GOTDATA_OP_LOX10,
- BFD_RELOC_SPARC_GOTDATA_OP,
- BFD_RELOC_SPARC_JMP_IREL,
- BFD_RELOC_SPARC_IRELATIVE,
-
-/* I think these are specific to SPARC a.out (e.g., Sun 4). */
- BFD_RELOC_SPARC_BASE13,
- BFD_RELOC_SPARC_BASE22,
-
-/* SPARC64 relocations */
-#define BFD_RELOC_SPARC_64 BFD_RELOC_64
- BFD_RELOC_SPARC_10,
- BFD_RELOC_SPARC_11,
- BFD_RELOC_SPARC_OLO10,
- BFD_RELOC_SPARC_HH22,
- BFD_RELOC_SPARC_HM10,
- BFD_RELOC_SPARC_LM22,
- BFD_RELOC_SPARC_PC_HH22,
- BFD_RELOC_SPARC_PC_HM10,
- BFD_RELOC_SPARC_PC_LM22,
- BFD_RELOC_SPARC_WDISP16,
- BFD_RELOC_SPARC_WDISP19,
- BFD_RELOC_SPARC_7,
- BFD_RELOC_SPARC_6,
- BFD_RELOC_SPARC_5,
-#define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL
- BFD_RELOC_SPARC_PLT32,
- BFD_RELOC_SPARC_PLT64,
- BFD_RELOC_SPARC_HIX22,
- BFD_RELOC_SPARC_LOX10,
- BFD_RELOC_SPARC_H44,
- BFD_RELOC_SPARC_M44,
- BFD_RELOC_SPARC_L44,
- BFD_RELOC_SPARC_REGISTER,
- BFD_RELOC_SPARC_H34,
- BFD_RELOC_SPARC_SIZE32,
- BFD_RELOC_SPARC_SIZE64,
- BFD_RELOC_SPARC_WDISP10,
-
-/* SPARC little endian relocation */
- BFD_RELOC_SPARC_REV32,
-
-/* SPARC TLS relocations */
- BFD_RELOC_SPARC_TLS_GD_HI22,
- BFD_RELOC_SPARC_TLS_GD_LO10,
- BFD_RELOC_SPARC_TLS_GD_ADD,
- BFD_RELOC_SPARC_TLS_GD_CALL,
- BFD_RELOC_SPARC_TLS_LDM_HI22,
- BFD_RELOC_SPARC_TLS_LDM_LO10,
- BFD_RELOC_SPARC_TLS_LDM_ADD,
- BFD_RELOC_SPARC_TLS_LDM_CALL,
- BFD_RELOC_SPARC_TLS_LDO_HIX22,
- BFD_RELOC_SPARC_TLS_LDO_LOX10,
- BFD_RELOC_SPARC_TLS_LDO_ADD,
- BFD_RELOC_SPARC_TLS_IE_HI22,
- BFD_RELOC_SPARC_TLS_IE_LO10,
- BFD_RELOC_SPARC_TLS_IE_LD,
- BFD_RELOC_SPARC_TLS_IE_LDX,
- BFD_RELOC_SPARC_TLS_IE_ADD,
- BFD_RELOC_SPARC_TLS_LE_HIX22,
- BFD_RELOC_SPARC_TLS_LE_LOX10,
- BFD_RELOC_SPARC_TLS_DTPMOD32,
- BFD_RELOC_SPARC_TLS_DTPMOD64,
- BFD_RELOC_SPARC_TLS_DTPOFF32,
- BFD_RELOC_SPARC_TLS_DTPOFF64,
- BFD_RELOC_SPARC_TLS_TPOFF32,
- BFD_RELOC_SPARC_TLS_TPOFF64,
-
-/* SPU Relocations. */
- BFD_RELOC_SPU_IMM7,
- BFD_RELOC_SPU_IMM8,
- BFD_RELOC_SPU_IMM10,
- BFD_RELOC_SPU_IMM10W,
- BFD_RELOC_SPU_IMM16,
- BFD_RELOC_SPU_IMM16W,
- BFD_RELOC_SPU_IMM18,
- BFD_RELOC_SPU_PCREL9a,
- BFD_RELOC_SPU_PCREL9b,
- BFD_RELOC_SPU_PCREL16,
- BFD_RELOC_SPU_LO16,
- BFD_RELOC_SPU_HI16,
- BFD_RELOC_SPU_PPU32,
- BFD_RELOC_SPU_PPU64,
- BFD_RELOC_SPU_ADD_PIC,
-
-/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
-"addend" in some special way.
-For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
-writing; when reading, it will be the absolute section symbol. The
-addend is the displacement in bytes of the "lda" instruction from
-the "ldah" instruction (which is at the address of this reloc). */
- BFD_RELOC_ALPHA_GPDISP_HI16,
-
-/* For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
-with GPDISP_HI16 relocs. The addend is ignored when writing the
-relocations out, and is filled in with the file's GP value on
-reading, for convenience. */
- BFD_RELOC_ALPHA_GPDISP_LO16,
-
-/* The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
-relocation except that there is no accompanying GPDISP_LO16
-relocation. */
- BFD_RELOC_ALPHA_GPDISP,
-
-/* The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
-the assembler turns it into a LDQ instruction to load the address of
-the symbol, and then fills in a register in the real instruction.
-
-The LITERAL reloc, at the LDQ instruction, refers to the .lita
-section symbol. The addend is ignored when writing, but is filled
-in with the file's GP value on reading, for convenience, as with the
-GPDISP_LO16 reloc.
-
-The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16.
-It should refer to the symbol to be referenced, as with 16_GOTOFF,
-but it generates output not based on the position within the .got
-section, but relative to the GP value chosen for the file during the
-final link stage.
-
-The LITUSE reloc, on the instruction using the loaded address, gives
-information to the linker that it might be able to use to optimize
-away some literal section references. The symbol is ignored (read
-as the absolute section symbol), and the "addend" indicates the type
-of instruction using the register:
-1 - "memory" fmt insn
-2 - byte-manipulation (byte offset reg)
-3 - jsr (target of branch) */
- BFD_RELOC_ALPHA_LITERAL,
- BFD_RELOC_ALPHA_ELF_LITERAL,
- BFD_RELOC_ALPHA_LITUSE,
-
-/* The HINT relocation indicates a value that should be filled into the
-"hint" field of a jmp/jsr/ret instruction, for possible branch-
-prediction logic which may be provided on some processors. */
- BFD_RELOC_ALPHA_HINT,
-
-/* The LINKAGE relocation outputs a linkage pair in the object file,
-which is filled by the linker. */
- BFD_RELOC_ALPHA_LINKAGE,
-
-/* The CODEADDR relocation outputs a STO_CA in the object file,
-which is filled by the linker. */
- BFD_RELOC_ALPHA_CODEADDR,
-
-/* The GPREL_HI/LO relocations together form a 32-bit offset from the
-GP register. */
- BFD_RELOC_ALPHA_GPREL_HI16,
- BFD_RELOC_ALPHA_GPREL_LO16,
-
-/* Like BFD_RELOC_23_PCREL_S2, except that the source and target must
-share a common GP, and the target address is adjusted for
-STO_ALPHA_STD_GPLOAD. */
- BFD_RELOC_ALPHA_BRSGP,
-
-/* The NOP relocation outputs a NOP if the longword displacement
-between two procedure entry points is < 2^21. */
- BFD_RELOC_ALPHA_NOP,
-
-/* The BSR relocation outputs a BSR if the longword displacement
-between two procedure entry points is < 2^21. */
- BFD_RELOC_ALPHA_BSR,
-
-/* The LDA relocation outputs a LDA if the longword displacement
-between two procedure entry points is < 2^16. */
- BFD_RELOC_ALPHA_LDA,
-
-/* The BOH relocation outputs a BSR if the longword displacement
-between two procedure entry points is < 2^21, or else a hint. */
- BFD_RELOC_ALPHA_BOH,
-
-/* Alpha thread-local storage relocations. */
- BFD_RELOC_ALPHA_TLSGD,
- BFD_RELOC_ALPHA_TLSLDM,
- BFD_RELOC_ALPHA_DTPMOD64,
- BFD_RELOC_ALPHA_GOTDTPREL16,
- BFD_RELOC_ALPHA_DTPREL64,
- BFD_RELOC_ALPHA_DTPREL_HI16,
- BFD_RELOC_ALPHA_DTPREL_LO16,
- BFD_RELOC_ALPHA_DTPREL16,
- BFD_RELOC_ALPHA_GOTTPREL16,
- BFD_RELOC_ALPHA_TPREL64,
- BFD_RELOC_ALPHA_TPREL_HI16,
- BFD_RELOC_ALPHA_TPREL_LO16,
- BFD_RELOC_ALPHA_TPREL16,
-
-/* The MIPS jump instruction. */
- BFD_RELOC_MIPS_JMP,
- BFD_RELOC_MICROMIPS_JMP,
-
-/* The MIPS16 jump instruction. */
- BFD_RELOC_MIPS16_JMP,
-
-/* MIPS16 GP relative reloc. */
- BFD_RELOC_MIPS16_GPREL,
-
-/* High 16 bits of 32-bit value; simple reloc. */
- BFD_RELOC_HI16,
-
-/* High 16 bits of 32-bit value but the low 16 bits will be sign
-extended and added to form the final result. If the low 16
-bits form a negative number, we need to add one to the high value
-to compensate for the borrow when the low bits are added. */
- BFD_RELOC_HI16_S,
-
-/* Low 16 bits. */
- BFD_RELOC_LO16,
-
-/* High 16 bits of 32-bit pc-relative value */
- BFD_RELOC_HI16_PCREL,
-
-/* High 16 bits of 32-bit pc-relative value, adjusted */
- BFD_RELOC_HI16_S_PCREL,
-
-/* Low 16 bits of pc-relative value */
- BFD_RELOC_LO16_PCREL,
-
-/* Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of
-16-bit immediate fields */
- BFD_RELOC_MIPS16_GOT16,
- BFD_RELOC_MIPS16_CALL16,
-
-/* MIPS16 high 16 bits of 32-bit value. */
- BFD_RELOC_MIPS16_HI16,
-
-/* MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign
-extended and added to form the final result. If the low 16
-bits form a negative number, we need to add one to the high value
-to compensate for the borrow when the low bits are added. */
- BFD_RELOC_MIPS16_HI16_S,
-
-/* MIPS16 low 16 bits. */
- BFD_RELOC_MIPS16_LO16,
-
-/* MIPS16 TLS relocations */
- BFD_RELOC_MIPS16_TLS_GD,
- BFD_RELOC_MIPS16_TLS_LDM,
- BFD_RELOC_MIPS16_TLS_DTPREL_HI16,
- BFD_RELOC_MIPS16_TLS_DTPREL_LO16,
- BFD_RELOC_MIPS16_TLS_GOTTPREL,
- BFD_RELOC_MIPS16_TLS_TPREL_HI16,
- BFD_RELOC_MIPS16_TLS_TPREL_LO16,
-
-/* Relocation against a MIPS literal section. */
- BFD_RELOC_MIPS_LITERAL,
- BFD_RELOC_MICROMIPS_LITERAL,
-
-/* microMIPS PC-relative relocations. */
- BFD_RELOC_MICROMIPS_7_PCREL_S1,
- BFD_RELOC_MICROMIPS_10_PCREL_S1,
- BFD_RELOC_MICROMIPS_16_PCREL_S1,
-
-/* MIPS16 PC-relative relocation. */
- BFD_RELOC_MIPS16_16_PCREL_S1,
-
-/* MIPS PC-relative relocations. */
- BFD_RELOC_MIPS_21_PCREL_S2,
- BFD_RELOC_MIPS_26_PCREL_S2,
- BFD_RELOC_MIPS_18_PCREL_S3,
- BFD_RELOC_MIPS_19_PCREL_S2,
-
-/* microMIPS versions of generic BFD relocs. */
- BFD_RELOC_MICROMIPS_GPREL16,
- BFD_RELOC_MICROMIPS_HI16,
- BFD_RELOC_MICROMIPS_HI16_S,
- BFD_RELOC_MICROMIPS_LO16,
-
-/* MIPS ELF relocations. */
- BFD_RELOC_MIPS_GOT16,
- BFD_RELOC_MICROMIPS_GOT16,
- BFD_RELOC_MIPS_CALL16,
- BFD_RELOC_MICROMIPS_CALL16,
- BFD_RELOC_MIPS_GOT_HI16,
- BFD_RELOC_MICROMIPS_GOT_HI16,
- BFD_RELOC_MIPS_GOT_LO16,
- BFD_RELOC_MICROMIPS_GOT_LO16,
- BFD_RELOC_MIPS_CALL_HI16,
- BFD_RELOC_MICROMIPS_CALL_HI16,
- BFD_RELOC_MIPS_CALL_LO16,
- BFD_RELOC_MICROMIPS_CALL_LO16,
- BFD_RELOC_MIPS_SUB,
- BFD_RELOC_MICROMIPS_SUB,
- BFD_RELOC_MIPS_GOT_PAGE,
- BFD_RELOC_MICROMIPS_GOT_PAGE,
- BFD_RELOC_MIPS_GOT_OFST,
- BFD_RELOC_MICROMIPS_GOT_OFST,
- BFD_RELOC_MIPS_GOT_DISP,
- BFD_RELOC_MICROMIPS_GOT_DISP,
- BFD_RELOC_MIPS_SHIFT5,
- BFD_RELOC_MIPS_SHIFT6,
- BFD_RELOC_MIPS_INSERT_A,
- BFD_RELOC_MIPS_INSERT_B,
- BFD_RELOC_MIPS_DELETE,
- BFD_RELOC_MIPS_HIGHEST,
- BFD_RELOC_MICROMIPS_HIGHEST,
- BFD_RELOC_MIPS_HIGHER,
- BFD_RELOC_MICROMIPS_HIGHER,
- BFD_RELOC_MIPS_SCN_DISP,
- BFD_RELOC_MICROMIPS_SCN_DISP,
- BFD_RELOC_MIPS_REL16,
- BFD_RELOC_MIPS_RELGOT,
- BFD_RELOC_MIPS_JALR,
- BFD_RELOC_MICROMIPS_JALR,
- BFD_RELOC_MIPS_TLS_DTPMOD32,
- BFD_RELOC_MIPS_TLS_DTPREL32,
- BFD_RELOC_MIPS_TLS_DTPMOD64,
- BFD_RELOC_MIPS_TLS_DTPREL64,
- BFD_RELOC_MIPS_TLS_GD,
- BFD_RELOC_MICROMIPS_TLS_GD,
- BFD_RELOC_MIPS_TLS_LDM,
- BFD_RELOC_MICROMIPS_TLS_LDM,
- BFD_RELOC_MIPS_TLS_DTPREL_HI16,
- BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16,
- BFD_RELOC_MIPS_TLS_DTPREL_LO16,
- BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16,
- BFD_RELOC_MIPS_TLS_GOTTPREL,
- BFD_RELOC_MICROMIPS_TLS_GOTTPREL,
- BFD_RELOC_MIPS_TLS_TPREL32,
- BFD_RELOC_MIPS_TLS_TPREL64,
- BFD_RELOC_MIPS_TLS_TPREL_HI16,
- BFD_RELOC_MICROMIPS_TLS_TPREL_HI16,
- BFD_RELOC_MIPS_TLS_TPREL_LO16,
- BFD_RELOC_MICROMIPS_TLS_TPREL_LO16,
- BFD_RELOC_MIPS_EH,
-
-
-/* MIPS ELF relocations (VxWorks and PLT extensions). */
- BFD_RELOC_MIPS_COPY,
- BFD_RELOC_MIPS_JUMP_SLOT,
-
-
-/* Moxie ELF relocations. */
- BFD_RELOC_MOXIE_10_PCREL,
-
-
-/* FT32 ELF relocations. */
- BFD_RELOC_FT32_10,
- BFD_RELOC_FT32_20,
- BFD_RELOC_FT32_17,
- BFD_RELOC_FT32_18,
- BFD_RELOC_FT32_RELAX,
- BFD_RELOC_FT32_SC0,
- BFD_RELOC_FT32_SC1,
- BFD_RELOC_FT32_15,
- BFD_RELOC_FT32_DIFF32,
-
-
-/* Fujitsu Frv Relocations. */
- BFD_RELOC_FRV_LABEL16,
- BFD_RELOC_FRV_LABEL24,
- BFD_RELOC_FRV_LO16,
- BFD_RELOC_FRV_HI16,
- BFD_RELOC_FRV_GPREL12,
- BFD_RELOC_FRV_GPRELU12,
- BFD_RELOC_FRV_GPREL32,
- BFD_RELOC_FRV_GPRELHI,
- BFD_RELOC_FRV_GPRELLO,
- BFD_RELOC_FRV_GOT12,
- BFD_RELOC_FRV_GOTHI,
- BFD_RELOC_FRV_GOTLO,
- BFD_RELOC_FRV_FUNCDESC,
- BFD_RELOC_FRV_FUNCDESC_GOT12,
- BFD_RELOC_FRV_FUNCDESC_GOTHI,
- BFD_RELOC_FRV_FUNCDESC_GOTLO,
- BFD_RELOC_FRV_FUNCDESC_VALUE,
- BFD_RELOC_FRV_FUNCDESC_GOTOFF12,
- BFD_RELOC_FRV_FUNCDESC_GOTOFFHI,
- BFD_RELOC_FRV_FUNCDESC_GOTOFFLO,
- BFD_RELOC_FRV_GOTOFF12,
- BFD_RELOC_FRV_GOTOFFHI,
- BFD_RELOC_FRV_GOTOFFLO,
- BFD_RELOC_FRV_GETTLSOFF,
- BFD_RELOC_FRV_TLSDESC_VALUE,
- BFD_RELOC_FRV_GOTTLSDESC12,
- BFD_RELOC_FRV_GOTTLSDESCHI,
- BFD_RELOC_FRV_GOTTLSDESCLO,
- BFD_RELOC_FRV_TLSMOFF12,
- BFD_RELOC_FRV_TLSMOFFHI,
- BFD_RELOC_FRV_TLSMOFFLO,
- BFD_RELOC_FRV_GOTTLSOFF12,
- BFD_RELOC_FRV_GOTTLSOFFHI,
- BFD_RELOC_FRV_GOTTLSOFFLO,
- BFD_RELOC_FRV_TLSOFF,
- BFD_RELOC_FRV_TLSDESC_RELAX,
- BFD_RELOC_FRV_GETTLSOFF_RELAX,
- BFD_RELOC_FRV_TLSOFF_RELAX,
- BFD_RELOC_FRV_TLSMOFF,
-
-
-/* This is a 24bit GOT-relative reloc for the mn10300. */
- BFD_RELOC_MN10300_GOTOFF24,
-
-/* This is a 32bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction. */
- BFD_RELOC_MN10300_GOT32,
-
-/* This is a 24bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction. */
- BFD_RELOC_MN10300_GOT24,
-
-/* This is a 16bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction. */
- BFD_RELOC_MN10300_GOT16,
-
-/* Copy symbol at runtime. */
- BFD_RELOC_MN10300_COPY,
-
-/* Create GOT entry. */
- BFD_RELOC_MN10300_GLOB_DAT,
-
-/* Create PLT entry. */
- BFD_RELOC_MN10300_JMP_SLOT,
-
-/* Adjust by program base. */
- BFD_RELOC_MN10300_RELATIVE,
-
-/* Together with another reloc targeted at the same location,
-allows for a value that is the difference of two symbols
-in the same section. */
- BFD_RELOC_MN10300_SYM_DIFF,
-
-/* The addend of this reloc is an alignment power that must
-be honoured at the offset's location, regardless of linker
-relaxation. */
- BFD_RELOC_MN10300_ALIGN,
-
-/* Various TLS-related relocations. */
- BFD_RELOC_MN10300_TLS_GD,
- BFD_RELOC_MN10300_TLS_LD,
- BFD_RELOC_MN10300_TLS_LDO,
- BFD_RELOC_MN10300_TLS_GOTIE,
- BFD_RELOC_MN10300_TLS_IE,
- BFD_RELOC_MN10300_TLS_LE,
- BFD_RELOC_MN10300_TLS_DTPMOD,
- BFD_RELOC_MN10300_TLS_DTPOFF,
- BFD_RELOC_MN10300_TLS_TPOFF,
-
-/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction. */
- BFD_RELOC_MN10300_32_PCREL,
-
-/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction. */
- BFD_RELOC_MN10300_16_PCREL,
-
-
-/* i386/elf relocations */
- BFD_RELOC_386_GOT32,
- BFD_RELOC_386_PLT32,
- BFD_RELOC_386_COPY,
- BFD_RELOC_386_GLOB_DAT,
- BFD_RELOC_386_JUMP_SLOT,
- BFD_RELOC_386_RELATIVE,
- BFD_RELOC_386_GOTOFF,
- BFD_RELOC_386_GOTPC,
- BFD_RELOC_386_TLS_TPOFF,
- BFD_RELOC_386_TLS_IE,
- BFD_RELOC_386_TLS_GOTIE,
- BFD_RELOC_386_TLS_LE,
- BFD_RELOC_386_TLS_GD,
- BFD_RELOC_386_TLS_LDM,
- BFD_RELOC_386_TLS_LDO_32,
- BFD_RELOC_386_TLS_IE_32,
- BFD_RELOC_386_TLS_LE_32,
- BFD_RELOC_386_TLS_DTPMOD32,
- BFD_RELOC_386_TLS_DTPOFF32,
- BFD_RELOC_386_TLS_TPOFF32,
- BFD_RELOC_386_TLS_GOTDESC,
- BFD_RELOC_386_TLS_DESC_CALL,
- BFD_RELOC_386_TLS_DESC,
- BFD_RELOC_386_IRELATIVE,
- BFD_RELOC_386_GOT32X,
-
-/* x86-64/elf relocations */
- BFD_RELOC_X86_64_GOT32,
- BFD_RELOC_X86_64_PLT32,
- BFD_RELOC_X86_64_COPY,
- BFD_RELOC_X86_64_GLOB_DAT,
- BFD_RELOC_X86_64_JUMP_SLOT,
- BFD_RELOC_X86_64_RELATIVE,
- BFD_RELOC_X86_64_GOTPCREL,
- BFD_RELOC_X86_64_32S,
- BFD_RELOC_X86_64_DTPMOD64,
- BFD_RELOC_X86_64_DTPOFF64,
- BFD_RELOC_X86_64_TPOFF64,
- BFD_RELOC_X86_64_TLSGD,
- BFD_RELOC_X86_64_TLSLD,
- BFD_RELOC_X86_64_DTPOFF32,
- BFD_RELOC_X86_64_GOTTPOFF,
- BFD_RELOC_X86_64_TPOFF32,
- BFD_RELOC_X86_64_GOTOFF64,
- BFD_RELOC_X86_64_GOTPC32,
- BFD_RELOC_X86_64_GOT64,
- BFD_RELOC_X86_64_GOTPCREL64,
- BFD_RELOC_X86_64_GOTPC64,
- BFD_RELOC_X86_64_GOTPLT64,
- BFD_RELOC_X86_64_PLTOFF64,
- BFD_RELOC_X86_64_GOTPC32_TLSDESC,
- BFD_RELOC_X86_64_TLSDESC_CALL,
- BFD_RELOC_X86_64_TLSDESC,
- BFD_RELOC_X86_64_IRELATIVE,
- BFD_RELOC_X86_64_PC32_BND,
- BFD_RELOC_X86_64_PLT32_BND,
- BFD_RELOC_X86_64_GOTPCRELX,
- BFD_RELOC_X86_64_REX_GOTPCRELX,
-
-/* ns32k relocations */
- BFD_RELOC_NS32K_IMM_8,
- BFD_RELOC_NS32K_IMM_16,
- BFD_RELOC_NS32K_IMM_32,
- BFD_RELOC_NS32K_IMM_8_PCREL,
- BFD_RELOC_NS32K_IMM_16_PCREL,
- BFD_RELOC_NS32K_IMM_32_PCREL,
- BFD_RELOC_NS32K_DISP_8,
- BFD_RELOC_NS32K_DISP_16,
- BFD_RELOC_NS32K_DISP_32,
- BFD_RELOC_NS32K_DISP_8_PCREL,
- BFD_RELOC_NS32K_DISP_16_PCREL,
- BFD_RELOC_NS32K_DISP_32_PCREL,
-
-/* PDP11 relocations */
- BFD_RELOC_PDP11_DISP_8_PCREL,
- BFD_RELOC_PDP11_DISP_6_PCREL,
-
-/* Picojava relocs. Not all of these appear in object files. */
- BFD_RELOC_PJ_CODE_HI16,
- BFD_RELOC_PJ_CODE_LO16,
- BFD_RELOC_PJ_CODE_DIR16,
- BFD_RELOC_PJ_CODE_DIR32,
- BFD_RELOC_PJ_CODE_REL16,
- BFD_RELOC_PJ_CODE_REL32,
-
-/* Power(rs6000) and PowerPC relocations. */
- BFD_RELOC_PPC_B26,
- BFD_RELOC_PPC_BA26,
- BFD_RELOC_PPC_TOC16,
- BFD_RELOC_PPC_B16,
- BFD_RELOC_PPC_B16_BRTAKEN,
- BFD_RELOC_PPC_B16_BRNTAKEN,
- BFD_RELOC_PPC_BA16,
- BFD_RELOC_PPC_BA16_BRTAKEN,
- BFD_RELOC_PPC_BA16_BRNTAKEN,
- BFD_RELOC_PPC_COPY,
- BFD_RELOC_PPC_GLOB_DAT,
- BFD_RELOC_PPC_JMP_SLOT,
- BFD_RELOC_PPC_RELATIVE,
- BFD_RELOC_PPC_LOCAL24PC,
- BFD_RELOC_PPC_EMB_NADDR32,
- BFD_RELOC_PPC_EMB_NADDR16,
- BFD_RELOC_PPC_EMB_NADDR16_LO,
- BFD_RELOC_PPC_EMB_NADDR16_HI,
- BFD_RELOC_PPC_EMB_NADDR16_HA,
- BFD_RELOC_PPC_EMB_SDAI16,
- BFD_RELOC_PPC_EMB_SDA2I16,
- BFD_RELOC_PPC_EMB_SDA2REL,
- BFD_RELOC_PPC_EMB_SDA21,
- BFD_RELOC_PPC_EMB_MRKREF,
- BFD_RELOC_PPC_EMB_RELSEC16,
- BFD_RELOC_PPC_EMB_RELST_LO,
- BFD_RELOC_PPC_EMB_RELST_HI,
- BFD_RELOC_PPC_EMB_RELST_HA,
- BFD_RELOC_PPC_EMB_BIT_FLD,
- BFD_RELOC_PPC_EMB_RELSDA,
- BFD_RELOC_PPC_VLE_REL8,
- BFD_RELOC_PPC_VLE_REL15,
- BFD_RELOC_PPC_VLE_REL24,
- BFD_RELOC_PPC_VLE_LO16A,
- BFD_RELOC_PPC_VLE_LO16D,
- BFD_RELOC_PPC_VLE_HI16A,
- BFD_RELOC_PPC_VLE_HI16D,
- BFD_RELOC_PPC_VLE_HA16A,
- BFD_RELOC_PPC_VLE_HA16D,
- BFD_RELOC_PPC_VLE_SDA21,
- BFD_RELOC_PPC_VLE_SDA21_LO,
- BFD_RELOC_PPC_VLE_SDAREL_LO16A,
- BFD_RELOC_PPC_VLE_SDAREL_LO16D,
- BFD_RELOC_PPC_VLE_SDAREL_HI16A,
- BFD_RELOC_PPC_VLE_SDAREL_HI16D,
- BFD_RELOC_PPC_VLE_SDAREL_HA16A,
- BFD_RELOC_PPC_VLE_SDAREL_HA16D,
- BFD_RELOC_PPC_16DX_HA,
- BFD_RELOC_PPC_REL16DX_HA,
- BFD_RELOC_PPC64_HIGHER,
- BFD_RELOC_PPC64_HIGHER_S,
- BFD_RELOC_PPC64_HIGHEST,
- BFD_RELOC_PPC64_HIGHEST_S,
- BFD_RELOC_PPC64_TOC16_LO,
- BFD_RELOC_PPC64_TOC16_HI,
- BFD_RELOC_PPC64_TOC16_HA,
- BFD_RELOC_PPC64_TOC,
- BFD_RELOC_PPC64_PLTGOT16,
- BFD_RELOC_PPC64_PLTGOT16_LO,
- BFD_RELOC_PPC64_PLTGOT16_HI,
- BFD_RELOC_PPC64_PLTGOT16_HA,
- BFD_RELOC_PPC64_ADDR16_DS,
- BFD_RELOC_PPC64_ADDR16_LO_DS,
- BFD_RELOC_PPC64_GOT16_DS,
- BFD_RELOC_PPC64_GOT16_LO_DS,
- BFD_RELOC_PPC64_PLT16_LO_DS,
- BFD_RELOC_PPC64_SECTOFF_DS,
- BFD_RELOC_PPC64_SECTOFF_LO_DS,
- BFD_RELOC_PPC64_TOC16_DS,
- BFD_RELOC_PPC64_TOC16_LO_DS,
- BFD_RELOC_PPC64_PLTGOT16_DS,
- BFD_RELOC_PPC64_PLTGOT16_LO_DS,
- BFD_RELOC_PPC64_ADDR16_HIGH,
- BFD_RELOC_PPC64_ADDR16_HIGHA,
- BFD_RELOC_PPC64_REL16_HIGH,
- BFD_RELOC_PPC64_REL16_HIGHA,
- BFD_RELOC_PPC64_REL16_HIGHER,
- BFD_RELOC_PPC64_REL16_HIGHERA,
- BFD_RELOC_PPC64_REL16_HIGHEST,
- BFD_RELOC_PPC64_REL16_HIGHESTA,
- BFD_RELOC_PPC64_ADDR64_LOCAL,
- BFD_RELOC_PPC64_ENTRY,
- BFD_RELOC_PPC64_REL24_NOTOC,
-
-/* PowerPC and PowerPC64 thread-local storage relocations. */
- BFD_RELOC_PPC_TLS,
- BFD_RELOC_PPC_TLSGD,
- BFD_RELOC_PPC_TLSLD,
- BFD_RELOC_PPC_DTPMOD,
- BFD_RELOC_PPC_TPREL16,
- BFD_RELOC_PPC_TPREL16_LO,
- BFD_RELOC_PPC_TPREL16_HI,
- BFD_RELOC_PPC_TPREL16_HA,
- BFD_RELOC_PPC_TPREL,
- BFD_RELOC_PPC_DTPREL16,
- BFD_RELOC_PPC_DTPREL16_LO,
- BFD_RELOC_PPC_DTPREL16_HI,
- BFD_RELOC_PPC_DTPREL16_HA,
- BFD_RELOC_PPC_DTPREL,
- BFD_RELOC_PPC_GOT_TLSGD16,
- BFD_RELOC_PPC_GOT_TLSGD16_LO,
- BFD_RELOC_PPC_GOT_TLSGD16_HI,
- BFD_RELOC_PPC_GOT_TLSGD16_HA,
- BFD_RELOC_PPC_GOT_TLSLD16,
- BFD_RELOC_PPC_GOT_TLSLD16_LO,
- BFD_RELOC_PPC_GOT_TLSLD16_HI,
- BFD_RELOC_PPC_GOT_TLSLD16_HA,
- BFD_RELOC_PPC_GOT_TPREL16,
- BFD_RELOC_PPC_GOT_TPREL16_LO,
- BFD_RELOC_PPC_GOT_TPREL16_HI,
- BFD_RELOC_PPC_GOT_TPREL16_HA,
- BFD_RELOC_PPC_GOT_DTPREL16,
- BFD_RELOC_PPC_GOT_DTPREL16_LO,
- BFD_RELOC_PPC_GOT_DTPREL16_HI,
- BFD_RELOC_PPC_GOT_DTPREL16_HA,
- BFD_RELOC_PPC64_TPREL16_DS,
- BFD_RELOC_PPC64_TPREL16_LO_DS,
- BFD_RELOC_PPC64_TPREL16_HIGHER,
- BFD_RELOC_PPC64_TPREL16_HIGHERA,
- BFD_RELOC_PPC64_TPREL16_HIGHEST,
- BFD_RELOC_PPC64_TPREL16_HIGHESTA,
- BFD_RELOC_PPC64_DTPREL16_DS,
- BFD_RELOC_PPC64_DTPREL16_LO_DS,
- BFD_RELOC_PPC64_DTPREL16_HIGHER,
- BFD_RELOC_PPC64_DTPREL16_HIGHERA,
- BFD_RELOC_PPC64_DTPREL16_HIGHEST,
- BFD_RELOC_PPC64_DTPREL16_HIGHESTA,
- BFD_RELOC_PPC64_TPREL16_HIGH,
- BFD_RELOC_PPC64_TPREL16_HIGHA,
- BFD_RELOC_PPC64_DTPREL16_HIGH,
- BFD_RELOC_PPC64_DTPREL16_HIGHA,
-
-/* IBM 370/390 relocations */
- BFD_RELOC_I370_D12,
-
-/* The type of reloc used to build a constructor table - at the moment
-probably a 32 bit wide absolute relocation, but the target can choose.
-It generally does map to one of the other relocation types. */
- BFD_RELOC_CTOR,
-
-/* ARM 26 bit pc-relative branch. The lowest two bits must be zero and are
-not stored in the instruction. */
- BFD_RELOC_ARM_PCREL_BRANCH,
-
-/* ARM 26 bit pc-relative branch. The lowest bit must be zero and is
-not stored in the instruction. The 2nd lowest bit comes from a 1 bit
-field in the instruction. */
- BFD_RELOC_ARM_PCREL_BLX,
-
-/* Thumb 22 bit pc-relative branch. The lowest bit must be zero and is
-not stored in the instruction. The 2nd lowest bit comes from a 1 bit
-field in the instruction. */
- BFD_RELOC_THUMB_PCREL_BLX,
-
-/* ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction. */
- BFD_RELOC_ARM_PCREL_CALL,
-
-/* ARM 26-bit pc-relative branch for B or conditional BL instruction. */
- BFD_RELOC_ARM_PCREL_JUMP,
-
-/* Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches.
-The lowest bit must be zero and is not stored in the instruction.
-Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an
-"nn" one smaller in all cases. Note further that BRANCH23
-corresponds to R_ARM_THM_CALL. */
- BFD_RELOC_THUMB_PCREL_BRANCH7,
- BFD_RELOC_THUMB_PCREL_BRANCH9,
- BFD_RELOC_THUMB_PCREL_BRANCH12,
- BFD_RELOC_THUMB_PCREL_BRANCH20,
- BFD_RELOC_THUMB_PCREL_BRANCH23,
- BFD_RELOC_THUMB_PCREL_BRANCH25,
-
-/* 12-bit immediate offset, used in ARM-format ldr and str instructions. */
- BFD_RELOC_ARM_OFFSET_IMM,
-
-/* 5-bit immediate offset, used in Thumb-format ldr and str instructions. */
- BFD_RELOC_ARM_THUMB_OFFSET,
-
-/* Pc-relative or absolute relocation depending on target. Used for
-entries in .init_array sections. */
- BFD_RELOC_ARM_TARGET1,
-
-/* Read-only segment base relative address. */
- BFD_RELOC_ARM_ROSEGREL32,
-
-/* Data segment base relative address. */
- BFD_RELOC_ARM_SBREL32,
-
-/* This reloc is used for references to RTTI data from exception handling
-tables. The actual definition depends on the target. It may be a
-pc-relative or some form of GOT-indirect relocation. */
- BFD_RELOC_ARM_TARGET2,
-
-/* 31-bit PC relative address. */
- BFD_RELOC_ARM_PREL31,
-
-/* Low and High halfword relocations for MOVW and MOVT instructions. */
- BFD_RELOC_ARM_MOVW,
- BFD_RELOC_ARM_MOVT,
- BFD_RELOC_ARM_MOVW_PCREL,
- BFD_RELOC_ARM_MOVT_PCREL,
- BFD_RELOC_ARM_THUMB_MOVW,
- BFD_RELOC_ARM_THUMB_MOVT,
- BFD_RELOC_ARM_THUMB_MOVW_PCREL,
- BFD_RELOC_ARM_THUMB_MOVT_PCREL,
-
-/* ARM FDPIC specific relocations. */
- BFD_RELOC_ARM_GOTFUNCDESC,
- BFD_RELOC_ARM_GOTOFFFUNCDESC,
- BFD_RELOC_ARM_FUNCDESC,
- BFD_RELOC_ARM_FUNCDESC_VALUE,
- BFD_RELOC_ARM_TLS_GD32_FDPIC,
- BFD_RELOC_ARM_TLS_LDM32_FDPIC,
- BFD_RELOC_ARM_TLS_IE32_FDPIC,
-
-/* Relocations for setting up GOTs and PLTs for shared libraries. */
- BFD_RELOC_ARM_JUMP_SLOT,
- BFD_RELOC_ARM_GLOB_DAT,
- BFD_RELOC_ARM_GOT32,
- BFD_RELOC_ARM_PLT32,
- BFD_RELOC_ARM_RELATIVE,
- BFD_RELOC_ARM_GOTOFF,
- BFD_RELOC_ARM_GOTPC,
- BFD_RELOC_ARM_GOT_PREL,
-
-/* ARM thread-local storage relocations. */
- BFD_RELOC_ARM_TLS_GD32,
- BFD_RELOC_ARM_TLS_LDO32,
- BFD_RELOC_ARM_TLS_LDM32,
- BFD_RELOC_ARM_TLS_DTPOFF32,
- BFD_RELOC_ARM_TLS_DTPMOD32,
- BFD_RELOC_ARM_TLS_TPOFF32,
- BFD_RELOC_ARM_TLS_IE32,
- BFD_RELOC_ARM_TLS_LE32,
- BFD_RELOC_ARM_TLS_GOTDESC,
- BFD_RELOC_ARM_TLS_CALL,
- BFD_RELOC_ARM_THM_TLS_CALL,
- BFD_RELOC_ARM_TLS_DESCSEQ,
- BFD_RELOC_ARM_THM_TLS_DESCSEQ,
- BFD_RELOC_ARM_TLS_DESC,
-
-/* ARM group relocations. */
- BFD_RELOC_ARM_ALU_PC_G0_NC,
- BFD_RELOC_ARM_ALU_PC_G0,
- BFD_RELOC_ARM_ALU_PC_G1_NC,
- BFD_RELOC_ARM_ALU_PC_G1,
- BFD_RELOC_ARM_ALU_PC_G2,
- BFD_RELOC_ARM_LDR_PC_G0,
- BFD_RELOC_ARM_LDR_PC_G1,
- BFD_RELOC_ARM_LDR_PC_G2,
- BFD_RELOC_ARM_LDRS_PC_G0,
- BFD_RELOC_ARM_LDRS_PC_G1,
- BFD_RELOC_ARM_LDRS_PC_G2,
- BFD_RELOC_ARM_LDC_PC_G0,
- BFD_RELOC_ARM_LDC_PC_G1,
- BFD_RELOC_ARM_LDC_PC_G2,
- BFD_RELOC_ARM_ALU_SB_G0_NC,
- BFD_RELOC_ARM_ALU_SB_G0,
- BFD_RELOC_ARM_ALU_SB_G1_NC,
- BFD_RELOC_ARM_ALU_SB_G1,
- BFD_RELOC_ARM_ALU_SB_G2,
- BFD_RELOC_ARM_LDR_SB_G0,
- BFD_RELOC_ARM_LDR_SB_G1,
- BFD_RELOC_ARM_LDR_SB_G2,
- BFD_RELOC_ARM_LDRS_SB_G0,
- BFD_RELOC_ARM_LDRS_SB_G1,
- BFD_RELOC_ARM_LDRS_SB_G2,
- BFD_RELOC_ARM_LDC_SB_G0,
- BFD_RELOC_ARM_LDC_SB_G1,
- BFD_RELOC_ARM_LDC_SB_G2,
-
-/* Annotation of BX instructions. */
- BFD_RELOC_ARM_V4BX,
-
-/* ARM support for STT_GNU_IFUNC. */
- BFD_RELOC_ARM_IRELATIVE,
-
-/* Thumb1 relocations to support execute-only code. */
- BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC,
- BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC,
- BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC,
- BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC,
-
-/* These relocs are only used within the ARM assembler. They are not
-(at present) written to any object files. */
- BFD_RELOC_ARM_IMMEDIATE,
- BFD_RELOC_ARM_ADRL_IMMEDIATE,
- BFD_RELOC_ARM_T32_IMMEDIATE,
- BFD_RELOC_ARM_T32_ADD_IMM,
- BFD_RELOC_ARM_T32_IMM12,
- BFD_RELOC_ARM_T32_ADD_PC12,
- BFD_RELOC_ARM_SHIFT_IMM,
- BFD_RELOC_ARM_SMC,
- BFD_RELOC_ARM_HVC,
- BFD_RELOC_ARM_SWI,
- BFD_RELOC_ARM_MULTI,
- BFD_RELOC_ARM_CP_OFF_IMM,
- BFD_RELOC_ARM_CP_OFF_IMM_S2,
- BFD_RELOC_ARM_T32_CP_OFF_IMM,
- BFD_RELOC_ARM_T32_CP_OFF_IMM_S2,
- BFD_RELOC_ARM_ADR_IMM,
- BFD_RELOC_ARM_LDR_IMM,
- BFD_RELOC_ARM_LITERAL,
- BFD_RELOC_ARM_IN_POOL,
- BFD_RELOC_ARM_OFFSET_IMM8,
- BFD_RELOC_ARM_T32_OFFSET_U8,
- BFD_RELOC_ARM_T32_OFFSET_IMM,
- BFD_RELOC_ARM_HWLITERAL,
- BFD_RELOC_ARM_THUMB_ADD,
- BFD_RELOC_ARM_THUMB_IMM,
- BFD_RELOC_ARM_THUMB_SHIFT,
-
-/* Renesas / SuperH SH relocs. Not all of these appear in object files. */
- BFD_RELOC_SH_PCDISP8BY2,
- BFD_RELOC_SH_PCDISP12BY2,
- BFD_RELOC_SH_IMM3,
- BFD_RELOC_SH_IMM3U,
- BFD_RELOC_SH_DISP12,
- BFD_RELOC_SH_DISP12BY2,
- BFD_RELOC_SH_DISP12BY4,
- BFD_RELOC_SH_DISP12BY8,
- BFD_RELOC_SH_DISP20,
- BFD_RELOC_SH_DISP20BY8,
- BFD_RELOC_SH_IMM4,
- BFD_RELOC_SH_IMM4BY2,
- BFD_RELOC_SH_IMM4BY4,
- BFD_RELOC_SH_IMM8,
- BFD_RELOC_SH_IMM8BY2,
- BFD_RELOC_SH_IMM8BY4,
- BFD_RELOC_SH_PCRELIMM8BY2,
- BFD_RELOC_SH_PCRELIMM8BY4,
- BFD_RELOC_SH_SWITCH16,
- BFD_RELOC_SH_SWITCH32,
- BFD_RELOC_SH_USES,
- BFD_RELOC_SH_COUNT,
- BFD_RELOC_SH_ALIGN,
- BFD_RELOC_SH_CODE,
- BFD_RELOC_SH_DATA,
- BFD_RELOC_SH_LABEL,
- BFD_RELOC_SH_LOOP_START,
- BFD_RELOC_SH_LOOP_END,
- BFD_RELOC_SH_COPY,
- BFD_RELOC_SH_GLOB_DAT,
- BFD_RELOC_SH_JMP_SLOT,
- BFD_RELOC_SH_RELATIVE,
- BFD_RELOC_SH_GOTPC,
- BFD_RELOC_SH_GOT_LOW16,
- BFD_RELOC_SH_GOT_MEDLOW16,
- BFD_RELOC_SH_GOT_MEDHI16,
- BFD_RELOC_SH_GOT_HI16,
- BFD_RELOC_SH_GOTPLT_LOW16,
- BFD_RELOC_SH_GOTPLT_MEDLOW16,
- BFD_RELOC_SH_GOTPLT_MEDHI16,
- BFD_RELOC_SH_GOTPLT_HI16,
- BFD_RELOC_SH_PLT_LOW16,
- BFD_RELOC_SH_PLT_MEDLOW16,
- BFD_RELOC_SH_PLT_MEDHI16,
- BFD_RELOC_SH_PLT_HI16,
- BFD_RELOC_SH_GOTOFF_LOW16,
- BFD_RELOC_SH_GOTOFF_MEDLOW16,
- BFD_RELOC_SH_GOTOFF_MEDHI16,
- BFD_RELOC_SH_GOTOFF_HI16,
- BFD_RELOC_SH_GOTPC_LOW16,
- BFD_RELOC_SH_GOTPC_MEDLOW16,
- BFD_RELOC_SH_GOTPC_MEDHI16,
- BFD_RELOC_SH_GOTPC_HI16,
- BFD_RELOC_SH_COPY64,
- BFD_RELOC_SH_GLOB_DAT64,
- BFD_RELOC_SH_JMP_SLOT64,
- BFD_RELOC_SH_RELATIVE64,
- BFD_RELOC_SH_GOT10BY4,
- BFD_RELOC_SH_GOT10BY8,
- BFD_RELOC_SH_GOTPLT10BY4,
- BFD_RELOC_SH_GOTPLT10BY8,
- BFD_RELOC_SH_GOTPLT32,
- BFD_RELOC_SH_SHMEDIA_CODE,
- BFD_RELOC_SH_IMMU5,
- BFD_RELOC_SH_IMMS6,
- BFD_RELOC_SH_IMMS6BY32,
- BFD_RELOC_SH_IMMU6,
- BFD_RELOC_SH_IMMS10,
- BFD_RELOC_SH_IMMS10BY2,
- BFD_RELOC_SH_IMMS10BY4,
- BFD_RELOC_SH_IMMS10BY8,
- BFD_RELOC_SH_IMMS16,
- BFD_RELOC_SH_IMMU16,
- BFD_RELOC_SH_IMM_LOW16,
- BFD_RELOC_SH_IMM_LOW16_PCREL,
- BFD_RELOC_SH_IMM_MEDLOW16,
- BFD_RELOC_SH_IMM_MEDLOW16_PCREL,
- BFD_RELOC_SH_IMM_MEDHI16,
- BFD_RELOC_SH_IMM_MEDHI16_PCREL,
- BFD_RELOC_SH_IMM_HI16,
- BFD_RELOC_SH_IMM_HI16_PCREL,
- BFD_RELOC_SH_PT_16,
- BFD_RELOC_SH_TLS_GD_32,
- BFD_RELOC_SH_TLS_LD_32,
- BFD_RELOC_SH_TLS_LDO_32,
- BFD_RELOC_SH_TLS_IE_32,
- BFD_RELOC_SH_TLS_LE_32,
- BFD_RELOC_SH_TLS_DTPMOD32,
- BFD_RELOC_SH_TLS_DTPOFF32,
- BFD_RELOC_SH_TLS_TPOFF32,
- BFD_RELOC_SH_GOT20,
- BFD_RELOC_SH_GOTOFF20,
- BFD_RELOC_SH_GOTFUNCDESC,
- BFD_RELOC_SH_GOTFUNCDESC20,
- BFD_RELOC_SH_GOTOFFFUNCDESC,
- BFD_RELOC_SH_GOTOFFFUNCDESC20,
- BFD_RELOC_SH_FUNCDESC,
-
-/* ARC relocs. */
- BFD_RELOC_ARC_NONE,
- BFD_RELOC_ARC_8,
- BFD_RELOC_ARC_16,
- BFD_RELOC_ARC_24,
- BFD_RELOC_ARC_32,
- BFD_RELOC_ARC_N8,
- BFD_RELOC_ARC_N16,
- BFD_RELOC_ARC_N24,
- BFD_RELOC_ARC_N32,
- BFD_RELOC_ARC_SDA,
- BFD_RELOC_ARC_SECTOFF,
- BFD_RELOC_ARC_S21H_PCREL,
- BFD_RELOC_ARC_S21W_PCREL,
- BFD_RELOC_ARC_S25H_PCREL,
- BFD_RELOC_ARC_S25W_PCREL,
- BFD_RELOC_ARC_SDA32,
- BFD_RELOC_ARC_SDA_LDST,
- BFD_RELOC_ARC_SDA_LDST1,
- BFD_RELOC_ARC_SDA_LDST2,
- BFD_RELOC_ARC_SDA16_LD,
- BFD_RELOC_ARC_SDA16_LD1,
- BFD_RELOC_ARC_SDA16_LD2,
- BFD_RELOC_ARC_S13_PCREL,
- BFD_RELOC_ARC_W,
- BFD_RELOC_ARC_32_ME,
- BFD_RELOC_ARC_32_ME_S,
- BFD_RELOC_ARC_N32_ME,
- BFD_RELOC_ARC_SECTOFF_ME,
- BFD_RELOC_ARC_SDA32_ME,
- BFD_RELOC_ARC_W_ME,
- BFD_RELOC_AC_SECTOFF_U8,
- BFD_RELOC_AC_SECTOFF_U8_1,
- BFD_RELOC_AC_SECTOFF_U8_2,
- BFD_RELOC_AC_SECTOFF_S9,
- BFD_RELOC_AC_SECTOFF_S9_1,
- BFD_RELOC_AC_SECTOFF_S9_2,
- BFD_RELOC_ARC_SECTOFF_ME_1,
- BFD_RELOC_ARC_SECTOFF_ME_2,
- BFD_RELOC_ARC_SECTOFF_1,
- BFD_RELOC_ARC_SECTOFF_2,
- BFD_RELOC_ARC_SDA_12,
- BFD_RELOC_ARC_SDA16_ST2,
- BFD_RELOC_ARC_32_PCREL,
- BFD_RELOC_ARC_PC32,
- BFD_RELOC_ARC_GOT32,
- BFD_RELOC_ARC_GOTPC32,
- BFD_RELOC_ARC_PLT32,
- BFD_RELOC_ARC_COPY,
- BFD_RELOC_ARC_GLOB_DAT,
- BFD_RELOC_ARC_JMP_SLOT,
- BFD_RELOC_ARC_RELATIVE,
- BFD_RELOC_ARC_GOTOFF,
- BFD_RELOC_ARC_GOTPC,
- BFD_RELOC_ARC_S21W_PCREL_PLT,
- BFD_RELOC_ARC_S25H_PCREL_PLT,
- BFD_RELOC_ARC_TLS_DTPMOD,
- BFD_RELOC_ARC_TLS_TPOFF,
- BFD_RELOC_ARC_TLS_GD_GOT,
- BFD_RELOC_ARC_TLS_GD_LD,
- BFD_RELOC_ARC_TLS_GD_CALL,
- BFD_RELOC_ARC_TLS_IE_GOT,
- BFD_RELOC_ARC_TLS_DTPOFF,
- BFD_RELOC_ARC_TLS_DTPOFF_S9,
- BFD_RELOC_ARC_TLS_LE_S9,
- BFD_RELOC_ARC_TLS_LE_32,
- BFD_RELOC_ARC_S25W_PCREL_PLT,
- BFD_RELOC_ARC_S21H_PCREL_PLT,
- BFD_RELOC_ARC_NPS_CMEM16,
- BFD_RELOC_ARC_JLI_SECTOFF,
-
-/* ADI Blackfin 16 bit immediate absolute reloc. */
- BFD_RELOC_BFIN_16_IMM,
-
-/* ADI Blackfin 16 bit immediate absolute reloc higher 16 bits. */
- BFD_RELOC_BFIN_16_HIGH,
-
-/* ADI Blackfin 'a' part of LSETUP. */
- BFD_RELOC_BFIN_4_PCREL,
-
-/* ADI Blackfin. */
- BFD_RELOC_BFIN_5_PCREL,
-
-/* ADI Blackfin 16 bit immediate absolute reloc lower 16 bits. */
- BFD_RELOC_BFIN_16_LOW,
-
-/* ADI Blackfin. */
- BFD_RELOC_BFIN_10_PCREL,
-
-/* ADI Blackfin 'b' part of LSETUP. */
- BFD_RELOC_BFIN_11_PCREL,
-
-/* ADI Blackfin. */
- BFD_RELOC_BFIN_12_PCREL_JUMP,
-
-/* ADI Blackfin Short jump, pcrel. */
- BFD_RELOC_BFIN_12_PCREL_JUMP_S,
-
-/* ADI Blackfin Call.x not implemented. */
- BFD_RELOC_BFIN_24_PCREL_CALL_X,
-
-/* ADI Blackfin Long Jump pcrel. */
- BFD_RELOC_BFIN_24_PCREL_JUMP_L,
-
-/* ADI Blackfin FD-PIC relocations. */
- BFD_RELOC_BFIN_GOT17M4,
- BFD_RELOC_BFIN_GOTHI,
- BFD_RELOC_BFIN_GOTLO,
- BFD_RELOC_BFIN_FUNCDESC,
- BFD_RELOC_BFIN_FUNCDESC_GOT17M4,
- BFD_RELOC_BFIN_FUNCDESC_GOTHI,
- BFD_RELOC_BFIN_FUNCDESC_GOTLO,
- BFD_RELOC_BFIN_FUNCDESC_VALUE,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO,
- BFD_RELOC_BFIN_GOTOFF17M4,
- BFD_RELOC_BFIN_GOTOFFHI,
- BFD_RELOC_BFIN_GOTOFFLO,
-
-/* ADI Blackfin GOT relocation. */
- BFD_RELOC_BFIN_GOT,
-
-/* ADI Blackfin PLTPC relocation. */
- BFD_RELOC_BFIN_PLTPC,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_PUSH,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_CONST,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_ADD,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_SUB,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_MULT,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_DIV,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_MOD,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LSHIFT,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_RSHIFT,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_AND,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_OR,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_XOR,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LAND,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LOR,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LEN,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_NEG,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_COMP,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_PAGE,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_HWPAGE,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_ADDR,
-
-/* Mitsubishi D10V relocs.
-This is a 10-bit reloc with the right 2 bits
-assumed to be 0. */
- BFD_RELOC_D10V_10_PCREL_R,
-
-/* Mitsubishi D10V relocs.
-This is a 10-bit reloc with the right 2 bits
-assumed to be 0. This is the same as the previous reloc
-except it is in the left container, i.e.,
-shifted left 15 bits. */
- BFD_RELOC_D10V_10_PCREL_L,
-
-/* This is an 18-bit reloc with the right 2 bits
-assumed to be 0. */
- BFD_RELOC_D10V_18,
-
-/* This is an 18-bit reloc with the right 2 bits
-assumed to be 0. */
- BFD_RELOC_D10V_18_PCREL,
-
-/* Mitsubishi D30V relocs.
-This is a 6-bit absolute reloc. */
- BFD_RELOC_D30V_6,
-
-/* This is a 6-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_9_PCREL,
-
-/* This is a 6-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
- BFD_RELOC_D30V_9_PCREL_R,
-
-/* This is a 12-bit absolute reloc with the
-right 3 bitsassumed to be 0. */
- BFD_RELOC_D30V_15,
-
-/* This is a 12-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_15_PCREL,
-
-/* This is a 12-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
- BFD_RELOC_D30V_15_PCREL_R,
-
-/* This is an 18-bit absolute reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_21,
-
-/* This is an 18-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_21_PCREL,
-
-/* This is an 18-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
- BFD_RELOC_D30V_21_PCREL_R,
-
-/* This is a 32-bit absolute reloc. */
- BFD_RELOC_D30V_32,
-
-/* This is a 32-bit pc-relative reloc. */
- BFD_RELOC_D30V_32_PCREL,
-
-/* DLX relocs */
- BFD_RELOC_DLX_HI16_S,
-
-/* DLX relocs */
- BFD_RELOC_DLX_LO16,
-
-/* DLX relocs */
- BFD_RELOC_DLX_JMP26,
-
-/* Renesas M16C/M32C Relocations. */
- BFD_RELOC_M32C_HI8,
- BFD_RELOC_M32C_RL_JUMP,
- BFD_RELOC_M32C_RL_1ADDR,
- BFD_RELOC_M32C_RL_2ADDR,
-
-/* Renesas M32R (formerly Mitsubishi M32R) relocs.
-This is a 24 bit absolute address. */
- BFD_RELOC_M32R_24,
-
-/* This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0. */
- BFD_RELOC_M32R_10_PCREL,
-
-/* This is an 18-bit reloc with the right 2 bits assumed to be 0. */
- BFD_RELOC_M32R_18_PCREL,
-
-/* This is a 26-bit reloc with the right 2 bits assumed to be 0. */
- BFD_RELOC_M32R_26_PCREL,
-
-/* This is a 16-bit reloc containing the high 16 bits of an address
-used when the lower 16 bits are treated as unsigned. */
- BFD_RELOC_M32R_HI16_ULO,
-
-/* This is a 16-bit reloc containing the high 16 bits of an address
-used when the lower 16 bits are treated as signed. */
- BFD_RELOC_M32R_HI16_SLO,
-
-/* This is a 16-bit reloc containing the lower 16 bits of an address. */
- BFD_RELOC_M32R_LO16,
-
-/* This is a 16-bit reloc containing the small data area offset for use in
-add3, load, and store instructions. */
- BFD_RELOC_M32R_SDA16,
-
-/* For PIC. */
- BFD_RELOC_M32R_GOT24,
- BFD_RELOC_M32R_26_PLTREL,
- BFD_RELOC_M32R_COPY,
- BFD_RELOC_M32R_GLOB_DAT,
- BFD_RELOC_M32R_JMP_SLOT,
- BFD_RELOC_M32R_RELATIVE,
- BFD_RELOC_M32R_GOTOFF,
- BFD_RELOC_M32R_GOTOFF_HI_ULO,
- BFD_RELOC_M32R_GOTOFF_HI_SLO,
- BFD_RELOC_M32R_GOTOFF_LO,
- BFD_RELOC_M32R_GOTPC24,
- BFD_RELOC_M32R_GOT16_HI_ULO,
- BFD_RELOC_M32R_GOT16_HI_SLO,
- BFD_RELOC_M32R_GOT16_LO,
- BFD_RELOC_M32R_GOTPC_HI_ULO,
- BFD_RELOC_M32R_GOTPC_HI_SLO,
- BFD_RELOC_M32R_GOTPC_LO,
-
-/* NDS32 relocs.
-This is a 20 bit absolute address. */
- BFD_RELOC_NDS32_20,
-
-/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_9_PCREL,
-
-/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_WORD_9_PCREL,
-
-/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_15_PCREL,
-
-/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_17_PCREL,
-
-/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_25_PCREL,
-
-/* This is a 20-bit reloc containing the high 20 bits of an address
-used with the lower 12 bits */
- BFD_RELOC_NDS32_HI20,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift right by 3. This is used with ldi,sdi... */
- BFD_RELOC_NDS32_LO12S3,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 2. This is used with lwi,swi... */
- BFD_RELOC_NDS32_LO12S2,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 1. This is used with lhi,shi... */
- BFD_RELOC_NDS32_LO12S1,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 0. This is used with lbisbi... */
- BFD_RELOC_NDS32_LO12S0,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 0. This is only used with branch relaxations */
- BFD_RELOC_NDS32_LO12S0_ORI,
-
-/* This is a 15-bit reloc containing the small data area 18-bit signed offset
-and shift left by 3 for use in ldi, sdi... */
- BFD_RELOC_NDS32_SDA15S3,
-
-/* This is a 15-bit reloc containing the small data area 17-bit signed offset
-and shift left by 2 for use in lwi, swi... */
- BFD_RELOC_NDS32_SDA15S2,
-
-/* This is a 15-bit reloc containing the small data area 16-bit signed offset
-and shift left by 1 for use in lhi, shi... */
- BFD_RELOC_NDS32_SDA15S1,
-
-/* This is a 15-bit reloc containing the small data area 15-bit signed offset
-and shift left by 0 for use in lbi, sbi... */
- BFD_RELOC_NDS32_SDA15S0,
-
-/* This is a 16-bit reloc containing the small data area 16-bit signed offset
-and shift left by 3 */
- BFD_RELOC_NDS32_SDA16S3,
-
-/* This is a 17-bit reloc containing the small data area 17-bit signed offset
-and shift left by 2 for use in lwi.gp, swi.gp... */
- BFD_RELOC_NDS32_SDA17S2,
-
-/* This is a 18-bit reloc containing the small data area 18-bit signed offset
-and shift left by 1 for use in lhi.gp, shi.gp... */
- BFD_RELOC_NDS32_SDA18S1,
-
-/* This is a 19-bit reloc containing the small data area 19-bit signed offset
-and shift left by 0 for use in lbi.gp, sbi.gp... */
- BFD_RELOC_NDS32_SDA19S0,
-
-/* for PIC */
- BFD_RELOC_NDS32_GOT20,
- BFD_RELOC_NDS32_9_PLTREL,
- BFD_RELOC_NDS32_25_PLTREL,
- BFD_RELOC_NDS32_COPY,
- BFD_RELOC_NDS32_GLOB_DAT,
- BFD_RELOC_NDS32_JMP_SLOT,
- BFD_RELOC_NDS32_RELATIVE,
- BFD_RELOC_NDS32_GOTOFF,
- BFD_RELOC_NDS32_GOTOFF_HI20,
- BFD_RELOC_NDS32_GOTOFF_LO12,
- BFD_RELOC_NDS32_GOTPC20,
- BFD_RELOC_NDS32_GOT_HI20,
- BFD_RELOC_NDS32_GOT_LO12,
- BFD_RELOC_NDS32_GOTPC_HI20,
- BFD_RELOC_NDS32_GOTPC_LO12,
-
-/* for relax */
- BFD_RELOC_NDS32_INSN16,
- BFD_RELOC_NDS32_LABEL,
- BFD_RELOC_NDS32_LONGCALL1,
- BFD_RELOC_NDS32_LONGCALL2,
- BFD_RELOC_NDS32_LONGCALL3,
- BFD_RELOC_NDS32_LONGJUMP1,
- BFD_RELOC_NDS32_LONGJUMP2,
- BFD_RELOC_NDS32_LONGJUMP3,
- BFD_RELOC_NDS32_LOADSTORE,
- BFD_RELOC_NDS32_9_FIXED,
- BFD_RELOC_NDS32_15_FIXED,
- BFD_RELOC_NDS32_17_FIXED,
- BFD_RELOC_NDS32_25_FIXED,
- BFD_RELOC_NDS32_LONGCALL4,
- BFD_RELOC_NDS32_LONGCALL5,
- BFD_RELOC_NDS32_LONGCALL6,
- BFD_RELOC_NDS32_LONGJUMP4,
- BFD_RELOC_NDS32_LONGJUMP5,
- BFD_RELOC_NDS32_LONGJUMP6,
- BFD_RELOC_NDS32_LONGJUMP7,
-
-/* for PIC */
- BFD_RELOC_NDS32_PLTREL_HI20,
- BFD_RELOC_NDS32_PLTREL_LO12,
- BFD_RELOC_NDS32_PLT_GOTREL_HI20,
- BFD_RELOC_NDS32_PLT_GOTREL_LO12,
-
-/* for floating point */
- BFD_RELOC_NDS32_SDA12S2_DP,
- BFD_RELOC_NDS32_SDA12S2_SP,
- BFD_RELOC_NDS32_LO12S2_DP,
- BFD_RELOC_NDS32_LO12S2_SP,
-
-/* for dwarf2 debug_line. */
- BFD_RELOC_NDS32_DWARF2_OP1,
- BFD_RELOC_NDS32_DWARF2_OP2,
- BFD_RELOC_NDS32_DWARF2_LEB,
-
-/* for eliminate 16-bit instructions */
- BFD_RELOC_NDS32_UPDATE_TA,
-
-/* for PIC object relaxation */
- BFD_RELOC_NDS32_PLT_GOTREL_LO20,
- BFD_RELOC_NDS32_PLT_GOTREL_LO15,
- BFD_RELOC_NDS32_PLT_GOTREL_LO19,
- BFD_RELOC_NDS32_GOT_LO15,
- BFD_RELOC_NDS32_GOT_LO19,
- BFD_RELOC_NDS32_GOTOFF_LO15,
- BFD_RELOC_NDS32_GOTOFF_LO19,
- BFD_RELOC_NDS32_GOT15S2,
- BFD_RELOC_NDS32_GOT17S2,
-
-/* NDS32 relocs.
-This is a 5 bit absolute address. */
- BFD_RELOC_NDS32_5,
-
-/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_10_UPCREL,
-
-/* If fp were omitted, fp can used as another gp. */
- BFD_RELOC_NDS32_SDA_FP7U2_RELA,
-
-/* relaxation relative relocation types */
- BFD_RELOC_NDS32_RELAX_ENTRY,
- BFD_RELOC_NDS32_GOT_SUFF,
- BFD_RELOC_NDS32_GOTOFF_SUFF,
- BFD_RELOC_NDS32_PLT_GOT_SUFF,
- BFD_RELOC_NDS32_MULCALL_SUFF,
- BFD_RELOC_NDS32_PTR,
- BFD_RELOC_NDS32_PTR_COUNT,
- BFD_RELOC_NDS32_PTR_RESOLVED,
- BFD_RELOC_NDS32_PLTBLOCK,
- BFD_RELOC_NDS32_RELAX_REGION_BEGIN,
- BFD_RELOC_NDS32_RELAX_REGION_END,
- BFD_RELOC_NDS32_MINUEND,
- BFD_RELOC_NDS32_SUBTRAHEND,
- BFD_RELOC_NDS32_DIFF8,
- BFD_RELOC_NDS32_DIFF16,
- BFD_RELOC_NDS32_DIFF32,
- BFD_RELOC_NDS32_DIFF_ULEB128,
- BFD_RELOC_NDS32_EMPTY,
-
-/* This is a 25 bit absolute address. */
- BFD_RELOC_NDS32_25_ABS,
-
-/* For ex9 and ifc using. */
- BFD_RELOC_NDS32_DATA,
- BFD_RELOC_NDS32_TRAN,
- BFD_RELOC_NDS32_17IFC_PCREL,
- BFD_RELOC_NDS32_10IFCU_PCREL,
-
-/* For TLS. */
- BFD_RELOC_NDS32_TPOFF,
- BFD_RELOC_NDS32_GOTTPOFF,
- BFD_RELOC_NDS32_TLS_LE_HI20,
- BFD_RELOC_NDS32_TLS_LE_LO12,
- BFD_RELOC_NDS32_TLS_LE_20,
- BFD_RELOC_NDS32_TLS_LE_15S0,
- BFD_RELOC_NDS32_TLS_LE_15S1,
- BFD_RELOC_NDS32_TLS_LE_15S2,
- BFD_RELOC_NDS32_TLS_LE_ADD,
- BFD_RELOC_NDS32_TLS_LE_LS,
- BFD_RELOC_NDS32_TLS_IE_HI20,
- BFD_RELOC_NDS32_TLS_IE_LO12,
- BFD_RELOC_NDS32_TLS_IE_LO12S2,
- BFD_RELOC_NDS32_TLS_IEGP_HI20,
- BFD_RELOC_NDS32_TLS_IEGP_LO12,
- BFD_RELOC_NDS32_TLS_IEGP_LO12S2,
- BFD_RELOC_NDS32_TLS_IEGP_LW,
- BFD_RELOC_NDS32_TLS_DESC,
- BFD_RELOC_NDS32_TLS_DESC_HI20,
- BFD_RELOC_NDS32_TLS_DESC_LO12,
- BFD_RELOC_NDS32_TLS_DESC_20,
- BFD_RELOC_NDS32_TLS_DESC_SDA17S2,
- BFD_RELOC_NDS32_TLS_DESC_ADD,
- BFD_RELOC_NDS32_TLS_DESC_FUNC,
- BFD_RELOC_NDS32_TLS_DESC_CALL,
- BFD_RELOC_NDS32_TLS_DESC_MEM,
- BFD_RELOC_NDS32_REMOVE,
- BFD_RELOC_NDS32_GROUP,
-
-/* For floating load store relaxation. */
- BFD_RELOC_NDS32_LSI,
-
-/* This is a 9-bit reloc */
- BFD_RELOC_V850_9_PCREL,
-
-/* This is a 22-bit reloc */
- BFD_RELOC_V850_22_PCREL,
-
-/* This is a 16 bit offset from the short data area pointer. */
- BFD_RELOC_V850_SDA_16_16_OFFSET,
-
-/* This is a 16 bit offset (of which only 15 bits are used) from the
-short data area pointer. */
- BFD_RELOC_V850_SDA_15_16_OFFSET,
-
-/* This is a 16 bit offset from the zero data area pointer. */
- BFD_RELOC_V850_ZDA_16_16_OFFSET,
-
-/* This is a 16 bit offset (of which only 15 bits are used) from the
-zero data area pointer. */
- BFD_RELOC_V850_ZDA_15_16_OFFSET,
-
-/* This is an 8 bit offset (of which only 6 bits are used) from the
-tiny data area pointer. */
- BFD_RELOC_V850_TDA_6_8_OFFSET,
-
-/* This is an 8bit offset (of which only 7 bits are used) from the tiny
-data area pointer. */
- BFD_RELOC_V850_TDA_7_8_OFFSET,
-
-/* This is a 7 bit offset from the tiny data area pointer. */
- BFD_RELOC_V850_TDA_7_7_OFFSET,
-
-/* This is a 16 bit offset from the tiny data area pointer. */
- BFD_RELOC_V850_TDA_16_16_OFFSET,
-
-/* This is a 5 bit offset (of which only 4 bits are used) from the tiny
-data area pointer. */
- BFD_RELOC_V850_TDA_4_5_OFFSET,
-
-/* This is a 4 bit offset from the tiny data area pointer. */
- BFD_RELOC_V850_TDA_4_4_OFFSET,
-
-/* This is a 16 bit offset from the short data area pointer, with the
-bits placed non-contiguously in the instruction. */
- BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET,
-
-/* This is a 16 bit offset from the zero data area pointer, with the
-bits placed non-contiguously in the instruction. */
- BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET,
-
-/* This is a 6 bit offset from the call table base pointer. */
- BFD_RELOC_V850_CALLT_6_7_OFFSET,
-
-/* This is a 16 bit offset from the call table base pointer. */
- BFD_RELOC_V850_CALLT_16_16_OFFSET,
-
-/* Used for relaxing indirect function calls. */
- BFD_RELOC_V850_LONGCALL,
-
-/* Used for relaxing indirect jumps. */
- BFD_RELOC_V850_LONGJUMP,
-
-/* Used to maintain alignment whilst relaxing. */
- BFD_RELOC_V850_ALIGN,
-
-/* This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu
-instructions. */
- BFD_RELOC_V850_LO16_SPLIT_OFFSET,
-
-/* This is a 16-bit reloc. */
- BFD_RELOC_V850_16_PCREL,
-
-/* This is a 17-bit reloc. */
- BFD_RELOC_V850_17_PCREL,
-
-/* This is a 23-bit reloc. */
- BFD_RELOC_V850_23,
-
-/* This is a 32-bit reloc. */
- BFD_RELOC_V850_32_PCREL,
-
-/* This is a 32-bit reloc. */
- BFD_RELOC_V850_32_ABS,
-
-/* This is a 16-bit reloc. */
- BFD_RELOC_V850_16_SPLIT_OFFSET,
-
-/* This is a 16-bit reloc. */
- BFD_RELOC_V850_16_S1,
-
-/* Low 16 bits. 16 bit shifted by 1. */
- BFD_RELOC_V850_LO16_S1,
-
-/* This is a 16 bit offset from the call table base pointer. */
- BFD_RELOC_V850_CALLT_15_16_OFFSET,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_GOTPCREL,
-
-/* DSO relocations. */
- BFD_RELOC_V850_16_GOT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_GOT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_22_PLT_PCREL,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_PLT_PCREL,
-
-/* DSO relocations. */
- BFD_RELOC_V850_COPY,
-
-/* DSO relocations. */
- BFD_RELOC_V850_GLOB_DAT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_JMP_SLOT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_RELATIVE,
-
-/* DSO relocations. */
- BFD_RELOC_V850_16_GOTOFF,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_GOTOFF,
-
-/* start code. */
- BFD_RELOC_V850_CODE,
-
-/* start data in text. */
- BFD_RELOC_V850_DATA,
-
-/* This is a 8bit DP reloc for the tms320c30, where the most
-significant 8 bits of a 24 bit word are placed into the least
-significant 8 bits of the opcode. */
- BFD_RELOC_TIC30_LDP,
-
-/* This is a 7bit reloc for the tms320c54x, where the least
-significant 7 bits of a 16 bit word are placed into the least
-significant 7 bits of the opcode. */
- BFD_RELOC_TIC54X_PARTLS7,
-
-/* This is a 9bit DP reloc for the tms320c54x, where the most
-significant 9 bits of a 16 bit word are placed into the least
-significant 9 bits of the opcode. */
- BFD_RELOC_TIC54X_PARTMS9,
-
-/* This is an extended address 23-bit reloc for the tms320c54x. */
- BFD_RELOC_TIC54X_23,
-
-/* This is a 16-bit reloc for the tms320c54x, where the least
-significant 16 bits of a 23-bit extended address are placed into
-the opcode. */
- BFD_RELOC_TIC54X_16_OF_23,
-
-/* This is a reloc for the tms320c54x, where the most
-significant 7 bits of a 23-bit extended address are placed into
-the opcode. */
- BFD_RELOC_TIC54X_MS7_OF_23,
-
-/* TMS320C6000 relocations. */
- BFD_RELOC_C6000_PCR_S21,
- BFD_RELOC_C6000_PCR_S12,
- BFD_RELOC_C6000_PCR_S10,
- BFD_RELOC_C6000_PCR_S7,
- BFD_RELOC_C6000_ABS_S16,
- BFD_RELOC_C6000_ABS_L16,
- BFD_RELOC_C6000_ABS_H16,
- BFD_RELOC_C6000_SBR_U15_B,
- BFD_RELOC_C6000_SBR_U15_H,
- BFD_RELOC_C6000_SBR_U15_W,
- BFD_RELOC_C6000_SBR_S16,
- BFD_RELOC_C6000_SBR_L16_B,
- BFD_RELOC_C6000_SBR_L16_H,
- BFD_RELOC_C6000_SBR_L16_W,
- BFD_RELOC_C6000_SBR_H16_B,
- BFD_RELOC_C6000_SBR_H16_H,
- BFD_RELOC_C6000_SBR_H16_W,
- BFD_RELOC_C6000_SBR_GOT_U15_W,
- BFD_RELOC_C6000_SBR_GOT_L16_W,
- BFD_RELOC_C6000_SBR_GOT_H16_W,
- BFD_RELOC_C6000_DSBT_INDEX,
- BFD_RELOC_C6000_PREL31,
- BFD_RELOC_C6000_COPY,
- BFD_RELOC_C6000_JUMP_SLOT,
- BFD_RELOC_C6000_EHTYPE,
- BFD_RELOC_C6000_PCR_H16,
- BFD_RELOC_C6000_PCR_L16,
- BFD_RELOC_C6000_ALIGN,
- BFD_RELOC_C6000_FPHEAD,
- BFD_RELOC_C6000_NOCMP,
-
-/* This is a 48 bit reloc for the FR30 that stores 32 bits. */
- BFD_RELOC_FR30_48,
-
-/* This is a 32 bit reloc for the FR30 that stores 20 bits split up into
-two sections. */
- BFD_RELOC_FR30_20,
-
-/* This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in
-4 bits. */
- BFD_RELOC_FR30_6_IN_4,
-
-/* This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset
-into 8 bits. */
- BFD_RELOC_FR30_8_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 9 bit short offset
-into 8 bits. */
- BFD_RELOC_FR30_9_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 10 bit word offset
-into 8 bits. */
- BFD_RELOC_FR30_10_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
-short offset into 8 bits. */
- BFD_RELOC_FR30_9_PCREL,
-
-/* This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative
-short offset into 11 bits. */
- BFD_RELOC_FR30_12_PCREL,
-
-/* Motorola Mcore relocations. */
- BFD_RELOC_MCORE_PCREL_IMM8BY4,
- BFD_RELOC_MCORE_PCREL_IMM11BY2,
- BFD_RELOC_MCORE_PCREL_IMM4BY2,
- BFD_RELOC_MCORE_PCREL_32,
- BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2,
- BFD_RELOC_MCORE_RVA,
-
-/* Toshiba Media Processor Relocations. */
- BFD_RELOC_MEP_8,
- BFD_RELOC_MEP_16,
- BFD_RELOC_MEP_32,
- BFD_RELOC_MEP_PCREL8A2,
- BFD_RELOC_MEP_PCREL12A2,
- BFD_RELOC_MEP_PCREL17A2,
- BFD_RELOC_MEP_PCREL24A2,
- BFD_RELOC_MEP_PCABS24A2,
- BFD_RELOC_MEP_LOW16,
- BFD_RELOC_MEP_HI16U,
- BFD_RELOC_MEP_HI16S,
- BFD_RELOC_MEP_GPREL,
- BFD_RELOC_MEP_TPREL,
- BFD_RELOC_MEP_TPREL7,
- BFD_RELOC_MEP_TPREL7A2,
- BFD_RELOC_MEP_TPREL7A4,
- BFD_RELOC_MEP_UIMM24,
- BFD_RELOC_MEP_ADDR24A4,
- BFD_RELOC_MEP_GNU_VTINHERIT,
- BFD_RELOC_MEP_GNU_VTENTRY,
-
-
-/* Imagination Technologies Meta relocations. */
- BFD_RELOC_METAG_HIADDR16,
- BFD_RELOC_METAG_LOADDR16,
- BFD_RELOC_METAG_RELBRANCH,
- BFD_RELOC_METAG_GETSETOFF,
- BFD_RELOC_METAG_HIOG,
- BFD_RELOC_METAG_LOOG,
- BFD_RELOC_METAG_REL8,
- BFD_RELOC_METAG_REL16,
- BFD_RELOC_METAG_HI16_GOTOFF,
- BFD_RELOC_METAG_LO16_GOTOFF,
- BFD_RELOC_METAG_GETSET_GOTOFF,
- BFD_RELOC_METAG_GETSET_GOT,
- BFD_RELOC_METAG_HI16_GOTPC,
- BFD_RELOC_METAG_LO16_GOTPC,
- BFD_RELOC_METAG_HI16_PLT,
- BFD_RELOC_METAG_LO16_PLT,
- BFD_RELOC_METAG_RELBRANCH_PLT,
- BFD_RELOC_METAG_GOTOFF,
- BFD_RELOC_METAG_PLT,
- BFD_RELOC_METAG_COPY,
- BFD_RELOC_METAG_JMP_SLOT,
- BFD_RELOC_METAG_RELATIVE,
- BFD_RELOC_METAG_GLOB_DAT,
- BFD_RELOC_METAG_TLS_GD,
- BFD_RELOC_METAG_TLS_LDM,
- BFD_RELOC_METAG_TLS_LDO_HI16,
- BFD_RELOC_METAG_TLS_LDO_LO16,
- BFD_RELOC_METAG_TLS_LDO,
- BFD_RELOC_METAG_TLS_IE,
- BFD_RELOC_METAG_TLS_IENONPIC,
- BFD_RELOC_METAG_TLS_IENONPIC_HI16,
- BFD_RELOC_METAG_TLS_IENONPIC_LO16,
- BFD_RELOC_METAG_TLS_TPOFF,
- BFD_RELOC_METAG_TLS_DTPMOD,
- BFD_RELOC_METAG_TLS_DTPOFF,
- BFD_RELOC_METAG_TLS_LE,
- BFD_RELOC_METAG_TLS_LE_HI16,
- BFD_RELOC_METAG_TLS_LE_LO16,
-
-/* These are relocations for the GETA instruction. */
- BFD_RELOC_MMIX_GETA,
- BFD_RELOC_MMIX_GETA_1,
- BFD_RELOC_MMIX_GETA_2,
- BFD_RELOC_MMIX_GETA_3,
-
-/* These are relocations for a conditional branch instruction. */
- BFD_RELOC_MMIX_CBRANCH,
- BFD_RELOC_MMIX_CBRANCH_J,
- BFD_RELOC_MMIX_CBRANCH_1,
- BFD_RELOC_MMIX_CBRANCH_2,
- BFD_RELOC_MMIX_CBRANCH_3,
-
-/* These are relocations for the PUSHJ instruction. */
- BFD_RELOC_MMIX_PUSHJ,
- BFD_RELOC_MMIX_PUSHJ_1,
- BFD_RELOC_MMIX_PUSHJ_2,
- BFD_RELOC_MMIX_PUSHJ_3,
- BFD_RELOC_MMIX_PUSHJ_STUBBABLE,
-
-/* These are relocations for the JMP instruction. */
- BFD_RELOC_MMIX_JMP,
- BFD_RELOC_MMIX_JMP_1,
- BFD_RELOC_MMIX_JMP_2,
- BFD_RELOC_MMIX_JMP_3,
-
-/* This is a relocation for a relative address as in a GETA instruction or
-a branch. */
- BFD_RELOC_MMIX_ADDR19,
-
-/* This is a relocation for a relative address as in a JMP instruction. */
- BFD_RELOC_MMIX_ADDR27,
-
-/* This is a relocation for an instruction field that may be a general
-register or a value 0..255. */
- BFD_RELOC_MMIX_REG_OR_BYTE,
-
-/* This is a relocation for an instruction field that may be a general
-register. */
- BFD_RELOC_MMIX_REG,
-
-/* This is a relocation for two instruction fields holding a register and
-an offset, the equivalent of the relocation. */
- BFD_RELOC_MMIX_BASE_PLUS_OFFSET,
-
-/* This relocation is an assertion that the expression is not allocated as
-a global register. It does not modify contents. */
- BFD_RELOC_MMIX_LOCAL,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit pc relative
-short offset into 7 bits. */
- BFD_RELOC_AVR_7_PCREL,
-
-/* This is a 16 bit reloc for the AVR that stores 13 bit pc relative
-short offset into 12 bits. */
- BFD_RELOC_AVR_13_PCREL,
-
-/* This is a 16 bit reloc for the AVR that stores 17 bit value (usually
-program memory address) into 16 bits. */
- BFD_RELOC_AVR_16_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
-data memory address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_LO8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of data memory address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HI8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of program memory address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HH8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of 32 bit value) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_MS8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(usually data memory address) into 8 bit immediate value of SUBI insn. */
- BFD_RELOC_AVR_LO8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 8 bit of data memory address) into 8 bit immediate value of
-SUBI insn. */
- BFD_RELOC_AVR_HI8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(most high 8 bit of program memory address) into 8 bit immediate value
-of LDI or SUBI insn. */
- BFD_RELOC_AVR_HH8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value (msb
-of 32 bit value) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_MS8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
-command address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_LO8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value
-(command address) into 8 bit immediate value of LDI insn. If the address
-is beyond the 128k boundary, the linker inserts a jump stub for this reloc
-in the lower 128k. */
- BFD_RELOC_AVR_LO8_LDI_GS,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of command address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HI8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of command address) into 8 bit immediate value of LDI insn. If the address
-is beyond the 128k boundary, the linker inserts a jump stub for this reloc
-below 128k. */
- BFD_RELOC_AVR_HI8_LDI_GS,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of command address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HH8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(usually command address) into 8 bit immediate value of SUBI insn. */
- BFD_RELOC_AVR_LO8_LDI_PM_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 8 bit of 16 bit command address) into 8 bit immediate value
-of SUBI insn. */
- BFD_RELOC_AVR_HI8_LDI_PM_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 6 bit of 22 bit command address) into 8 bit immediate
-value of SUBI insn. */
- BFD_RELOC_AVR_HH8_LDI_PM_NEG,
-
-/* This is a 32 bit reloc for the AVR that stores 23 bit value
-into 22 bits. */
- BFD_RELOC_AVR_CALL,
-
-/* This is a 16 bit reloc for the AVR that stores all needed bits
-for absolute addressing with ldi with overflow check to linktime */
- BFD_RELOC_AVR_LDI,
-
-/* This is a 6 bit reloc for the AVR that stores offset for ldd/std
-instructions */
- BFD_RELOC_AVR_6,
-
-/* This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
-instructions */
- BFD_RELOC_AVR_6_ADIW,
-
-/* This is a 8 bit reloc for the AVR that stores bits 0..7 of a symbol
-in .byte lo8(symbol) */
- BFD_RELOC_AVR_8_LO,
-
-/* This is a 8 bit reloc for the AVR that stores bits 8..15 of a symbol
-in .byte hi8(symbol) */
- BFD_RELOC_AVR_8_HI,
-
-/* This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol
-in .byte hlo8(symbol) */
- BFD_RELOC_AVR_8_HLO,
-
-/* AVR relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-second symbol so the linker can determine whether to adjust the field
-value. */
- BFD_RELOC_AVR_DIFF8,
- BFD_RELOC_AVR_DIFF16,
- BFD_RELOC_AVR_DIFF32,
-
-/* This is a 7 bit reloc for the AVR that stores SRAM address for 16bit
-lds and sts instructions supported only tiny core. */
- BFD_RELOC_AVR_LDS_STS_16,
-
-/* This is a 6 bit reloc for the AVR that stores an I/O register
-number for the IN and OUT instructions */
- BFD_RELOC_AVR_PORT6,
-
-/* This is a 5 bit reloc for the AVR that stores an I/O register
-number for the SBIC, SBIS, SBI and CBI instructions */
- BFD_RELOC_AVR_PORT5,
-
-/* RISC-V relocations. */
- BFD_RELOC_RISCV_HI20,
- BFD_RELOC_RISCV_PCREL_HI20,
- BFD_RELOC_RISCV_PCREL_LO12_I,
- BFD_RELOC_RISCV_PCREL_LO12_S,
- BFD_RELOC_RISCV_LO12_I,
- BFD_RELOC_RISCV_LO12_S,
- BFD_RELOC_RISCV_GPREL12_I,
- BFD_RELOC_RISCV_GPREL12_S,
- BFD_RELOC_RISCV_TPREL_HI20,
- BFD_RELOC_RISCV_TPREL_LO12_I,
- BFD_RELOC_RISCV_TPREL_LO12_S,
- BFD_RELOC_RISCV_TPREL_ADD,
- BFD_RELOC_RISCV_CALL,
- BFD_RELOC_RISCV_CALL_PLT,
- BFD_RELOC_RISCV_ADD8,
- BFD_RELOC_RISCV_ADD16,
- BFD_RELOC_RISCV_ADD32,
- BFD_RELOC_RISCV_ADD64,
- BFD_RELOC_RISCV_SUB8,
- BFD_RELOC_RISCV_SUB16,
- BFD_RELOC_RISCV_SUB32,
- BFD_RELOC_RISCV_SUB64,
- BFD_RELOC_RISCV_GOT_HI20,
- BFD_RELOC_RISCV_TLS_GOT_HI20,
- BFD_RELOC_RISCV_TLS_GD_HI20,
- BFD_RELOC_RISCV_JMP,
- BFD_RELOC_RISCV_TLS_DTPMOD32,
- BFD_RELOC_RISCV_TLS_DTPREL32,
- BFD_RELOC_RISCV_TLS_DTPMOD64,
- BFD_RELOC_RISCV_TLS_DTPREL64,
- BFD_RELOC_RISCV_TLS_TPREL32,
- BFD_RELOC_RISCV_TLS_TPREL64,
- BFD_RELOC_RISCV_ALIGN,
- BFD_RELOC_RISCV_RVC_BRANCH,
- BFD_RELOC_RISCV_RVC_JUMP,
- BFD_RELOC_RISCV_RVC_LUI,
- BFD_RELOC_RISCV_GPREL_I,
- BFD_RELOC_RISCV_GPREL_S,
- BFD_RELOC_RISCV_TPREL_I,
- BFD_RELOC_RISCV_TPREL_S,
- BFD_RELOC_RISCV_RELAX,
- BFD_RELOC_RISCV_CFA,
- BFD_RELOC_RISCV_SUB6,
- BFD_RELOC_RISCV_SET6,
- BFD_RELOC_RISCV_SET8,
- BFD_RELOC_RISCV_SET16,
- BFD_RELOC_RISCV_SET32,
- BFD_RELOC_RISCV_32_PCREL,
-
-/* Renesas RL78 Relocations. */
- BFD_RELOC_RL78_NEG8,
- BFD_RELOC_RL78_NEG16,
- BFD_RELOC_RL78_NEG24,
- BFD_RELOC_RL78_NEG32,
- BFD_RELOC_RL78_16_OP,
- BFD_RELOC_RL78_24_OP,
- BFD_RELOC_RL78_32_OP,
- BFD_RELOC_RL78_8U,
- BFD_RELOC_RL78_16U,
- BFD_RELOC_RL78_24U,
- BFD_RELOC_RL78_DIR3U_PCREL,
- BFD_RELOC_RL78_DIFF,
- BFD_RELOC_RL78_GPRELB,
- BFD_RELOC_RL78_GPRELW,
- BFD_RELOC_RL78_GPRELL,
- BFD_RELOC_RL78_SYM,
- BFD_RELOC_RL78_OP_SUBTRACT,
- BFD_RELOC_RL78_OP_NEG,
- BFD_RELOC_RL78_OP_AND,
- BFD_RELOC_RL78_OP_SHRA,
- BFD_RELOC_RL78_ABS8,
- BFD_RELOC_RL78_ABS16,
- BFD_RELOC_RL78_ABS16_REV,
- BFD_RELOC_RL78_ABS32,
- BFD_RELOC_RL78_ABS32_REV,
- BFD_RELOC_RL78_ABS16U,
- BFD_RELOC_RL78_ABS16UW,
- BFD_RELOC_RL78_ABS16UL,
- BFD_RELOC_RL78_RELAX,
- BFD_RELOC_RL78_HI16,
- BFD_RELOC_RL78_HI8,
- BFD_RELOC_RL78_LO16,
- BFD_RELOC_RL78_CODE,
- BFD_RELOC_RL78_SADDR,
-
-/* Renesas RX Relocations. */
- BFD_RELOC_RX_NEG8,
- BFD_RELOC_RX_NEG16,
- BFD_RELOC_RX_NEG24,
- BFD_RELOC_RX_NEG32,
- BFD_RELOC_RX_16_OP,
- BFD_RELOC_RX_24_OP,
- BFD_RELOC_RX_32_OP,
- BFD_RELOC_RX_8U,
- BFD_RELOC_RX_16U,
- BFD_RELOC_RX_24U,
- BFD_RELOC_RX_DIR3U_PCREL,
- BFD_RELOC_RX_DIFF,
- BFD_RELOC_RX_GPRELB,
- BFD_RELOC_RX_GPRELW,
- BFD_RELOC_RX_GPRELL,
- BFD_RELOC_RX_SYM,
- BFD_RELOC_RX_OP_SUBTRACT,
- BFD_RELOC_RX_OP_NEG,
- BFD_RELOC_RX_ABS8,
- BFD_RELOC_RX_ABS16,
- BFD_RELOC_RX_ABS16_REV,
- BFD_RELOC_RX_ABS32,
- BFD_RELOC_RX_ABS32_REV,
- BFD_RELOC_RX_ABS16U,
- BFD_RELOC_RX_ABS16UW,
- BFD_RELOC_RX_ABS16UL,
- BFD_RELOC_RX_RELAX,
-
-/* Direct 12 bit. */
- BFD_RELOC_390_12,
-
-/* 12 bit GOT offset. */
- BFD_RELOC_390_GOT12,
-
-/* 32 bit PC relative PLT address. */
- BFD_RELOC_390_PLT32,
-
-/* Copy symbol at runtime. */
- BFD_RELOC_390_COPY,
-
-/* Create GOT entry. */
- BFD_RELOC_390_GLOB_DAT,
-
-/* Create PLT entry. */
- BFD_RELOC_390_JMP_SLOT,
-
-/* Adjust by program base. */
- BFD_RELOC_390_RELATIVE,
-
-/* 32 bit PC relative offset to GOT. */
- BFD_RELOC_390_GOTPC,
-
-/* 16 bit GOT offset. */
- BFD_RELOC_390_GOT16,
-
-/* PC relative 12 bit shifted by 1. */
- BFD_RELOC_390_PC12DBL,
-
-/* 12 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT12DBL,
-
-/* PC relative 16 bit shifted by 1. */
- BFD_RELOC_390_PC16DBL,
-
-/* 16 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT16DBL,
-
-/* PC relative 24 bit shifted by 1. */
- BFD_RELOC_390_PC24DBL,
-
-/* 24 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT24DBL,
-
-/* PC relative 32 bit shifted by 1. */
- BFD_RELOC_390_PC32DBL,
-
-/* 32 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT32DBL,
-
-/* 32 bit PC rel. GOT shifted by 1. */
- BFD_RELOC_390_GOTPCDBL,
-
-/* 64 bit GOT offset. */
- BFD_RELOC_390_GOT64,
-
-/* 64 bit PC relative PLT address. */
- BFD_RELOC_390_PLT64,
-
-/* 32 bit rel. offset to GOT entry. */
- BFD_RELOC_390_GOTENT,
-
-/* 64 bit offset to GOT. */
- BFD_RELOC_390_GOTOFF64,
-
-/* 12-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT12,
-
-/* 16-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT16,
-
-/* 32-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT32,
-
-/* 64-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT64,
-
-/* 32-bit rel. offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLTENT,
-
-/* 16-bit rel. offset from the GOT to a PLT entry. */
- BFD_RELOC_390_PLTOFF16,
-
-/* 32-bit rel. offset from the GOT to a PLT entry. */
- BFD_RELOC_390_PLTOFF32,
-
-/* 64-bit rel. offset from the GOT to a PLT entry. */
- BFD_RELOC_390_PLTOFF64,
-
-/* s390 tls relocations. */
- BFD_RELOC_390_TLS_LOAD,
- BFD_RELOC_390_TLS_GDCALL,
- BFD_RELOC_390_TLS_LDCALL,
- BFD_RELOC_390_TLS_GD32,
- BFD_RELOC_390_TLS_GD64,
- BFD_RELOC_390_TLS_GOTIE12,
- BFD_RELOC_390_TLS_GOTIE32,
- BFD_RELOC_390_TLS_GOTIE64,
- BFD_RELOC_390_TLS_LDM32,
- BFD_RELOC_390_TLS_LDM64,
- BFD_RELOC_390_TLS_IE32,
- BFD_RELOC_390_TLS_IE64,
- BFD_RELOC_390_TLS_IEENT,
- BFD_RELOC_390_TLS_LE32,
- BFD_RELOC_390_TLS_LE64,
- BFD_RELOC_390_TLS_LDO32,
- BFD_RELOC_390_TLS_LDO64,
- BFD_RELOC_390_TLS_DTPMOD,
- BFD_RELOC_390_TLS_DTPOFF,
- BFD_RELOC_390_TLS_TPOFF,
-
-/* Long displacement extension. */
- BFD_RELOC_390_20,
- BFD_RELOC_390_GOT20,
- BFD_RELOC_390_GOTPLT20,
- BFD_RELOC_390_TLS_GOTIE20,
-
-/* STT_GNU_IFUNC relocation. */
- BFD_RELOC_390_IRELATIVE,
-
-/* Score relocations
-Low 16 bit for load/store */
- BFD_RELOC_SCORE_GPREL15,
-
-/* This is a 24-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_DUMMY2,
- BFD_RELOC_SCORE_JMP,
-
-/* This is a 19-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_BRANCH,
-
-/* This is a 32-bit reloc for 48-bit instructions. */
- BFD_RELOC_SCORE_IMM30,
-
-/* This is a 32-bit reloc for 48-bit instructions. */
- BFD_RELOC_SCORE_IMM32,
-
-/* This is a 11-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE16_JMP,
-
-/* This is a 8-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE16_BRANCH,
-
-/* This is a 9-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_BCMP,
-
-/* Undocumented Score relocs */
- BFD_RELOC_SCORE_GOT15,
- BFD_RELOC_SCORE_GOT_LO16,
- BFD_RELOC_SCORE_CALL15,
- BFD_RELOC_SCORE_DUMMY_HI16,
-
-/* Scenix IP2K - 9-bit register number / data address */
- BFD_RELOC_IP2K_FR9,
-
-/* Scenix IP2K - 4-bit register/data bank number */
- BFD_RELOC_IP2K_BANK,
-
-/* Scenix IP2K - low 13 bits of instruction word address */
- BFD_RELOC_IP2K_ADDR16CJP,
-
-/* Scenix IP2K - high 3 bits of instruction word address */
- BFD_RELOC_IP2K_PAGE3,
-
-/* Scenix IP2K - ext/low/high 8 bits of data address */
- BFD_RELOC_IP2K_LO8DATA,
- BFD_RELOC_IP2K_HI8DATA,
- BFD_RELOC_IP2K_EX8DATA,
-
-/* Scenix IP2K - low/high 8 bits of instruction word address */
- BFD_RELOC_IP2K_LO8INSN,
- BFD_RELOC_IP2K_HI8INSN,
-
-/* Scenix IP2K - even/odd PC modifier to modify snb pcl.0 */
- BFD_RELOC_IP2K_PC_SKIP,
-
-/* Scenix IP2K - 16 bit word address in text section. */
- BFD_RELOC_IP2K_TEXT,
-
-/* Scenix IP2K - 7-bit sp or dp offset */
- BFD_RELOC_IP2K_FR_OFFSET,
-
-/* Scenix VPE4K coprocessor - data/insn-space addressing */
- BFD_RELOC_VPE4KMATH_DATA,
- BFD_RELOC_VPE4KMATH_INSN,
-
-/* These two relocations are used by the linker to determine which of
-the entries in a C++ virtual function table are actually used. When
-the --gc-sections option is given, the linker will zero out the entries
-that are not used, so that the code for those functions need not be
-included in the output.
-
-VTABLE_INHERIT is a zero-space relocation used to describe to the
-linker the inheritance tree of a C++ virtual function table. The
-relocation's symbol should be the parent class' vtable, and the
-relocation should be located at the child vtable.
-
-VTABLE_ENTRY is a zero-space relocation that describes the use of a
-virtual function table entry. The reloc's symbol should refer to the
-table of the class mentioned in the code. Off of that base, an offset
-describes the entry that is being used. For Rela hosts, this offset
-is stored in the reloc's addend. For Rel hosts, we are forced to put
-this offset in the reloc's section offset. */
- BFD_RELOC_VTABLE_INHERIT,
- BFD_RELOC_VTABLE_ENTRY,
-
-/* Intel IA64 Relocations. */
- BFD_RELOC_IA64_IMM14,
- BFD_RELOC_IA64_IMM22,
- BFD_RELOC_IA64_IMM64,
- BFD_RELOC_IA64_DIR32MSB,
- BFD_RELOC_IA64_DIR32LSB,
- BFD_RELOC_IA64_DIR64MSB,
- BFD_RELOC_IA64_DIR64LSB,
- BFD_RELOC_IA64_GPREL22,
- BFD_RELOC_IA64_GPREL64I,
- BFD_RELOC_IA64_GPREL32MSB,
- BFD_RELOC_IA64_GPREL32LSB,
- BFD_RELOC_IA64_GPREL64MSB,
- BFD_RELOC_IA64_GPREL64LSB,
- BFD_RELOC_IA64_LTOFF22,
- BFD_RELOC_IA64_LTOFF64I,
- BFD_RELOC_IA64_PLTOFF22,
- BFD_RELOC_IA64_PLTOFF64I,
- BFD_RELOC_IA64_PLTOFF64MSB,
- BFD_RELOC_IA64_PLTOFF64LSB,
- BFD_RELOC_IA64_FPTR64I,
- BFD_RELOC_IA64_FPTR32MSB,
- BFD_RELOC_IA64_FPTR32LSB,
- BFD_RELOC_IA64_FPTR64MSB,
- BFD_RELOC_IA64_FPTR64LSB,
- BFD_RELOC_IA64_PCREL21B,
- BFD_RELOC_IA64_PCREL21BI,
- BFD_RELOC_IA64_PCREL21M,
- BFD_RELOC_IA64_PCREL21F,
- BFD_RELOC_IA64_PCREL22,
- BFD_RELOC_IA64_PCREL60B,
- BFD_RELOC_IA64_PCREL64I,
- BFD_RELOC_IA64_PCREL32MSB,
- BFD_RELOC_IA64_PCREL32LSB,
- BFD_RELOC_IA64_PCREL64MSB,
- BFD_RELOC_IA64_PCREL64LSB,
- BFD_RELOC_IA64_LTOFF_FPTR22,
- BFD_RELOC_IA64_LTOFF_FPTR64I,
- BFD_RELOC_IA64_LTOFF_FPTR32MSB,
- BFD_RELOC_IA64_LTOFF_FPTR32LSB,
- BFD_RELOC_IA64_LTOFF_FPTR64MSB,
- BFD_RELOC_IA64_LTOFF_FPTR64LSB,
- BFD_RELOC_IA64_SEGREL32MSB,
- BFD_RELOC_IA64_SEGREL32LSB,
- BFD_RELOC_IA64_SEGREL64MSB,
- BFD_RELOC_IA64_SEGREL64LSB,
- BFD_RELOC_IA64_SECREL32MSB,
- BFD_RELOC_IA64_SECREL32LSB,
- BFD_RELOC_IA64_SECREL64MSB,
- BFD_RELOC_IA64_SECREL64LSB,
- BFD_RELOC_IA64_REL32MSB,
- BFD_RELOC_IA64_REL32LSB,
- BFD_RELOC_IA64_REL64MSB,
- BFD_RELOC_IA64_REL64LSB,
- BFD_RELOC_IA64_LTV32MSB,
- BFD_RELOC_IA64_LTV32LSB,
- BFD_RELOC_IA64_LTV64MSB,
- BFD_RELOC_IA64_LTV64LSB,
- BFD_RELOC_IA64_IPLTMSB,
- BFD_RELOC_IA64_IPLTLSB,
- BFD_RELOC_IA64_COPY,
- BFD_RELOC_IA64_LTOFF22X,
- BFD_RELOC_IA64_LDXMOV,
- BFD_RELOC_IA64_TPREL14,
- BFD_RELOC_IA64_TPREL22,
- BFD_RELOC_IA64_TPREL64I,
- BFD_RELOC_IA64_TPREL64MSB,
- BFD_RELOC_IA64_TPREL64LSB,
- BFD_RELOC_IA64_LTOFF_TPREL22,
- BFD_RELOC_IA64_DTPMOD64MSB,
- BFD_RELOC_IA64_DTPMOD64LSB,
- BFD_RELOC_IA64_LTOFF_DTPMOD22,
- BFD_RELOC_IA64_DTPREL14,
- BFD_RELOC_IA64_DTPREL22,
- BFD_RELOC_IA64_DTPREL64I,
- BFD_RELOC_IA64_DTPREL32MSB,
- BFD_RELOC_IA64_DTPREL32LSB,
- BFD_RELOC_IA64_DTPREL64MSB,
- BFD_RELOC_IA64_DTPREL64LSB,
- BFD_RELOC_IA64_LTOFF_DTPREL22,
-
-/* Motorola 68HC11 reloc.
-This is the 8 bit high part of an absolute address. */
- BFD_RELOC_M68HC11_HI8,
-
-/* Motorola 68HC11 reloc.
-This is the 8 bit low part of an absolute address. */
- BFD_RELOC_M68HC11_LO8,
-
-/* Motorola 68HC11 reloc.
-This is the 3 bit of a value. */
- BFD_RELOC_M68HC11_3B,
-
-/* Motorola 68HC11 reloc.
-This reloc marks the beginning of a jump/call instruction.
-It is used for linker relaxation to correctly identify beginning
-of instruction and change some branches to use PC-relative
-addressing mode. */
- BFD_RELOC_M68HC11_RL_JUMP,
-
-/* Motorola 68HC11 reloc.
-This reloc marks a group of several instructions that gcc generates
-and for which the linker relaxation pass can modify and/or remove
-some of them. */
- BFD_RELOC_M68HC11_RL_GROUP,
-
-/* Motorola 68HC11 reloc.
-This is the 16-bit lower part of an address. It is used for 'call'
-instruction to specify the symbol address without any special
-transformation (due to memory bank window). */
- BFD_RELOC_M68HC11_LO16,
-
-/* Motorola 68HC11 reloc.
-This is a 8-bit reloc that specifies the page number of an address.
-It is used by 'call' instruction to specify the page number of
-the symbol. */
- BFD_RELOC_M68HC11_PAGE,
-
-/* Motorola 68HC11 reloc.
-This is a 24-bit reloc that represents the address with a 16-bit
-value and a 8-bit page number. The symbol address is transformed
-to follow the 16K memory bank of 68HC12 (seen as mapped in the window). */
- BFD_RELOC_M68HC11_24,
-
-/* Motorola 68HC12 reloc.
-This is the 5 bits of a value. */
- BFD_RELOC_M68HC12_5B,
-
-/* Freescale XGATE reloc.
-This reloc marks the beginning of a bra/jal instruction. */
- BFD_RELOC_XGATE_RL_JUMP,
-
-/* Freescale XGATE reloc.
-This reloc marks a group of several instructions that gcc generates
-and for which the linker relaxation pass can modify and/or remove
-some of them. */
- BFD_RELOC_XGATE_RL_GROUP,
-
-/* Freescale XGATE reloc.
-This is the 16-bit lower part of an address. It is used for the '16-bit'
-instructions. */
- BFD_RELOC_XGATE_LO16,
-
-/* Freescale XGATE reloc. */
- BFD_RELOC_XGATE_GPAGE,
-
-/* Freescale XGATE reloc. */
- BFD_RELOC_XGATE_24,
-
-/* Freescale XGATE reloc.
-This is a 9-bit pc-relative reloc. */
- BFD_RELOC_XGATE_PCREL_9,
-
-/* Freescale XGATE reloc.
-This is a 10-bit pc-relative reloc. */
- BFD_RELOC_XGATE_PCREL_10,
-
-/* Freescale XGATE reloc.
-This is the 16-bit lower part of an address. It is used for the '16-bit'
-instructions. */
- BFD_RELOC_XGATE_IMM8_LO,
-
-/* Freescale XGATE reloc.
-This is the 16-bit higher part of an address. It is used for the '16-bit'
-instructions. */
- BFD_RELOC_XGATE_IMM8_HI,
-
-/* Freescale XGATE reloc.
-This is a 3-bit pc-relative reloc. */
- BFD_RELOC_XGATE_IMM3,
-
-/* Freescale XGATE reloc.
-This is a 4-bit pc-relative reloc. */
- BFD_RELOC_XGATE_IMM4,
-
-/* Freescale XGATE reloc.
-This is a 5-bit pc-relative reloc. */
- BFD_RELOC_XGATE_IMM5,
-
-/* Motorola 68HC12 reloc.
-This is the 9 bits of a value. */
- BFD_RELOC_M68HC12_9B,
-
-/* Motorola 68HC12 reloc.
-This is the 16 bits of a value. */
- BFD_RELOC_M68HC12_16B,
-
-/* Motorola 68HC12/XGATE reloc.
-This is a PCREL9 branch. */
- BFD_RELOC_M68HC12_9_PCREL,
-
-/* Motorola 68HC12/XGATE reloc.
-This is a PCREL10 branch. */
- BFD_RELOC_M68HC12_10_PCREL,
-
-/* Motorola 68HC12/XGATE reloc.
-This is the 8 bit low part of an absolute address and immediately precedes
-a matching HI8XG part. */
- BFD_RELOC_M68HC12_LO8XG,
-
-/* Motorola 68HC12/XGATE reloc.
-This is the 8 bit high part of an absolute address and immediately follows
-a matching LO8XG part. */
- BFD_RELOC_M68HC12_HI8XG,
-
-/* Freescale S12Z reloc.
-This is a 15 bit relative address. If the most significant bits are all zero
-then it may be truncated to 8 bits. */
- BFD_RELOC_S12Z_15_PCREL,
-
-/* NS CR16C Relocations. */
- BFD_RELOC_16C_NUM08,
- BFD_RELOC_16C_NUM08_C,
- BFD_RELOC_16C_NUM16,
- BFD_RELOC_16C_NUM16_C,
- BFD_RELOC_16C_NUM32,
- BFD_RELOC_16C_NUM32_C,
- BFD_RELOC_16C_DISP04,
- BFD_RELOC_16C_DISP04_C,
- BFD_RELOC_16C_DISP08,
- BFD_RELOC_16C_DISP08_C,
- BFD_RELOC_16C_DISP16,
- BFD_RELOC_16C_DISP16_C,
- BFD_RELOC_16C_DISP24,
- BFD_RELOC_16C_DISP24_C,
- BFD_RELOC_16C_DISP24a,
- BFD_RELOC_16C_DISP24a_C,
- BFD_RELOC_16C_REG04,
- BFD_RELOC_16C_REG04_C,
- BFD_RELOC_16C_REG04a,
- BFD_RELOC_16C_REG04a_C,
- BFD_RELOC_16C_REG14,
- BFD_RELOC_16C_REG14_C,
- BFD_RELOC_16C_REG16,
- BFD_RELOC_16C_REG16_C,
- BFD_RELOC_16C_REG20,
- BFD_RELOC_16C_REG20_C,
- BFD_RELOC_16C_ABS20,
- BFD_RELOC_16C_ABS20_C,
- BFD_RELOC_16C_ABS24,
- BFD_RELOC_16C_ABS24_C,
- BFD_RELOC_16C_IMM04,
- BFD_RELOC_16C_IMM04_C,
- BFD_RELOC_16C_IMM16,
- BFD_RELOC_16C_IMM16_C,
- BFD_RELOC_16C_IMM20,
- BFD_RELOC_16C_IMM20_C,
- BFD_RELOC_16C_IMM24,
- BFD_RELOC_16C_IMM24_C,
- BFD_RELOC_16C_IMM32,
- BFD_RELOC_16C_IMM32_C,
-
-/* NS CR16 Relocations. */
- BFD_RELOC_CR16_NUM8,
- BFD_RELOC_CR16_NUM16,
- BFD_RELOC_CR16_NUM32,
- BFD_RELOC_CR16_NUM32a,
- BFD_RELOC_CR16_REGREL0,
- BFD_RELOC_CR16_REGREL4,
- BFD_RELOC_CR16_REGREL4a,
- BFD_RELOC_CR16_REGREL14,
- BFD_RELOC_CR16_REGREL14a,
- BFD_RELOC_CR16_REGREL16,
- BFD_RELOC_CR16_REGREL20,
- BFD_RELOC_CR16_REGREL20a,
- BFD_RELOC_CR16_ABS20,
- BFD_RELOC_CR16_ABS24,
- BFD_RELOC_CR16_IMM4,
- BFD_RELOC_CR16_IMM8,
- BFD_RELOC_CR16_IMM16,
- BFD_RELOC_CR16_IMM20,
- BFD_RELOC_CR16_IMM24,
- BFD_RELOC_CR16_IMM32,
- BFD_RELOC_CR16_IMM32a,
- BFD_RELOC_CR16_DISP4,
- BFD_RELOC_CR16_DISP8,
- BFD_RELOC_CR16_DISP16,
- BFD_RELOC_CR16_DISP20,
- BFD_RELOC_CR16_DISP24,
- BFD_RELOC_CR16_DISP24a,
- BFD_RELOC_CR16_SWITCH8,
- BFD_RELOC_CR16_SWITCH16,
- BFD_RELOC_CR16_SWITCH32,
- BFD_RELOC_CR16_GOT_REGREL20,
- BFD_RELOC_CR16_GOTC_REGREL20,
- BFD_RELOC_CR16_GLOB_DAT,
-
-/* NS CRX Relocations. */
- BFD_RELOC_CRX_REL4,
- BFD_RELOC_CRX_REL8,
- BFD_RELOC_CRX_REL8_CMP,
- BFD_RELOC_CRX_REL16,
- BFD_RELOC_CRX_REL24,
- BFD_RELOC_CRX_REL32,
- BFD_RELOC_CRX_REGREL12,
- BFD_RELOC_CRX_REGREL22,
- BFD_RELOC_CRX_REGREL28,
- BFD_RELOC_CRX_REGREL32,
- BFD_RELOC_CRX_ABS16,
- BFD_RELOC_CRX_ABS32,
- BFD_RELOC_CRX_NUM8,
- BFD_RELOC_CRX_NUM16,
- BFD_RELOC_CRX_NUM32,
- BFD_RELOC_CRX_IMM16,
- BFD_RELOC_CRX_IMM32,
- BFD_RELOC_CRX_SWITCH8,
- BFD_RELOC_CRX_SWITCH16,
- BFD_RELOC_CRX_SWITCH32,
-
-/* These relocs are only used within the CRIS assembler. They are not
-(at present) written to any object files. */
- BFD_RELOC_CRIS_BDISP8,
- BFD_RELOC_CRIS_UNSIGNED_5,
- BFD_RELOC_CRIS_SIGNED_6,
- BFD_RELOC_CRIS_UNSIGNED_6,
- BFD_RELOC_CRIS_SIGNED_8,
- BFD_RELOC_CRIS_UNSIGNED_8,
- BFD_RELOC_CRIS_SIGNED_16,
- BFD_RELOC_CRIS_UNSIGNED_16,
- BFD_RELOC_CRIS_LAPCQ_OFFSET,
- BFD_RELOC_CRIS_UNSIGNED_4,
-
-/* Relocs used in ELF shared libraries for CRIS. */
- BFD_RELOC_CRIS_COPY,
- BFD_RELOC_CRIS_GLOB_DAT,
- BFD_RELOC_CRIS_JUMP_SLOT,
- BFD_RELOC_CRIS_RELATIVE,
-
-/* 32-bit offset to symbol-entry within GOT. */
- BFD_RELOC_CRIS_32_GOT,
-
-/* 16-bit offset to symbol-entry within GOT. */
- BFD_RELOC_CRIS_16_GOT,
-
-/* 32-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_CRIS_32_GOTPLT,
-
-/* 16-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_CRIS_16_GOTPLT,
-
-/* 32-bit offset to symbol, relative to GOT. */
- BFD_RELOC_CRIS_32_GOTREL,
-
-/* 32-bit offset to symbol with PLT entry, relative to GOT. */
- BFD_RELOC_CRIS_32_PLT_GOTREL,
-
-/* 32-bit offset to symbol with PLT entry, relative to this relocation. */
- BFD_RELOC_CRIS_32_PLT_PCREL,
-
-/* Relocs used in TLS code for CRIS. */
- BFD_RELOC_CRIS_32_GOT_GD,
- BFD_RELOC_CRIS_16_GOT_GD,
- BFD_RELOC_CRIS_32_GD,
- BFD_RELOC_CRIS_DTP,
- BFD_RELOC_CRIS_32_DTPREL,
- BFD_RELOC_CRIS_16_DTPREL,
- BFD_RELOC_CRIS_32_GOT_TPREL,
- BFD_RELOC_CRIS_16_GOT_TPREL,
- BFD_RELOC_CRIS_32_TPREL,
- BFD_RELOC_CRIS_16_TPREL,
- BFD_RELOC_CRIS_DTPMOD,
- BFD_RELOC_CRIS_32_IE,
-
-/* OpenRISC 1000 Relocations. */
- BFD_RELOC_OR1K_REL_26,
- BFD_RELOC_OR1K_SLO16,
- BFD_RELOC_OR1K_PCREL_PG21,
- BFD_RELOC_OR1K_LO13,
- BFD_RELOC_OR1K_SLO13,
- BFD_RELOC_OR1K_GOTPC_HI16,
- BFD_RELOC_OR1K_GOTPC_LO16,
- BFD_RELOC_OR1K_GOT16,
- BFD_RELOC_OR1K_GOT_PG21,
- BFD_RELOC_OR1K_GOT_LO13,
- BFD_RELOC_OR1K_PLT26,
- BFD_RELOC_OR1K_PLTA26,
- BFD_RELOC_OR1K_GOTOFF_SLO16,
- BFD_RELOC_OR1K_COPY,
- BFD_RELOC_OR1K_GLOB_DAT,
- BFD_RELOC_OR1K_JMP_SLOT,
- BFD_RELOC_OR1K_RELATIVE,
- BFD_RELOC_OR1K_TLS_GD_HI16,
- BFD_RELOC_OR1K_TLS_GD_LO16,
- BFD_RELOC_OR1K_TLS_GD_PG21,
- BFD_RELOC_OR1K_TLS_GD_LO13,
- BFD_RELOC_OR1K_TLS_LDM_HI16,
- BFD_RELOC_OR1K_TLS_LDM_LO16,
- BFD_RELOC_OR1K_TLS_LDM_PG21,
- BFD_RELOC_OR1K_TLS_LDM_LO13,
- BFD_RELOC_OR1K_TLS_LDO_HI16,
- BFD_RELOC_OR1K_TLS_LDO_LO16,
- BFD_RELOC_OR1K_TLS_IE_HI16,
- BFD_RELOC_OR1K_TLS_IE_AHI16,
- BFD_RELOC_OR1K_TLS_IE_LO16,
- BFD_RELOC_OR1K_TLS_IE_PG21,
- BFD_RELOC_OR1K_TLS_IE_LO13,
- BFD_RELOC_OR1K_TLS_LE_HI16,
- BFD_RELOC_OR1K_TLS_LE_AHI16,
- BFD_RELOC_OR1K_TLS_LE_LO16,
- BFD_RELOC_OR1K_TLS_LE_SLO16,
- BFD_RELOC_OR1K_TLS_TPOFF,
- BFD_RELOC_OR1K_TLS_DTPOFF,
- BFD_RELOC_OR1K_TLS_DTPMOD,
-
-/* H8 elf Relocations. */
- BFD_RELOC_H8_DIR16A8,
- BFD_RELOC_H8_DIR16R8,
- BFD_RELOC_H8_DIR24A8,
- BFD_RELOC_H8_DIR24R8,
- BFD_RELOC_H8_DIR32A16,
- BFD_RELOC_H8_DISP32A16,
-
-/* Sony Xstormy16 Relocations. */
- BFD_RELOC_XSTORMY16_REL_12,
- BFD_RELOC_XSTORMY16_12,
- BFD_RELOC_XSTORMY16_24,
- BFD_RELOC_XSTORMY16_FPTR16,
-
-/* Self-describing complex relocations. */
- BFD_RELOC_RELC,
-
-
-/* Infineon Relocations. */
- BFD_RELOC_XC16X_PAG,
- BFD_RELOC_XC16X_POF,
- BFD_RELOC_XC16X_SEG,
- BFD_RELOC_XC16X_SOF,
-
-/* Relocations used by VAX ELF. */
- BFD_RELOC_VAX_GLOB_DAT,
- BFD_RELOC_VAX_JMP_SLOT,
- BFD_RELOC_VAX_RELATIVE,
-
-/* Morpho MT - 16 bit immediate relocation. */
- BFD_RELOC_MT_PC16,
-
-/* Morpho MT - Hi 16 bits of an address. */
- BFD_RELOC_MT_HI16,
-
-/* Morpho MT - Low 16 bits of an address. */
- BFD_RELOC_MT_LO16,
-
-/* Morpho MT - Used to tell the linker which vtable entries are used. */
- BFD_RELOC_MT_GNU_VTINHERIT,
-
-/* Morpho MT - Used to tell the linker which vtable entries are used. */
- BFD_RELOC_MT_GNU_VTENTRY,
-
-/* Morpho MT - 8 bit immediate relocation. */
- BFD_RELOC_MT_PCINSN8,
-
-/* msp430 specific relocation codes */
- BFD_RELOC_MSP430_10_PCREL,
- BFD_RELOC_MSP430_16_PCREL,
- BFD_RELOC_MSP430_16,
- BFD_RELOC_MSP430_16_PCREL_BYTE,
- BFD_RELOC_MSP430_16_BYTE,
- BFD_RELOC_MSP430_2X_PCREL,
- BFD_RELOC_MSP430_RL_PCREL,
- BFD_RELOC_MSP430_ABS8,
- BFD_RELOC_MSP430X_PCR20_EXT_SRC,
- BFD_RELOC_MSP430X_PCR20_EXT_DST,
- BFD_RELOC_MSP430X_PCR20_EXT_ODST,
- BFD_RELOC_MSP430X_ABS20_EXT_SRC,
- BFD_RELOC_MSP430X_ABS20_EXT_DST,
- BFD_RELOC_MSP430X_ABS20_EXT_ODST,
- BFD_RELOC_MSP430X_ABS20_ADR_SRC,
- BFD_RELOC_MSP430X_ABS20_ADR_DST,
- BFD_RELOC_MSP430X_PCR16,
- BFD_RELOC_MSP430X_PCR20_CALL,
- BFD_RELOC_MSP430X_ABS16,
- BFD_RELOC_MSP430_ABS_HI16,
- BFD_RELOC_MSP430_PREL31,
- BFD_RELOC_MSP430_SYM_DIFF,
-
-/* Relocations used by the Altera Nios II core. */
- BFD_RELOC_NIOS2_S16,
- BFD_RELOC_NIOS2_U16,
- BFD_RELOC_NIOS2_CALL26,
- BFD_RELOC_NIOS2_IMM5,
- BFD_RELOC_NIOS2_CACHE_OPX,
- BFD_RELOC_NIOS2_IMM6,
- BFD_RELOC_NIOS2_IMM8,
- BFD_RELOC_NIOS2_HI16,
- BFD_RELOC_NIOS2_LO16,
- BFD_RELOC_NIOS2_HIADJ16,
- BFD_RELOC_NIOS2_GPREL,
- BFD_RELOC_NIOS2_UJMP,
- BFD_RELOC_NIOS2_CJMP,
- BFD_RELOC_NIOS2_CALLR,
- BFD_RELOC_NIOS2_ALIGN,
- BFD_RELOC_NIOS2_GOT16,
- BFD_RELOC_NIOS2_CALL16,
- BFD_RELOC_NIOS2_GOTOFF_LO,
- BFD_RELOC_NIOS2_GOTOFF_HA,
- BFD_RELOC_NIOS2_PCREL_LO,
- BFD_RELOC_NIOS2_PCREL_HA,
- BFD_RELOC_NIOS2_TLS_GD16,
- BFD_RELOC_NIOS2_TLS_LDM16,
- BFD_RELOC_NIOS2_TLS_LDO16,
- BFD_RELOC_NIOS2_TLS_IE16,
- BFD_RELOC_NIOS2_TLS_LE16,
- BFD_RELOC_NIOS2_TLS_DTPMOD,
- BFD_RELOC_NIOS2_TLS_DTPREL,
- BFD_RELOC_NIOS2_TLS_TPREL,
- BFD_RELOC_NIOS2_COPY,
- BFD_RELOC_NIOS2_GLOB_DAT,
- BFD_RELOC_NIOS2_JUMP_SLOT,
- BFD_RELOC_NIOS2_RELATIVE,
- BFD_RELOC_NIOS2_GOTOFF,
- BFD_RELOC_NIOS2_CALL26_NOAT,
- BFD_RELOC_NIOS2_GOT_LO,
- BFD_RELOC_NIOS2_GOT_HA,
- BFD_RELOC_NIOS2_CALL_LO,
- BFD_RELOC_NIOS2_CALL_HA,
- BFD_RELOC_NIOS2_R2_S12,
- BFD_RELOC_NIOS2_R2_I10_1_PCREL,
- BFD_RELOC_NIOS2_R2_T1I7_1_PCREL,
- BFD_RELOC_NIOS2_R2_T1I7_2,
- BFD_RELOC_NIOS2_R2_T2I4,
- BFD_RELOC_NIOS2_R2_T2I4_1,
- BFD_RELOC_NIOS2_R2_T2I4_2,
- BFD_RELOC_NIOS2_R2_X1I7_2,
- BFD_RELOC_NIOS2_R2_X2L5,
- BFD_RELOC_NIOS2_R2_F1I5_2,
- BFD_RELOC_NIOS2_R2_L5I4X1,
- BFD_RELOC_NIOS2_R2_T1X1I6,
- BFD_RELOC_NIOS2_R2_T1X1I6_2,
-
-/* PRU LDI 16-bit unsigned data-memory relocation. */
- BFD_RELOC_PRU_U16,
-
-/* PRU LDI 16-bit unsigned instruction-memory relocation. */
- BFD_RELOC_PRU_U16_PMEMIMM,
-
-/* PRU relocation for two consecutive LDI load instructions that load a
-32 bit value into a register. If the higher bits are all zero, then
-the second instruction may be relaxed. */
- BFD_RELOC_PRU_LDI32,
-
-/* PRU QBBx 10-bit signed PC-relative relocation. */
- BFD_RELOC_PRU_S10_PCREL,
-
-/* PRU 8-bit unsigned relocation used for the LOOP instruction. */
- BFD_RELOC_PRU_U8_PCREL,
-
-/* PRU Program Memory relocations. Used to convert from byte addressing to
-32-bit word addressing. */
- BFD_RELOC_PRU_32_PMEM,
- BFD_RELOC_PRU_16_PMEM,
-
-/* PRU relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-second symbol so the linker can determine whether to adjust the field
-value. The PMEM variants encode the word difference, instead of byte
-difference between symbols. */
- BFD_RELOC_PRU_GNU_DIFF8,
- BFD_RELOC_PRU_GNU_DIFF16,
- BFD_RELOC_PRU_GNU_DIFF32,
- BFD_RELOC_PRU_GNU_DIFF16_PMEM,
- BFD_RELOC_PRU_GNU_DIFF32_PMEM,
-
-/* IQ2000 Relocations. */
- BFD_RELOC_IQ2000_OFFSET_16,
- BFD_RELOC_IQ2000_OFFSET_21,
- BFD_RELOC_IQ2000_UHI16,
-
-/* Special Xtensa relocation used only by PLT entries in ELF shared
-objects to indicate that the runtime linker should set the value
-to one of its own internal functions or data structures. */
- BFD_RELOC_XTENSA_RTLD,
-
-/* Xtensa relocations for ELF shared objects. */
- BFD_RELOC_XTENSA_GLOB_DAT,
- BFD_RELOC_XTENSA_JMP_SLOT,
- BFD_RELOC_XTENSA_RELATIVE,
-
-/* Xtensa relocation used in ELF object files for symbols that may require
-PLT entries. Otherwise, this is just a generic 32-bit relocation. */
- BFD_RELOC_XTENSA_PLT,
-
-/* Xtensa relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-first symbol so the linker can determine whether to adjust the field
-value. */
- BFD_RELOC_XTENSA_DIFF8,
- BFD_RELOC_XTENSA_DIFF16,
- BFD_RELOC_XTENSA_DIFF32,
-
-/* Generic Xtensa relocations for instruction operands. Only the slot
-number is encoded in the relocation. The relocation applies to the
-last PC-relative immediate operand, or if there are no PC-relative
-immediates, to the last immediate operand. */
- BFD_RELOC_XTENSA_SLOT0_OP,
- BFD_RELOC_XTENSA_SLOT1_OP,
- BFD_RELOC_XTENSA_SLOT2_OP,
- BFD_RELOC_XTENSA_SLOT3_OP,
- BFD_RELOC_XTENSA_SLOT4_OP,
- BFD_RELOC_XTENSA_SLOT5_OP,
- BFD_RELOC_XTENSA_SLOT6_OP,
- BFD_RELOC_XTENSA_SLOT7_OP,
- BFD_RELOC_XTENSA_SLOT8_OP,
- BFD_RELOC_XTENSA_SLOT9_OP,
- BFD_RELOC_XTENSA_SLOT10_OP,
- BFD_RELOC_XTENSA_SLOT11_OP,
- BFD_RELOC_XTENSA_SLOT12_OP,
- BFD_RELOC_XTENSA_SLOT13_OP,
- BFD_RELOC_XTENSA_SLOT14_OP,
-
-/* Alternate Xtensa relocations. Only the slot is encoded in the
-relocation. The meaning of these relocations is opcode-specific. */
- BFD_RELOC_XTENSA_SLOT0_ALT,
- BFD_RELOC_XTENSA_SLOT1_ALT,
- BFD_RELOC_XTENSA_SLOT2_ALT,
- BFD_RELOC_XTENSA_SLOT3_ALT,
- BFD_RELOC_XTENSA_SLOT4_ALT,
- BFD_RELOC_XTENSA_SLOT5_ALT,
- BFD_RELOC_XTENSA_SLOT6_ALT,
- BFD_RELOC_XTENSA_SLOT7_ALT,
- BFD_RELOC_XTENSA_SLOT8_ALT,
- BFD_RELOC_XTENSA_SLOT9_ALT,
- BFD_RELOC_XTENSA_SLOT10_ALT,
- BFD_RELOC_XTENSA_SLOT11_ALT,
- BFD_RELOC_XTENSA_SLOT12_ALT,
- BFD_RELOC_XTENSA_SLOT13_ALT,
- BFD_RELOC_XTENSA_SLOT14_ALT,
-
-/* Xtensa relocations for backward compatibility. These have all been
-replaced by BFD_RELOC_XTENSA_SLOT0_OP. */
- BFD_RELOC_XTENSA_OP0,
- BFD_RELOC_XTENSA_OP1,
- BFD_RELOC_XTENSA_OP2,
-
-/* Xtensa relocation to mark that the assembler expanded the
-instructions from an original target. The expansion size is
-encoded in the reloc size. */
- BFD_RELOC_XTENSA_ASM_EXPAND,
-
-/* Xtensa relocation to mark that the linker should simplify
-assembler-expanded instructions. This is commonly used
-internally by the linker after analysis of a
-BFD_RELOC_XTENSA_ASM_EXPAND. */
- BFD_RELOC_XTENSA_ASM_SIMPLIFY,
-
-/* Xtensa TLS relocations. */
- BFD_RELOC_XTENSA_TLSDESC_FN,
- BFD_RELOC_XTENSA_TLSDESC_ARG,
- BFD_RELOC_XTENSA_TLS_DTPOFF,
- BFD_RELOC_XTENSA_TLS_TPOFF,
- BFD_RELOC_XTENSA_TLS_FUNC,
- BFD_RELOC_XTENSA_TLS_ARG,
- BFD_RELOC_XTENSA_TLS_CALL,
-
-/* 8 bit signed offset in (ix+d) or (iy+d). */
- BFD_RELOC_Z80_DISP8,
-
-/* DJNZ offset. */
- BFD_RELOC_Z8K_DISP7,
-
-/* CALR offset. */
- BFD_RELOC_Z8K_CALLR,
-
-/* 4 bit value. */
- BFD_RELOC_Z8K_IMM4L,
-
-/* Lattice Mico32 relocations. */
- BFD_RELOC_LM32_CALL,
- BFD_RELOC_LM32_BRANCH,
- BFD_RELOC_LM32_16_GOT,
- BFD_RELOC_LM32_GOTOFF_HI16,
- BFD_RELOC_LM32_GOTOFF_LO16,
- BFD_RELOC_LM32_COPY,
- BFD_RELOC_LM32_GLOB_DAT,
- BFD_RELOC_LM32_JMP_SLOT,
- BFD_RELOC_LM32_RELATIVE,
-
-/* Difference between two section addreses. Must be followed by a
-BFD_RELOC_MACH_O_PAIR. */
- BFD_RELOC_MACH_O_SECTDIFF,
-
-/* Like BFD_RELOC_MACH_O_SECTDIFF but with a local symbol. */
- BFD_RELOC_MACH_O_LOCAL_SECTDIFF,
-
-/* Pair of relocation. Contains the first symbol. */
- BFD_RELOC_MACH_O_PAIR,
-
-/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */
- BFD_RELOC_MACH_O_SUBTRACTOR32,
-
-/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */
- BFD_RELOC_MACH_O_SUBTRACTOR64,
-
-/* PCREL relocations. They are marked as branch to create PLT entry if
-required. */
- BFD_RELOC_MACH_O_X86_64_BRANCH32,
- BFD_RELOC_MACH_O_X86_64_BRANCH8,
-
-/* Used when referencing a GOT entry. */
- BFD_RELOC_MACH_O_X86_64_GOT,
-
-/* Used when loading a GOT entry with movq. It is specially marked so that
-the linker could optimize the movq to a leaq if possible. */
- BFD_RELOC_MACH_O_X86_64_GOT_LOAD,
-
-/* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */
- BFD_RELOC_MACH_O_X86_64_PCREL32_1,
-
-/* Same as BFD_RELOC_32_PCREL but with an implicit -2 addend. */
- BFD_RELOC_MACH_O_X86_64_PCREL32_2,
-
-/* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */
- BFD_RELOC_MACH_O_X86_64_PCREL32_4,
-
-/* Used when referencing a TLV entry. */
- BFD_RELOC_MACH_O_X86_64_TLV,
-
-/* Addend for PAGE or PAGEOFF. */
- BFD_RELOC_MACH_O_ARM64_ADDEND,
-
-/* Relative offset to page of GOT slot. */
- BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21,
-
-/* Relative offset within page of GOT slot. */
- BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12,
-
-/* Address of a GOT entry. */
- BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT,
-
-/* This is a 32 bit reloc for the microblaze that stores the
-low 16 bits of a value */
- BFD_RELOC_MICROBLAZE_32_LO,
-
-/* This is a 32 bit pc-relative reloc for the microblaze that
-stores the low 16 bits of a value */
- BFD_RELOC_MICROBLAZE_32_LO_PCREL,
-
-/* This is a 32 bit reloc for the microblaze that stores a
-value relative to the read-only small data area anchor */
- BFD_RELOC_MICROBLAZE_32_ROSDA,
-
-/* This is a 32 bit reloc for the microblaze that stores a
-value relative to the read-write small data area anchor */
- BFD_RELOC_MICROBLAZE_32_RWSDA,
-
-/* This is a 32 bit reloc for the microblaze to handle
-expressions of the form "Symbol Op Symbol" */
- BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). No relocation is
-done here - only used for relaxing */
- BFD_RELOC_MICROBLAZE_64_NONE,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-PC-relative GOT offset */
- BFD_RELOC_MICROBLAZE_64_GOTPC,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-GOT offset */
- BFD_RELOC_MICROBLAZE_64_GOT,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-PC-relative offset into PLT */
- BFD_RELOC_MICROBLAZE_64_PLT,
-
-/* This is a 64 bit reloc that stores the 32 bit GOT relative
-value in two words (with an imm instruction). The relocation is
-relative offset from _GLOBAL_OFFSET_TABLE_ */
- BFD_RELOC_MICROBLAZE_64_GOTOFF,
-
-/* This is a 32 bit reloc that stores the 32 bit GOT relative
-value in a word. The relocation is relative offset from */
- BFD_RELOC_MICROBLAZE_32_GOTOFF,
-
-/* This is used to tell the dynamic linker to copy the value out of
-the dynamic object into the runtime process image. */
- BFD_RELOC_MICROBLAZE_COPY,
-
-/* Unused Reloc */
- BFD_RELOC_MICROBLAZE_64_TLS,
-
-/* This is a 64 bit reloc that stores the 32 bit GOT relative value
-of the GOT TLS GD info entry in two words (with an imm instruction). The
-relocation is GOT offset. */
- BFD_RELOC_MICROBLAZE_64_TLSGD,
-
-/* This is a 64 bit reloc that stores the 32 bit GOT relative value
-of the GOT TLS LD info entry in two words (with an imm instruction). The
-relocation is GOT offset. */
- BFD_RELOC_MICROBLAZE_64_TLSLD,
-
-/* This is a 32 bit reloc that stores the Module ID to GOT(n). */
- BFD_RELOC_MICROBLAZE_32_TLSDTPMOD,
-
-/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */
- BFD_RELOC_MICROBLAZE_32_TLSDTPREL,
-
-/* This is a 32 bit reloc for storing TLS offset to two words (uses imm
-instruction) */
- BFD_RELOC_MICROBLAZE_64_TLSDTPREL,
-
-/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
-to two words (uses imm instruction). */
- BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL,
-
-/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
-to two words (uses imm instruction). */
- BFD_RELOC_MICROBLAZE_64_TLSTPREL,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-PC-relative offset from start of TEXT. */
- BFD_RELOC_MICROBLAZE_64_TEXTPCREL,
-
-/* This is a 64 bit reloc that stores the 32 bit offset
-value in two words (with an imm instruction). The relocation is
-relative offset from start of TEXT. */
- BFD_RELOC_MICROBLAZE_64_TEXTREL,
-
-/* AArch64 pseudo relocation code to mark the start of the AArch64
-relocation enumerators. N.B. the order of the enumerators is
-important as several tables in the AArch64 bfd backend are indexed
-by these enumerators; make sure they are all synced. */
- BFD_RELOC_AARCH64_RELOC_START,
-
-/* Deprecated AArch64 null relocation code. */
- BFD_RELOC_AARCH64_NULL,
-
-/* AArch64 null relocation code. */
- BFD_RELOC_AARCH64_NONE,
-
-/* Basic absolute relocations of N bits. These are equivalent to
-BFD_RELOC_N and they were added to assist the indexing of the howto
-table. */
- BFD_RELOC_AARCH64_64,
- BFD_RELOC_AARCH64_32,
- BFD_RELOC_AARCH64_16,
-
-/* PC-relative relocations. These are equivalent to BFD_RELOC_N_PCREL
-and they were added to assist the indexing of the howto table. */
- BFD_RELOC_AARCH64_64_PCREL,
- BFD_RELOC_AARCH64_32_PCREL,
- BFD_RELOC_AARCH64_16_PCREL,
-
-/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15
-of an unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G0,
-
-/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of
-an address/value. No overflow checking. */
- BFD_RELOC_AARCH64_MOVW_G0_NC,
-
-/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31
-of an unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G1,
-
-/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31
-of an address/value. No overflow checking. */
- BFD_RELOC_AARCH64_MOVW_G1_NC,
-
-/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47
-of an unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G2,
-
-/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47
-of an address/value. No overflow checking. */
- BFD_RELOC_AARCH64_MOVW_G2_NC,
-
-/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64
-of a signed or unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G3,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_G0_S,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 16 to 31
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_G1_S,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 32 to 47
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_G2_S,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_PREL_G0,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
-
-/* AArch64 MOVK instruction with most significant bits 16 to 31
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G1,
-
-/* AArch64 MOVK instruction with most significant bits 16 to 31
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
-
-/* AArch64 MOVK instruction with most significant bits 32 to 47
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G2,
-
-/* AArch64 MOVK instruction with most significant bits 32 to 47
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
-
-/* AArch64 MOVK instruction with most significant bits 47 to 63
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G3,
-
-/* AArch64 Load Literal instruction, holding a 19 bit pc-relative word
-offset. The lowest two bits must be zero and are not stored in the
-instruction, giving a 21 bit signed byte offset. */
- BFD_RELOC_AARCH64_LD_LO19_PCREL,
-
-/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */
- BFD_RELOC_AARCH64_ADR_LO21_PCREL,
-
-/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
-offset, giving a 4KB aligned page base address. */
- BFD_RELOC_AARCH64_ADR_HI21_PCREL,
-
-/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
-offset, giving a 4KB aligned page base address, but with no overflow
-checking. */
- BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL,
-
-/* AArch64 ADD immediate instruction, holding bits 0 to 11 of the address.
-Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_ADD_LO12,
-
-/* AArch64 8-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST8_LO12,
-
-/* AArch64 14 bit pc-relative test bit and branch.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 16 bit signed byte offset. */
- BFD_RELOC_AARCH64_TSTBR14,
-
-/* AArch64 19 bit pc-relative conditional branch and compare & branch.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 21 bit signed byte offset. */
- BFD_RELOC_AARCH64_BRANCH19,
-
-/* AArch64 26 bit pc-relative unconditional branch.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 28 bit signed byte offset. */
- BFD_RELOC_AARCH64_JUMP26,
-
-/* AArch64 26 bit pc-relative unconditional branch and link.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 28 bit signed byte offset. */
- BFD_RELOC_AARCH64_CALL26,
-
-/* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST16_LO12,
-
-/* AArch64 32-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST32_LO12,
-
-/* AArch64 64-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST64_LO12,
-
-/* AArch64 128-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST128_LO12,
-
-/* AArch64 Load Literal instruction, holding a 19 bit PC relative word
-offset of the global offset table entry for a symbol. The lowest two
-bits must be zero and are not stored in the instruction, giving a 21
-bit signed byte offset. This relocation type requires signed overflow
-checking. */
- BFD_RELOC_AARCH64_GOT_LD_PREL19,
-
-/* Get to the page base of the global offset table entry for a symbol as
-part of an ADRP instruction using a 21 bit PC relative value.Used in
-conjunction with BFD_RELOC_AARCH64_LD64_GOT_LO12_NC. */
- BFD_RELOC_AARCH64_ADR_GOT_PAGE,
-
-/* Unsigned 12 bit byte offset for 64 bit load/store from the page of
-the GOT entry for this symbol. Used in conjunction with
-BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_LD64_GOT_LO12_NC,
-
-/* Unsigned 12 bit byte offset for 32 bit load/store from the page of
-the GOT entry for this symbol. Used in conjunction with
-BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in ILP32 ABI only. */
- BFD_RELOC_AARCH64_LD32_GOT_LO12_NC,
-
-/* Unsigned 16 bit byte offset for 64 bit load/store from the GOT entry
-for this symbol. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
-
-/* Unsigned 16 bit byte higher offset for 64 bit load/store from the GOT entry
-for this symbol. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_MOVW_GOTOFF_G1,
-
-/* Unsigned 15 bit byte offset for 64 bit load/store from the page of
-the GOT entry for this symbol. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_LD64_GOTOFF_LO15,
-
-/* Scaled 14 bit byte offset to the page base of the global offset table. */
- BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14,
-
-/* Scaled 15 bit byte offset to the page base of the global offset table. */
- BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15,
-
-/* Get to the page base of the global offset table entry for a symbols
-tls_index structure as part of an adrp instruction using a 21 bit PC
-relative value. Used in conjunction with
-BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */
- BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21,
-
-/* AArch64 TLS General Dynamic */
- BFD_RELOC_AARCH64_TLSGD_ADR_PREL21,
-
-/* Unsigned 12 bit byte offset to global offset table entry for a symbols
-tls_index structure. Used in conjunction with
-BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21. */
- BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC,
-
-/* AArch64 TLS General Dynamic relocation. */
- BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC,
-
-/* AArch64 TLS General Dynamic relocation. */
- BFD_RELOC_AARCH64_TLSGD_MOVW_G1,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1,
-
-/* bit[23:12] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
-
-/* Unsigned 12 bit byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12,
-
-/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */
- BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC,
-
-/* Unsigned 12 bit byte offset to global offset table entry for a symbols
-tls_index structure. Used in conjunction with
-BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21. */
- BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC,
-
-/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP
-instruction. */
- BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21,
-
-/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */
- BFD_RELOC_AARCH64_TLSLD_ADR_PREL21,
-
-/* bit[11:1] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
-
-/* bit[11:2] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
-
-/* bit[11:3] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
-
-/* bit[11:0] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
-
-/* bit[15:0] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
-
-/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
-
-/* bit[31:16] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
-
-/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
-
-/* bit[47:32] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC,
-
-/* bit[11:1] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
-
-/* bit[11:2] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
-
-/* bit[11:3] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
-
-/* bit[11:0] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LD_PREL19,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LD64_LO12,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADD_LO12,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_OFF_G1,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LDR,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADD,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_CALL,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_COPY,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_GLOB_DAT,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_JUMP_SLOT,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_RELATIVE,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLS_DTPMOD,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLS_DTPREL,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLS_TPREL,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLSDESC,
-
-/* AArch64 support for STT_GNU_IFUNC. */
- BFD_RELOC_AARCH64_IRELATIVE,
-
-/* AArch64 pseudo relocation code to mark the end of the AArch64
-relocation enumerators that have direct mapping to ELF reloc codes.
-There are a few more enumerators after this one; those are mainly
-used by the AArch64 assembler for the internal fixup or to select
-one of the above enumerators. */
- BFD_RELOC_AARCH64_RELOC_END,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP,
-
-/* AArch64 unspecified load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST_LO12,
-
-/* AArch64 pseudo relocation code for TLS local dynamic mode. It's to be
-used internally by the AArch64 assembler and not (currently) written to
-any object files. */
- BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC,
-
-/* AArch64 pseudo relocation code for TLS local exec mode. It's to be
-used internally by the AArch64 assembler and not (currently) written to
-any object files. */
- BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_LD_GOT_LO12_NC,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC,
-
-/* Tilera TILEPro Relocations. */
- BFD_RELOC_TILEPRO_COPY,
- BFD_RELOC_TILEPRO_GLOB_DAT,
- BFD_RELOC_TILEPRO_JMP_SLOT,
- BFD_RELOC_TILEPRO_RELATIVE,
- BFD_RELOC_TILEPRO_BROFF_X1,
- BFD_RELOC_TILEPRO_JOFFLONG_X1,
- BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT,
- BFD_RELOC_TILEPRO_IMM8_X0,
- BFD_RELOC_TILEPRO_IMM8_Y0,
- BFD_RELOC_TILEPRO_IMM8_X1,
- BFD_RELOC_TILEPRO_IMM8_Y1,
- BFD_RELOC_TILEPRO_DEST_IMM8_X1,
- BFD_RELOC_TILEPRO_MT_IMM15_X1,
- BFD_RELOC_TILEPRO_MF_IMM15_X1,
- BFD_RELOC_TILEPRO_IMM16_X0,
- BFD_RELOC_TILEPRO_IMM16_X1,
- BFD_RELOC_TILEPRO_IMM16_X0_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_HA,
- BFD_RELOC_TILEPRO_IMM16_X0_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA,
- BFD_RELOC_TILEPRO_MMSTART_X0,
- BFD_RELOC_TILEPRO_MMEND_X0,
- BFD_RELOC_TILEPRO_MMSTART_X1,
- BFD_RELOC_TILEPRO_MMEND_X1,
- BFD_RELOC_TILEPRO_SHAMT_X0,
- BFD_RELOC_TILEPRO_SHAMT_X1,
- BFD_RELOC_TILEPRO_SHAMT_Y0,
- BFD_RELOC_TILEPRO_SHAMT_Y1,
- BFD_RELOC_TILEPRO_TLS_GD_CALL,
- BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_TLS_IE_LOAD,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA,
- BFD_RELOC_TILEPRO_TLS_DTPMOD32,
- BFD_RELOC_TILEPRO_TLS_DTPOFF32,
- BFD_RELOC_TILEPRO_TLS_TPOFF32,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
-
-/* Tilera TILE-Gx Relocations. */
- BFD_RELOC_TILEGX_HW0,
- BFD_RELOC_TILEGX_HW1,
- BFD_RELOC_TILEGX_HW2,
- BFD_RELOC_TILEGX_HW3,
- BFD_RELOC_TILEGX_HW0_LAST,
- BFD_RELOC_TILEGX_HW1_LAST,
- BFD_RELOC_TILEGX_HW2_LAST,
- BFD_RELOC_TILEGX_COPY,
- BFD_RELOC_TILEGX_GLOB_DAT,
- BFD_RELOC_TILEGX_JMP_SLOT,
- BFD_RELOC_TILEGX_RELATIVE,
- BFD_RELOC_TILEGX_BROFF_X1,
- BFD_RELOC_TILEGX_JUMPOFF_X1,
- BFD_RELOC_TILEGX_JUMPOFF_X1_PLT,
- BFD_RELOC_TILEGX_IMM8_X0,
- BFD_RELOC_TILEGX_IMM8_Y0,
- BFD_RELOC_TILEGX_IMM8_X1,
- BFD_RELOC_TILEGX_IMM8_Y1,
- BFD_RELOC_TILEGX_DEST_IMM8_X1,
- BFD_RELOC_TILEGX_MT_IMM14_X1,
- BFD_RELOC_TILEGX_MF_IMM14_X1,
- BFD_RELOC_TILEGX_MMSTART_X0,
- BFD_RELOC_TILEGX_MMEND_X0,
- BFD_RELOC_TILEGX_SHAMT_X0,
- BFD_RELOC_TILEGX_SHAMT_X1,
- BFD_RELOC_TILEGX_SHAMT_Y0,
- BFD_RELOC_TILEGX_SHAMT_Y1,
- BFD_RELOC_TILEGX_IMM16_X0_HW0,
- BFD_RELOC_TILEGX_IMM16_X1_HW0,
- BFD_RELOC_TILEGX_IMM16_X0_HW1,
- BFD_RELOC_TILEGX_IMM16_X1_HW1,
- BFD_RELOC_TILEGX_IMM16_X0_HW2,
- BFD_RELOC_TILEGX_IMM16_X1_HW2,
- BFD_RELOC_TILEGX_IMM16_X0_HW3,
- BFD_RELOC_TILEGX_IMM16_X1_HW3,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE,
- BFD_RELOC_TILEGX_TLS_DTPMOD64,
- BFD_RELOC_TILEGX_TLS_DTPOFF64,
- BFD_RELOC_TILEGX_TLS_TPOFF64,
- BFD_RELOC_TILEGX_TLS_DTPMOD32,
- BFD_RELOC_TILEGX_TLS_DTPOFF32,
- BFD_RELOC_TILEGX_TLS_TPOFF32,
- BFD_RELOC_TILEGX_TLS_GD_CALL,
- BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
- BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
- BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
- BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD,
- BFD_RELOC_TILEGX_TLS_IE_LOAD,
- BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
- BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
- BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD,
- BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD,
-
-/* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */
- BFD_RELOC_EPIPHANY_SIMM8,
-
-/* Adapteva EPIPHANY - 24 bit signed pc-relative displacement */
- BFD_RELOC_EPIPHANY_SIMM24,
-
-/* Adapteva EPIPHANY - 16 most-significant bits of absolute address */
- BFD_RELOC_EPIPHANY_HIGH,
-
-/* Adapteva EPIPHANY - 16 least-significant bits of absolute address */
- BFD_RELOC_EPIPHANY_LOW,
-
-/* Adapteva EPIPHANY - 11 bit signed number - add/sub immediate */
- BFD_RELOC_EPIPHANY_SIMM11,
-
-/* Adapteva EPIPHANY - 11 bit sign-magnitude number (ld/st displacement) */
- BFD_RELOC_EPIPHANY_IMM11,
-
-/* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */
- BFD_RELOC_EPIPHANY_IMM8,
-
-/* Visium Relocations. */
- BFD_RELOC_VISIUM_HI16,
- BFD_RELOC_VISIUM_LO16,
- BFD_RELOC_VISIUM_IM16,
- BFD_RELOC_VISIUM_REL16,
- BFD_RELOC_VISIUM_HI16_PCREL,
- BFD_RELOC_VISIUM_LO16_PCREL,
- BFD_RELOC_VISIUM_IM16_PCREL,
-
-/* WebAssembly relocations. */
- BFD_RELOC_WASM32_LEB128,
- BFD_RELOC_WASM32_LEB128_GOT,
- BFD_RELOC_WASM32_LEB128_GOT_CODE,
- BFD_RELOC_WASM32_LEB128_PLT,
- BFD_RELOC_WASM32_PLT_INDEX,
- BFD_RELOC_WASM32_ABS32_CODE,
- BFD_RELOC_WASM32_COPY,
- BFD_RELOC_WASM32_CODE_POINTER,
- BFD_RELOC_WASM32_INDEX,
- BFD_RELOC_WASM32_PLT_SIG,
-
-/* C-SKY relocations. */
- BFD_RELOC_CKCORE_NONE,
- BFD_RELOC_CKCORE_ADDR32,
- BFD_RELOC_CKCORE_PCREL_IMM8BY4,
- BFD_RELOC_CKCORE_PCREL_IMM11BY2,
- BFD_RELOC_CKCORE_PCREL_IMM4BY2,
- BFD_RELOC_CKCORE_PCREL32,
- BFD_RELOC_CKCORE_PCREL_JSR_IMM11BY2,
- BFD_RELOC_CKCORE_GNU_VTINHERIT,
- BFD_RELOC_CKCORE_GNU_VTENTRY,
- BFD_RELOC_CKCORE_RELATIVE,
- BFD_RELOC_CKCORE_COPY,
- BFD_RELOC_CKCORE_GLOB_DAT,
- BFD_RELOC_CKCORE_JUMP_SLOT,
- BFD_RELOC_CKCORE_GOTOFF,
- BFD_RELOC_CKCORE_GOTPC,
- BFD_RELOC_CKCORE_GOT32,
- BFD_RELOC_CKCORE_PLT32,
- BFD_RELOC_CKCORE_ADDRGOT,
- BFD_RELOC_CKCORE_ADDRPLT,
- BFD_RELOC_CKCORE_PCREL_IMM26BY2,
- BFD_RELOC_CKCORE_PCREL_IMM16BY2,
- BFD_RELOC_CKCORE_PCREL_IMM16BY4,
- BFD_RELOC_CKCORE_PCREL_IMM10BY2,
- BFD_RELOC_CKCORE_PCREL_IMM10BY4,
- BFD_RELOC_CKCORE_ADDR_HI16,
- BFD_RELOC_CKCORE_ADDR_LO16,
- BFD_RELOC_CKCORE_GOTPC_HI16,
- BFD_RELOC_CKCORE_GOTPC_LO16,
- BFD_RELOC_CKCORE_GOTOFF_HI16,
- BFD_RELOC_CKCORE_GOTOFF_LO16,
- BFD_RELOC_CKCORE_GOT12,
- BFD_RELOC_CKCORE_GOT_HI16,
- BFD_RELOC_CKCORE_GOT_LO16,
- BFD_RELOC_CKCORE_PLT12,
- BFD_RELOC_CKCORE_PLT_HI16,
- BFD_RELOC_CKCORE_PLT_LO16,
- BFD_RELOC_CKCORE_ADDRGOT_HI16,
- BFD_RELOC_CKCORE_ADDRGOT_LO16,
- BFD_RELOC_CKCORE_ADDRPLT_HI16,
- BFD_RELOC_CKCORE_ADDRPLT_LO16,
- BFD_RELOC_CKCORE_PCREL_JSR_IMM26BY2,
- BFD_RELOC_CKCORE_TOFFSET_LO16,
- BFD_RELOC_CKCORE_DOFFSET_LO16,
- BFD_RELOC_CKCORE_PCREL_IMM18BY2,
- BFD_RELOC_CKCORE_DOFFSET_IMM18,
- BFD_RELOC_CKCORE_DOFFSET_IMM18BY2,
- BFD_RELOC_CKCORE_DOFFSET_IMM18BY4,
- BFD_RELOC_CKCORE_GOTOFF_IMM18,
- BFD_RELOC_CKCORE_GOT_IMM18BY4,
- BFD_RELOC_CKCORE_PLT_IMM18BY4,
- BFD_RELOC_CKCORE_PCREL_IMM7BY4,
- BFD_RELOC_CKCORE_TLS_LE32,
- BFD_RELOC_CKCORE_TLS_IE32,
- BFD_RELOC_CKCORE_TLS_GD32,
- BFD_RELOC_CKCORE_TLS_LDM32,
- BFD_RELOC_CKCORE_TLS_LDO32,
- BFD_RELOC_CKCORE_TLS_DTPMOD32,
- BFD_RELOC_CKCORE_TLS_DTPOFF32,
- BFD_RELOC_CKCORE_TLS_TPOFF32,
- BFD_RELOC_CKCORE_PCREL_FLRW_IMM8BY4,
- BFD_RELOC_CKCORE_NOJSRI,
- BFD_RELOC_CKCORE_CALLGRAPH,
- BFD_RELOC_CKCORE_IRELATIVE,
- BFD_RELOC_CKCORE_PCREL_BLOOP_IMM4BY4,
- BFD_RELOC_CKCORE_PCREL_BLOOP_IMM12BY4,
-
-/* S12Z relocations. */
- BFD_RELOC_S12Z_OPR,
- BFD_RELOC_UNUSED };
-
-typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
-reloc_howto_type *bfd_reloc_type_lookup
- (bfd *abfd, bfd_reloc_code_real_type code);
-reloc_howto_type *bfd_reloc_name_lookup
- (bfd *abfd, const char *reloc_name);
-
-const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
-
-/* Extracted from syms.c. */
-
-typedef struct bfd_symbol
-{
- /* A pointer to the BFD which owns the symbol. This information
- is necessary so that a back end can work out what additional
- information (invisible to the application writer) is carried
- with the symbol.
-
- This field is *almost* redundant, since you can use section->owner
- instead, except that some symbols point to the global sections
- bfd_{abs,com,und}_section. This could be fixed by making
- these globals be per-bfd (or per-target-flavor). FIXME. */
- struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
-
- /* The text of the symbol. The name is left alone, and not copied; the
- application may not alter it. */
- const char *name;
-
- /* The value of the symbol. This really should be a union of a
- numeric value with a pointer, since some flags indicate that
- a pointer to another symbol is stored here. */
- symvalue value;
-
- /* Attributes of a symbol. */
-#define BSF_NO_FLAGS 0
-
- /* The symbol has local scope; <> in <>. The value
- is the offset into the section of the data. */
-#define BSF_LOCAL (1 << 0)
-
- /* The symbol has global scope; initialized data in <>. The
- value is the offset into the section of the data. */
-#define BSF_GLOBAL (1 << 1)
-
- /* The symbol has global scope and is exported. The value is
- the offset into the section of the data. */
-#define BSF_EXPORT BSF_GLOBAL /* No real difference. */
-
- /* A normal C symbol would be one of:
- <>, <> or <>. */
-
- /* The symbol is a debugging record. The value has an arbitrary
- meaning, unless BSF_DEBUGGING_RELOC is also set. */
-#define BSF_DEBUGGING (1 << 2)
-
- /* The symbol denotes a function entry point. Used in ELF,
- perhaps others someday. */
-#define BSF_FUNCTION (1 << 3)
-
- /* Used by the linker. */
-#define BSF_KEEP (1 << 5)
-
- /* An ELF common symbol. */
-#define BSF_ELF_COMMON (1 << 6)
-
- /* A weak global symbol, overridable without warnings by
- a regular global symbol of the same name. */
-#define BSF_WEAK (1 << 7)
-
- /* This symbol was created to point to a section, e.g. ELF's
- STT_SECTION symbols. */
-#define BSF_SECTION_SYM (1 << 8)
-
- /* The symbol used to be a common symbol, but now it is
- allocated. */
-#define BSF_OLD_COMMON (1 << 9)
-
- /* In some files the type of a symbol sometimes alters its
- location in an output file - ie in coff a <> symbol
- which is also <> symbol appears where it was
- declared and not at the end of a section. This bit is set
- by the target BFD part to convey this information. */
-#define BSF_NOT_AT_END (1 << 10)
-
- /* Signal that the symbol is the label of constructor section. */
-#define BSF_CONSTRUCTOR (1 << 11)
-
- /* Signal that the symbol is a warning symbol. The name is a
- warning. The name of the next symbol is the one to warn about;
- if a reference is made to a symbol with the same name as the next
- symbol, a warning is issued by the linker. */
-#define BSF_WARNING (1 << 12)
-
- /* Signal that the symbol is indirect. This symbol is an indirect
- pointer to the symbol with the same name as the next symbol. */
-#define BSF_INDIRECT (1 << 13)
-
- /* BSF_FILE marks symbols that contain a file name. This is used
- for ELF STT_FILE symbols. */
-#define BSF_FILE (1 << 14)
-
- /* Symbol is from dynamic linking information. */
-#define BSF_DYNAMIC (1 << 15)
-
- /* The symbol denotes a data object. Used in ELF, and perhaps
- others someday. */
-#define BSF_OBJECT (1 << 16)
-
- /* This symbol is a debugging symbol. The value is the offset
- into the section of the data. BSF_DEBUGGING should be set
- as well. */
-#define BSF_DEBUGGING_RELOC (1 << 17)
-
- /* This symbol is thread local. Used in ELF. */
-#define BSF_THREAD_LOCAL (1 << 18)
-
- /* This symbol represents a complex relocation expression,
- with the expression tree serialized in the symbol name. */
-#define BSF_RELC (1 << 19)
-
- /* This symbol represents a signed complex relocation expression,
- with the expression tree serialized in the symbol name. */
-#define BSF_SRELC (1 << 20)
-
- /* This symbol was created by bfd_get_synthetic_symtab. */
-#define BSF_SYNTHETIC (1 << 21)
-
- /* This symbol is an indirect code object. Unrelated to BSF_INDIRECT.
- The dynamic linker will compute the value of this symbol by
- calling the function that it points to. BSF_FUNCTION must
- also be also set. */
-#define BSF_GNU_INDIRECT_FUNCTION (1 << 22)
- /* This symbol is a globally unique data object. The dynamic linker
- will make sure that in the entire process there is just one symbol
- with this name and type in use. BSF_OBJECT must also be set. */
-#define BSF_GNU_UNIQUE (1 << 23)
-
- flagword flags;
-
- /* A pointer to the section to which this symbol is
- relative. This will always be non NULL, there are special
- sections for undefined and absolute symbols. */
- struct bfd_section *section;
-
- /* Back end special data. */
- union
- {
- void *p;
- bfd_vma i;
- }
- udata;
-}
-asymbol;
-
-#define bfd_get_symtab_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
-
-bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
-
-bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
-
-#define bfd_is_local_label_name(abfd, name) \
- BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
-
-bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
-
-#define bfd_is_target_special_symbol(abfd, sym) \
- BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
-
-#define bfd_canonicalize_symtab(abfd, location) \
- BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
-
-bfd_boolean bfd_set_symtab
- (bfd *abfd, asymbol **location, unsigned int count);
-
-void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
-
-#define bfd_make_empty_symbol(abfd) \
- BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
-
-asymbol *_bfd_generic_make_empty_symbol (bfd *);
-
-#define bfd_make_debug_symbol(abfd,ptr,size) \
- BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
-
-int bfd_decode_symclass (asymbol *symbol);
-
-bfd_boolean bfd_is_undefined_symclass (int symclass);
-
-void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
-
-bfd_boolean bfd_copy_private_symbol_data
- (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
-
-#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
- BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
- (ibfd, isymbol, obfd, osymbol))
-
-/* Extracted from bfd.c. */
-
-enum bfd_direction
- {
- no_direction = 0,
- read_direction = 1,
- write_direction = 2,
- both_direction = 3
- };
-
-enum bfd_plugin_format
- {
- bfd_plugin_unknown = 0,
- bfd_plugin_yes = 1,
- bfd_plugin_no = 2
- };
-
-struct bfd_build_id
- {
- bfd_size_type size;
- bfd_byte data[1];
- };
-
-struct bfd
-{
- /* The filename the application opened the BFD with. */
- const char *filename;
-
- /* A pointer to the target jump table. */
- const struct bfd_target *xvec;
-
- /* The IOSTREAM, and corresponding IO vector that provide access
- to the file backing the BFD. */
- void *iostream;
- const struct bfd_iovec *iovec;
-
- /* The caching routines use these to maintain a
- least-recently-used list of BFDs. */
- struct bfd *lru_prev, *lru_next;
-
- /* Track current file position (or current buffer offset for
- in-memory BFDs). When a file is closed by the caching routines,
- BFD retains state information on the file here. */
- ufile_ptr where;
-
- /* File modified time, if mtime_set is TRUE. */
- long mtime;
-
- /* A unique identifier of the BFD */
- unsigned int id;
-
- /* The format which belongs to the BFD. (object, core, etc.) */
- ENUM_BITFIELD (bfd_format) format : 3;
-
- /* The direction with which the BFD was opened. */
- ENUM_BITFIELD (bfd_direction) direction : 2;
-
- /* Format_specific flags. */
- flagword flags : 20;
-
- /* Values that may appear in the flags field of a BFD. These also
- appear in the object_flags field of the bfd_target structure, where
- they indicate the set of flags used by that backend (not all flags
- are meaningful for all object file formats) (FIXME: at the moment,
- the object_flags values have mostly just been copied from backend
- to another, and are not necessarily correct). */
-
-#define BFD_NO_FLAGS 0x0
-
- /* BFD contains relocation entries. */
-#define HAS_RELOC 0x1
-
- /* BFD is directly executable. */
-#define EXEC_P 0x2
-
- /* BFD has line number information (basically used for F_LNNO in a
- COFF header). */
-#define HAS_LINENO 0x4
-
- /* BFD has debugging information. */
-#define HAS_DEBUG 0x08
-
- /* BFD has symbols. */
-#define HAS_SYMS 0x10
-
- /* BFD has local symbols (basically used for F_LSYMS in a COFF
- header). */
-#define HAS_LOCALS 0x20
-
- /* BFD is a dynamic object. */
-#define DYNAMIC 0x40
-
- /* Text section is write protected (if D_PAGED is not set, this is
- like an a.out NMAGIC file) (the linker sets this by default, but
- clears it for -r or -N). */
-#define WP_TEXT 0x80
-
- /* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the
- linker sets this by default, but clears it for -r or -n or -N). */
-#define D_PAGED 0x100
-
- /* BFD is relaxable (this means that bfd_relax_section may be able to
- do something) (sometimes bfd_relax_section can do something even if
- this is not set). */
-#define BFD_IS_RELAXABLE 0x200
-
- /* This may be set before writing out a BFD to request using a
- traditional format. For example, this is used to request that when
- writing out an a.out object the symbols not be hashed to eliminate
- duplicates. */
-#define BFD_TRADITIONAL_FORMAT 0x400
-
- /* This flag indicates that the BFD contents are actually cached
- in memory. If this is set, iostream points to a bfd_in_memory
- struct. */
-#define BFD_IN_MEMORY 0x800
-
- /* This BFD has been created by the linker and doesn't correspond
- to any input file. */
-#define BFD_LINKER_CREATED 0x1000
-
- /* This may be set before writing out a BFD to request that it
- be written using values for UIDs, GIDs, timestamps, etc. that
- will be consistent from run to run. */
-#define BFD_DETERMINISTIC_OUTPUT 0x2000
-
- /* Compress sections in this BFD. */
-#define BFD_COMPRESS 0x4000
-
- /* Decompress sections in this BFD. */
-#define BFD_DECOMPRESS 0x8000
-
- /* BFD is a dummy, for plugins. */
-#define BFD_PLUGIN 0x10000
-
- /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */
-#define BFD_COMPRESS_GABI 0x20000
-
- /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this
- BFD. */
-#define BFD_CONVERT_ELF_COMMON 0x40000
-
- /* Use the ELF STT_COMMON type in this BFD. */
-#define BFD_USE_ELF_STT_COMMON 0x80000
-
- /* Flags bits to be saved in bfd_preserve_save. */
-#define BFD_FLAGS_SAVED \
- (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
- | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \
- | BFD_USE_ELF_STT_COMMON)
-
- /* Flags bits which are for BFD use only. */
-#define BFD_FLAGS_FOR_BFD_USE_MASK \
- (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
- | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \
- | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON)
-
- /* Is the file descriptor being cached? That is, can it be closed as
- needed, and re-opened when accessed later? */
- unsigned int cacheable : 1;
-
- /* Marks whether there was a default target specified when the
- BFD was opened. This is used to select which matching algorithm
- to use to choose the back end. */
- unsigned int target_defaulted : 1;
-
- /* ... and here: (``once'' means at least once). */
- unsigned int opened_once : 1;
-
- /* Set if we have a locally maintained mtime value, rather than
- getting it from the file each time. */
- unsigned int mtime_set : 1;
-
- /* Flag set if symbols from this BFD should not be exported. */
- unsigned int no_export : 1;
-
- /* Remember when output has begun, to stop strange things
- from happening. */
- unsigned int output_has_begun : 1;
-
- /* Have archive map. */
- unsigned int has_armap : 1;
-
- /* Set if this is a thin archive. */
- unsigned int is_thin_archive : 1;
-
- /* Set if only required symbols should be added in the link hash table for
- this object. Used by VMS linkers. */
- unsigned int selective_search : 1;
-
- /* Set if this is the linker output BFD. */
- unsigned int is_linker_output : 1;
-
- /* Set if this is the linker input BFD. */
- unsigned int is_linker_input : 1;
-
- /* If this is an input for a compiler plug-in library. */
- ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2;
-
- /* Set if this is a plugin output file. */
- unsigned int lto_output : 1;
-
- /* Set to dummy BFD created when claimed by a compiler plug-in
- library. */
- bfd *plugin_dummy_bfd;
-
- /* Currently my_archive is tested before adding origin to
- anything. I believe that this can become always an add of
- origin, with origin set to 0 for non archive files. */
- ufile_ptr origin;
-
- /* The origin in the archive of the proxy entry. This will
- normally be the same as origin, except for thin archives,
- when it will contain the current offset of the proxy in the
- thin archive rather than the offset of the bfd in its actual
- container. */
- ufile_ptr proxy_origin;
-
- /* A hash table for section names. */
- struct bfd_hash_table section_htab;
-
- /* Pointer to linked list of sections. */
- struct bfd_section *sections;
-
- /* The last section on the section list. */
- struct bfd_section *section_last;
-
- /* The number of sections. */
- unsigned int section_count;
-
- /* A field used by _bfd_generic_link_add_archive_symbols. This will
- be used only for archive elements. */
- int archive_pass;
-
- /* Stuff only useful for object files:
- The start address. */
- bfd_vma start_address;
-
- /* Symbol table for output BFD (with symcount entries).
- Also used by the linker to cache input BFD symbols. */
- struct bfd_symbol **outsymbols;
-
- /* Used for input and output. */
- unsigned int symcount;
-
- /* Used for slurped dynamic symbol tables. */
- unsigned int dynsymcount;
-
- /* Pointer to structure which contains architecture information. */
- const struct bfd_arch_info *arch_info;
-
- /* Stuff only useful for archives. */
- void *arelt_data;
- struct bfd *my_archive; /* The containing archive BFD. */
- struct bfd *archive_next; /* The next BFD in the archive. */
- struct bfd *archive_head; /* The first BFD in the archive. */
- struct bfd *nested_archives; /* List of nested archive in a flattened
- thin archive. */
-
- union {
- /* For input BFDs, a chain of BFDs involved in a link. */
- struct bfd *next;
- /* For output BFD, the linker hash table. */
- struct bfd_link_hash_table *hash;
- } link;
-
- /* Used by the back end to hold private data. */
- union
- {
- struct aout_data_struct *aout_data;
- struct artdata *aout_ar_data;
- struct coff_tdata *coff_obj_data;
- struct pe_tdata *pe_obj_data;
- struct xcoff_tdata *xcoff_obj_data;
- struct ecoff_tdata *ecoff_obj_data;
- struct srec_data_struct *srec_data;
- struct verilog_data_struct *verilog_data;
- struct ihex_data_struct *ihex_data;
- struct tekhex_data_struct *tekhex_data;
- struct elf_obj_tdata *elf_obj_data;
- struct mmo_data_struct *mmo_data;
- struct sun_core_struct *sun_core_data;
- struct sco5_core_struct *sco5_core_data;
- struct trad_core_struct *trad_core_data;
- struct som_data_struct *som_data;
- struct hpux_core_struct *hpux_core_data;
- struct hppabsd_core_struct *hppabsd_core_data;
- struct sgi_core_struct *sgi_core_data;
- struct lynx_core_struct *lynx_core_data;
- struct osf_core_struct *osf_core_data;
- struct cisco_core_struct *cisco_core_data;
- struct versados_data_struct *versados_data;
- struct netbsd_core_struct *netbsd_core_data;
- struct mach_o_data_struct *mach_o_data;
- struct mach_o_fat_data_struct *mach_o_fat_data;
- struct plugin_data_struct *plugin_data;
- struct bfd_pef_data_struct *pef_data;
- struct bfd_pef_xlib_data_struct *pef_xlib_data;
- struct bfd_sym_data_struct *sym_data;
- void *any;
- }
- tdata;
-
- /* Used by the application to hold private data. */
- void *usrdata;
-
- /* Where all the allocated stuff under this BFD goes. This is a
- struct objalloc *, but we use void * to avoid requiring the inclusion
- of objalloc.h. */
- void *memory;
-
- /* For input BFDs, the build ID, if the object has one. */
- const struct bfd_build_id *build_id;
-};
-
-/* See note beside bfd_set_section_userdata. */
-static inline bfd_boolean
-bfd_set_cacheable (bfd * abfd, bfd_boolean val)
-{
- abfd->cacheable = val;
- return TRUE;
-}
-
-
-typedef enum bfd_error
-{
- bfd_error_no_error = 0,
- bfd_error_system_call,
- bfd_error_invalid_target,
- bfd_error_wrong_format,
- bfd_error_wrong_object_format,
- bfd_error_invalid_operation,
- bfd_error_no_memory,
- bfd_error_no_symbols,
- bfd_error_no_armap,
- bfd_error_no_more_archived_files,
- bfd_error_malformed_archive,
- bfd_error_missing_dso,
- bfd_error_file_not_recognized,
- bfd_error_file_ambiguously_recognized,
- bfd_error_no_contents,
- bfd_error_nonrepresentable_section,
- bfd_error_no_debug_section,
- bfd_error_bad_value,
- bfd_error_file_truncated,
- bfd_error_file_too_big,
- bfd_error_on_input,
- bfd_error_invalid_error_code
-}
-bfd_error_type;
-
-bfd_error_type bfd_get_error (void);
-
-void bfd_set_error (bfd_error_type error_tag);
-
-void bfd_set_input_error (bfd *input, bfd_error_type error_tag);
-
-const char *bfd_errmsg (bfd_error_type error_tag);
-
-void bfd_perror (const char *message);
-
-
-typedef void (*bfd_error_handler_type) (const char *, va_list);
-
-void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1;
-
-bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
-
-void bfd_set_error_program_name (const char *);
-
-
-typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg,
- const char *bfd_version,
- const char *bfd_file,
- int bfd_line);
-
-bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type);
-
-long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
-
-long bfd_canonicalize_reloc
- (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
-
-void bfd_set_reloc
- (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
-
-#define bfd_set_reloc(abfd, asect, location, count) \
- BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count))
-bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
-
-int bfd_get_arch_size (bfd *abfd);
-
-int bfd_get_sign_extend_vma (bfd *abfd);
-
-bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
-
-unsigned int bfd_get_gp_size (bfd *abfd);
-
-void bfd_set_gp_size (bfd *abfd, unsigned int i);
-
-bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
-
-bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
-
-#define bfd_copy_private_header_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_copy_private_header_data, \
- (ibfd, obfd))
-bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
-
-#define bfd_copy_private_bfd_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
- (ibfd, obfd))
-bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
-
-#define bfd_set_private_flags(abfd, flags) \
- BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
-#define bfd_sizeof_headers(abfd, info) \
- BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info))
-
-#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
- BFD_SEND (abfd, _bfd_find_nearest_line, \
- (abfd, syms, sec, off, file, func, line, NULL))
-
-#define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \
- line, disc) \
- BFD_SEND (abfd, _bfd_find_nearest_line, \
- (abfd, syms, sec, off, file, func, line, disc))
-
-#define bfd_find_line(abfd, syms, sym, file, line) \
- BFD_SEND (abfd, _bfd_find_line, \
- (abfd, syms, sym, file, line))
-
-#define bfd_find_inliner_info(abfd, file, func, line) \
- BFD_SEND (abfd, _bfd_find_inliner_info, \
- (abfd, file, func, line))
-
-#define bfd_debug_info_start(abfd) \
- BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
-
-#define bfd_debug_info_end(abfd) \
- BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
-
-#define bfd_debug_info_accumulate(abfd, section) \
- BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
-
-#define bfd_stat_arch_elt(abfd, stat) \
- BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
-
-#define bfd_update_armap_timestamp(abfd) \
- BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
-
-#define bfd_set_arch_mach(abfd, arch, mach)\
- BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
-
-#define bfd_relax_section(abfd, section, link_info, again) \
- BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
-
-#define bfd_gc_sections(abfd, link_info) \
- BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
-
-#define bfd_lookup_section_flags(link_info, flag_info, section) \
- BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info, section))
-
-#define bfd_merge_sections(abfd, link_info) \
- BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
-
-#define bfd_is_group_section(abfd, sec) \
- BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
-
-#define bfd_discard_group(abfd, sec) \
- BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
-
-#define bfd_link_hash_table_create(abfd) \
- BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
-
-#define bfd_link_add_symbols(abfd, info) \
- BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
-
-#define bfd_link_just_syms(abfd, sec, info) \
- BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
-
-#define bfd_final_link(abfd, info) \
- BFD_SEND (abfd, _bfd_final_link, (abfd, info))
-
-#define bfd_free_cached_info(abfd) \
- BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
-
-#define bfd_get_dynamic_symtab_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
-
-#define bfd_print_private_bfd_data(abfd, file)\
- BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
-
-#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
- BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
-
-#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
- BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
- dyncount, dynsyms, ret))
-
-#define bfd_get_dynamic_reloc_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
-
-#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
- BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
-
-extern bfd_byte *bfd_get_relocated_section_contents
- (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
- bfd_boolean, asymbol **);
-
-bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
-
-bfd_vma bfd_emul_get_maxpagesize (const char *);
-
-void bfd_emul_set_maxpagesize (const char *, bfd_vma);
-
-bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean);
-
-void bfd_emul_set_commonpagesize (const char *, bfd_vma);
-
-char *bfd_demangle (bfd *, const char *, int);
-
-void bfd_update_compression_header
- (bfd *abfd, bfd_byte *contents, asection *sec);
-
-bfd_boolean bfd_check_compression_header
- (bfd *abfd, bfd_byte *contents, asection *sec,
- bfd_size_type *uncompressed_size,
- unsigned int *uncompressed_alignment_power);
-
-int bfd_get_compression_header_size (bfd *abfd, asection *sec);
-
-bfd_size_type bfd_convert_section_size
- (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size);
-
-bfd_boolean bfd_convert_section_contents
- (bfd *ibfd, asection *isec, bfd *obfd,
- bfd_byte **ptr, bfd_size_type *ptr_size);
-
-/* Extracted from archive.c. */
-symindex bfd_get_next_mapent
- (bfd *abfd, symindex previous, carsym **sym);
-
-bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
-
-bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
-
-/* Extracted from corefile.c. */
-const char *bfd_core_file_failing_command (bfd *abfd);
-
-int bfd_core_file_failing_signal (bfd *abfd);
-
-int bfd_core_file_pid (bfd *abfd);
-
-bfd_boolean core_file_matches_executable_p
- (bfd *core_bfd, bfd *exec_bfd);
-
-bfd_boolean generic_core_file_matches_executable_p
- (bfd *core_bfd, bfd *exec_bfd);
-
-/* Extracted from targets.c. */
-#define BFD_SEND(bfd, message, arglist) \
- ((*((bfd)->xvec->message)) arglist)
-
-#ifdef DEBUG_BFD_SEND
-#undef BFD_SEND
-#define BFD_SEND(bfd, message, arglist) \
- (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
- ((*((bfd)->xvec->message)) arglist) : \
- (bfd_assert (__FILE__,__LINE__), NULL))
-#endif
-#define BFD_SEND_FMT(bfd, message, arglist) \
- (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
-
-#ifdef DEBUG_BFD_SEND
-#undef BFD_SEND_FMT
-#define BFD_SEND_FMT(bfd, message, arglist) \
- (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
- (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
- (bfd_assert (__FILE__,__LINE__), NULL))
-#endif
-
-enum bfd_flavour
-{
- /* N.B. Update bfd_flavour_name if you change this. */
- bfd_target_unknown_flavour,
- bfd_target_aout_flavour,
- bfd_target_coff_flavour,
- bfd_target_ecoff_flavour,
- bfd_target_xcoff_flavour,
- bfd_target_elf_flavour,
- bfd_target_tekhex_flavour,
- bfd_target_srec_flavour,
- bfd_target_verilog_flavour,
- bfd_target_ihex_flavour,
- bfd_target_som_flavour,
- bfd_target_os9k_flavour,
- bfd_target_versados_flavour,
- bfd_target_msdos_flavour,
- bfd_target_ovax_flavour,
- bfd_target_evax_flavour,
- bfd_target_mmo_flavour,
- bfd_target_mach_o_flavour,
- bfd_target_pef_flavour,
- bfd_target_pef_xlib_flavour,
- bfd_target_sym_flavour
-};
-
-enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
-
-/* Forward declaration. */
-typedef struct bfd_link_info _bfd_link_info;
-
-/* Forward declaration. */
-typedef struct flag_info flag_info;
-
-typedef struct bfd_target
-{
- /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */
- char *name;
-
- /* The "flavour" of a back end is a general indication about
- the contents of a file. */
- enum bfd_flavour flavour;
-
- /* The order of bytes within the data area of a file. */
- enum bfd_endian byteorder;
-
- /* The order of bytes within the header parts of a file. */
- enum bfd_endian header_byteorder;
-
- /* A mask of all the flags which an executable may have set -
- from the set <>, <>, ...<>. */
- flagword object_flags;
-
- /* A mask of all the flags which a section may have set - from
- the set <>, <>, ...<>. */
- flagword section_flags;
-
- /* The character normally found at the front of a symbol.
- (if any), perhaps `_'. */
- char symbol_leading_char;
-
- /* The pad character for file names within an archive header. */
- char ar_pad_char;
-
- /* The maximum number of characters in an archive header. */
- unsigned char ar_max_namelen;
-
- /* How well this target matches, used to select between various
- possible targets when more than one target matches. */
- unsigned char match_priority;
-
- /* Entries for byte swapping for data. These are different from the
- other entry points, since they don't take a BFD as the first argument.
- Certain other handlers could do the same. */
- bfd_uint64_t (*bfd_getx64) (const void *);
- bfd_int64_t (*bfd_getx_signed_64) (const void *);
- void (*bfd_putx64) (bfd_uint64_t, void *);
- bfd_vma (*bfd_getx32) (const void *);
- bfd_signed_vma (*bfd_getx_signed_32) (const void *);
- void (*bfd_putx32) (bfd_vma, void *);
- bfd_vma (*bfd_getx16) (const void *);
- bfd_signed_vma (*bfd_getx_signed_16) (const void *);
- void (*bfd_putx16) (bfd_vma, void *);
-
- /* Byte swapping for the headers. */
- bfd_uint64_t (*bfd_h_getx64) (const void *);
- bfd_int64_t (*bfd_h_getx_signed_64) (const void *);
- void (*bfd_h_putx64) (bfd_uint64_t, void *);
- bfd_vma (*bfd_h_getx32) (const void *);
- bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
- void (*bfd_h_putx32) (bfd_vma, void *);
- bfd_vma (*bfd_h_getx16) (const void *);
- bfd_signed_vma (*bfd_h_getx_signed_16) (const void *);
- void (*bfd_h_putx16) (bfd_vma, void *);
-
- /* Format dependent routines: these are vectors of entry points
- within the target vector structure, one for each format to check. */
-
- /* Check the format of a file being read. Return a <> or zero. */
- const struct bfd_target *
- (*_bfd_check_format[bfd_type_end]) (bfd *);
-
- /* Set the format of a file being written. */
- bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
-
- /* Write cached information into a file being written, at <>. */
- bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
-
-
- /* Generic entry points. */
-#define BFD_JUMP_TABLE_GENERIC(NAME) \
- NAME##_close_and_cleanup, \
- NAME##_bfd_free_cached_info, \
- NAME##_new_section_hook, \
- NAME##_get_section_contents, \
- NAME##_get_section_contents_in_window
-
- /* Called when the BFD is being closed to do any necessary cleanup. */
- bfd_boolean (*_close_and_cleanup) (bfd *);
- /* Ask the BFD to free all cached information. */
- bfd_boolean (*_bfd_free_cached_info) (bfd *);
- /* Called when a new section is created. */
- bfd_boolean (*_new_section_hook) (bfd *, sec_ptr);
- /* Read the contents of a section. */
- bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr,
- bfd_size_type);
- bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr,
- bfd_window *, file_ptr,
- bfd_size_type);
-
- /* Entry points to copy private data. */
-#define BFD_JUMP_TABLE_COPY(NAME) \
- NAME##_bfd_copy_private_bfd_data, \
- NAME##_bfd_merge_private_bfd_data, \
- _bfd_generic_init_private_section_data, \
- NAME##_bfd_copy_private_section_data, \
- NAME##_bfd_copy_private_symbol_data, \
- NAME##_bfd_copy_private_header_data, \
- NAME##_bfd_set_private_flags, \
- NAME##_bfd_print_private_bfd_data
-
- /* Called to copy BFD general private data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
- /* Called to merge BFD general private data from one object file
- to a common output file when linking. */
- bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *);
- /* Called to initialize BFD private section data from one object file
- to another. */
-#define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
- BFD_SEND (obfd, _bfd_init_private_section_data, \
- (ibfd, isec, obfd, osec, link_info))
- bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *,
- sec_ptr,
- struct bfd_link_info *);
- /* Called to copy BFD private section data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *,
- sec_ptr);
- /* Called to copy BFD private symbol data from one symbol
- to another. */
- bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *,
- asymbol *);
- /* Called to copy BFD private header data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *);
- /* Called to set private backend flags. */
- bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
-
- /* Called to print private BFD data. */
- bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *);
-
- /* Core file entry points. */
-#define BFD_JUMP_TABLE_CORE(NAME) \
- NAME##_core_file_failing_command, \
- NAME##_core_file_failing_signal, \
- NAME##_core_file_matches_executable_p, \
- NAME##_core_file_pid
-
- char * (*_core_file_failing_command) (bfd *);
- int (*_core_file_failing_signal) (bfd *);
- bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *);
- int (*_core_file_pid) (bfd *);
-
- /* Archive entry points. */
-#define BFD_JUMP_TABLE_ARCHIVE(NAME) \
- NAME##_slurp_armap, \
- NAME##_slurp_extended_name_table, \
- NAME##_construct_extended_name_table, \
- NAME##_truncate_arname, \
- NAME##_write_armap, \
- NAME##_read_ar_hdr, \
- NAME##_write_ar_hdr, \
- NAME##_openr_next_archived_file, \
- NAME##_get_elt_at_index, \
- NAME##_generic_stat_arch_elt, \
- NAME##_update_armap_timestamp
-
- bfd_boolean (*_bfd_slurp_armap) (bfd *);
- bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *);
- bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **,
- bfd_size_type *,
- const char **);
- void (*_bfd_truncate_arname) (bfd *, const char *, char *);
- bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *,
- unsigned int, int);
- void * (*_bfd_read_ar_hdr_fn) (bfd *);
- bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *);
- bfd * (*openr_next_archived_file) (bfd *, bfd *);
-#define bfd_get_elt_at_index(b,i) \
- BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
- bfd * (*_bfd_get_elt_at_index) (bfd *, symindex);
- int (*_bfd_stat_arch_elt) (bfd *, struct stat *);
- bfd_boolean (*_bfd_update_armap_timestamp) (bfd *);
-
- /* Entry points used for symbols. */
-#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
- NAME##_get_symtab_upper_bound, \
- NAME##_canonicalize_symtab, \
- NAME##_make_empty_symbol, \
- NAME##_print_symbol, \
- NAME##_get_symbol_info, \
- NAME##_get_symbol_version_string, \
- NAME##_bfd_is_local_label_name, \
- NAME##_bfd_is_target_special_symbol, \
- NAME##_get_lineno, \
- NAME##_find_nearest_line, \
- NAME##_find_line, \
- NAME##_find_inliner_info, \
- NAME##_bfd_make_debug_symbol, \
- NAME##_read_minisymbols, \
- NAME##_minisymbol_to_symbol
-
- long (*_bfd_get_symtab_upper_bound) (bfd *);
- long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **);
- struct bfd_symbol *
- (*_bfd_make_empty_symbol) (bfd *);
- void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *,
- bfd_print_symbol_type);
-#define bfd_print_symbol(b,p,s,e) \
- BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
- void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *,
- symbol_info *);
-#define bfd_get_symbol_info(b,p,e) \
- BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
- const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *,
- bfd_boolean *);
-#define bfd_get_symbol_version_string(b,s,h) \
- BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h))
- bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
- bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
- alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
- bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **,
- struct bfd_section *, bfd_vma,
- const char **, const char **,
- unsigned int *, unsigned int *);
- bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **,
- struct bfd_symbol *, const char **,
- unsigned int *);
- bfd_boolean (*_bfd_find_inliner_info)
- (bfd *, const char **, const char **, unsigned int *);
- /* Back-door to allow format-aware applications to create debug symbols
- while using BFD for everything else. Currently used by the assembler
- when creating COFF files. */
- asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size);
-#define bfd_read_minisymbols(b, d, m, s) \
- BFD_SEND (b, _read_minisymbols, (b, d, m, s))
- long (*_read_minisymbols) (bfd *, bfd_boolean, void **,
- unsigned int *);
-#define bfd_minisymbol_to_symbol(b, d, m, f) \
- BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
- asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *,
- asymbol *);
-
- /* Routines for relocs. */
-#define BFD_JUMP_TABLE_RELOCS(NAME) \
- NAME##_get_reloc_upper_bound, \
- NAME##_canonicalize_reloc, \
- NAME##_set_reloc, \
- NAME##_bfd_reloc_type_lookup, \
- NAME##_bfd_reloc_name_lookup
-
- long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
- long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **,
- struct bfd_symbol **);
- void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int);
- /* See documentation on reloc types. */
- reloc_howto_type *
- (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
- reloc_howto_type *
- (*reloc_name_lookup) (bfd *, const char *);
-
- /* Routines used when writing an object file. */
-#define BFD_JUMP_TABLE_WRITE(NAME) \
- NAME##_set_arch_mach, \
- NAME##_set_section_contents
-
- bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture,
- unsigned long);
- bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *,
- file_ptr, bfd_size_type);
-
- /* Routines used by the linker. */
-#define BFD_JUMP_TABLE_LINK(NAME) \
- NAME##_sizeof_headers, \
- NAME##_bfd_get_relocated_section_contents, \
- NAME##_bfd_relax_section, \
- NAME##_bfd_link_hash_table_create, \
- NAME##_bfd_link_add_symbols, \
- NAME##_bfd_link_just_syms, \
- NAME##_bfd_copy_link_hash_symbol_type, \
- NAME##_bfd_final_link, \
- NAME##_bfd_link_split_section, \
- NAME##_bfd_link_check_relocs, \
- NAME##_bfd_gc_sections, \
- NAME##_bfd_lookup_section_flags, \
- NAME##_bfd_merge_sections, \
- NAME##_bfd_is_group_section, \
- NAME##_bfd_discard_group, \
- NAME##_section_already_linked, \
- NAME##_bfd_define_common_symbol, \
- NAME##_bfd_link_hide_symbol, \
- NAME##_bfd_define_start_stop
-
- int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
- bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *,
- struct bfd_link_info *,
- struct bfd_link_order *,
- bfd_byte *, bfd_boolean,
- struct bfd_symbol **);
-
- bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *,
- struct bfd_link_info *, bfd_boolean *);
-
- /* Create a hash table for the linker. Different backends store
- different information in this table. */
- struct bfd_link_hash_table *
- (*_bfd_link_hash_table_create) (bfd *);
-
- /* Add symbols from this object file into the hash table. */
- bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
-
- /* Indicate that we are only retrieving symbol values from this section. */
- void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
-
- /* Copy the symbol type and other attributes for a linker script
- assignment of one symbol to another. */
-#define bfd_copy_link_hash_symbol_type(b, t, f) \
- BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f))
- void (*_bfd_copy_link_hash_symbol_type) (bfd *,
- struct bfd_link_hash_entry *,
- struct bfd_link_hash_entry *);
-
- /* Do a link based on the link_order structures attached to each
- section of the BFD. */
- bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
-
- /* Should this section be split up into smaller pieces during linking. */
- bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
-
- /* Check the relocations in the bfd for validity. */
- bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *);
-
- /* Remove sections that are not referenced from the output. */
- bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
-
- /* Sets the bitmask of allowed and disallowed section flags. */
- bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *,
- struct flag_info *, asection *);
-
- /* Attempt to merge SEC_MERGE sections. */
- bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
-
- /* Is this section a member of a group? */
- bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
-
- /* Discard members of a group. */
- bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
-
- /* Check if SEC has been already linked during a reloceatable or
- final link. */
- bfd_boolean (*_section_already_linked) (bfd *, asection *,
- struct bfd_link_info *);
-
- /* Define a common symbol. */
- bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *,
- struct bfd_link_hash_entry *);
-
- /* Hide a symbol. */
- void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *,
- struct bfd_link_hash_entry *);
-
- /* Define a __start, __stop, .startof. or .sizeof. symbol. */
- struct bfd_link_hash_entry *
- (*_bfd_define_start_stop) (struct bfd_link_info *, const char *,
- asection *);
-
- /* Routines to handle dynamic symbols and relocs. */
-#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
- NAME##_get_dynamic_symtab_upper_bound, \
- NAME##_canonicalize_dynamic_symtab, \
- NAME##_get_synthetic_symtab, \
- NAME##_get_dynamic_reloc_upper_bound, \
- NAME##_canonicalize_dynamic_reloc
-
- /* Get the amount of memory required to hold the dynamic symbols. */
- long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
- /* Read in the dynamic symbols. */
- long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **);
- /* Create synthetized symbols. */
- long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **,
- long, struct bfd_symbol **,
- struct bfd_symbol **);
- /* Get the amount of memory required to hold the dynamic relocs. */
- long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
- /* Read in the dynamic relocs. */
- long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **,
- struct bfd_symbol **);
-
- /* Opposite endian version of this target. */
- const struct bfd_target *alternative_target;
-
- /* Data for use by back-end routines, which isn't
- generic enough to belong in this structure. */
- const void *backend_data;
-
-} bfd_target;
-
-bfd_boolean bfd_set_default_target (const char *name);
-
-const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
-
-const bfd_target *bfd_get_target_info (const char *target_name,
- bfd *abfd,
- bfd_boolean *is_bigendian,
- int *underscoring,
- const char **def_target_arch);
-const char ** bfd_target_list (void);
-
-const bfd_target *bfd_iterate_over_targets
- (int (*func) (const bfd_target *, void *),
- void *data);
-
-const char *bfd_flavour_name (enum bfd_flavour flavour);
-
-/* Extracted from format.c. */
-bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
-
-bfd_boolean bfd_check_format_matches
- (bfd *abfd, bfd_format format, char ***matching);
-
-bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
-
-const char *bfd_format_string (bfd_format format);
-
-/* Extracted from linker.c. */
-/* Return TRUE if the symbol described by a linker hash entry H
- is going to be absolute. Linker-script defined symbols can be
- converted from absolute to section-relative ones late in the
- link. Use this macro to correctly determine whether the symbol
- will actually end up absolute in output. */
-#define bfd_is_abs_symbol(H) \
- (((H)->type == bfd_link_hash_defined \
- || (H)->type == bfd_link_hash_defweak) \
- && bfd_is_abs_section ((H)->u.def.section) \
- && !(H)->rel_from_abs)
-
-bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
-
-#define bfd_link_split_section(abfd, sec) \
- BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
-
-bfd_boolean bfd_section_already_linked (bfd *abfd,
- asection *sec,
- struct bfd_link_info *info);
-
-#define bfd_section_already_linked(abfd, sec, info) \
- BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
-
-bfd_boolean bfd_generic_define_common_symbol
- (bfd *output_bfd, struct bfd_link_info *info,
- struct bfd_link_hash_entry *h);
-
-#define bfd_define_common_symbol(output_bfd, info, h) \
- BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h))
-
-void _bfd_generic_link_hide_symbol
- (bfd *output_bfd, struct bfd_link_info *info,
- struct bfd_link_hash_entry *h);
-
-#define bfd_link_hide_symbol(output_bfd, info, h) \
- BFD_SEND (output_bfd, _bfd_link_hide_symbol, (output_bfd, info, h))
-
-struct bfd_link_hash_entry *bfd_generic_define_start_stop
- (struct bfd_link_info *info,
- const char *symbol, asection *sec);
-
-#define bfd_define_start_stop(output_bfd, info, symbol, sec) \
- BFD_SEND (output_bfd, _bfd_define_start_stop, (info, symbol, sec))
-
-struct bfd_elf_version_tree * bfd_find_version_for_sym
- (struct bfd_elf_version_tree *verdefs,
- const char *sym_name, bfd_boolean *hide);
-
-bfd_boolean bfd_hide_sym_by_version
- (struct bfd_elf_version_tree *verdefs, const char *sym_name);
-
-bfd_boolean bfd_link_check_relocs
- (bfd *abfd, struct bfd_link_info *info);
-
-bfd_boolean _bfd_generic_link_check_relocs
- (bfd *abfd, struct bfd_link_info *info);
-
-bfd_boolean bfd_merge_private_bfd_data
- (bfd *ibfd, struct bfd_link_info *info);
-
-#define bfd_merge_private_bfd_data(ibfd, info) \
- BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \
- (ibfd, info))
-/* Extracted from simple.c. */
-bfd_byte *bfd_simple_get_relocated_section_contents
- (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
-
-/* Extracted from compress.c. */
-bfd_boolean bfd_get_full_section_contents
- (bfd *abfd, asection *section, bfd_byte **ptr);
-
-void bfd_cache_section_contents
- (asection *sec, void *contents);
-
-bfd_boolean bfd_is_section_compressed_with_header
- (bfd *abfd, asection *section,
- int *compression_header_size_p,
- bfd_size_type *uncompressed_size_p,
- unsigned int *uncompressed_alignment_power_p);
-
-bfd_boolean bfd_is_section_compressed
- (bfd *abfd, asection *section);
-
-bfd_boolean bfd_init_section_decompress_status
- (bfd *abfd, asection *section);
-
-bfd_boolean bfd_init_section_compress_status
- (bfd *abfd, asection *section);
-
-bfd_boolean bfd_compress_section
- (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabi/bfd_stdint.h b/lib/libc/include/arm-linux-musleabi/bfd_stdint.h
deleted file mode 100644
index 104977cc261ddbb52bd43cbcf0963db440d8c711..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabi/bfd_stdint.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* generated for arm-linux-musleabi-gcc (GCC) 8.3.0 */
-
-#ifndef GCC_GENERATED_STDINT_H
-#define GCC_GENERATED_STDINT_H 1
-
-#include
-#include
-/* glibc uses these symbols as guards to prevent redefinitions. */
-#ifdef __int8_t_defined
-#define _INT8_T
-#define _INT16_T
-#define _INT32_T
-#endif
-#ifdef __uint32_t_defined
-#define _UINT32_T
-#endif
-
-
-/* Some systems have guard macros to prevent redefinitions, define them. */
-#ifndef _INT8_T
-#define _INT8_T
-#endif
-#ifndef _INT16_T
-#define _INT16_T
-#endif
-#ifndef _INT32_T
-#define _INT32_T
-#endif
-#ifndef _UINT8_T
-#define _UINT8_T
-#endif
-#ifndef _UINT16_T
-#define _UINT16_T
-#endif
-#ifndef _UINT32_T
-#define _UINT32_T
-#endif
-
-/* system headers have good uint64_t and int64_t */
-#ifndef _INT64_T
-#define _INT64_T
-#endif
-#ifndef _UINT64_T
-#define _UINT64_T
-#endif
-
-#endif /* GCC_GENERATED_STDINT_H */
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabi/bits/fcntl.h b/lib/libc/include/arm-linux-musleabi/bits/fcntl.h
deleted file mode 100644
index 2408640910a08a79b5dc06ebb934bff061d6f89f..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabi/bits/fcntl.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#define O_CREAT 0100
-#define O_EXCL 0200
-#define O_NOCTTY 0400
-#define O_TRUNC 01000
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
-#define O_DSYNC 010000
-#define O_SYNC 04010000
-#define O_RSYNC 04010000
-#define O_DIRECTORY 040000
-#define O_NOFOLLOW 0100000
-#define O_CLOEXEC 02000000
-
-#define O_ASYNC 020000
-#define O_DIRECT 0200000
-#define O_LARGEFILE 0400000
-#define O_NOATIME 01000000
-#define O_PATH 010000000
-#define O_TMPFILE 020040000
-#define O_NDELAY O_NONBLOCK
-
-#define F_DUPFD 0
-#define F_GETFD 1
-#define F_SETFD 2
-#define F_GETFL 3
-#define F_SETFL 4
-
-#define F_SETOWN 8
-#define F_GETOWN 9
-#define F_SETSIG 10
-#define F_GETSIG 11
-
-#define F_GETLK 12
-#define F_SETLK 13
-#define F_SETLKW 14
-
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-
-#define F_GETOWNER_UIDS 17
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabi/bits/hwcap.h b/lib/libc/include/arm-linux-musleabi/bits/hwcap.h
deleted file mode 100644
index c1c1fb1683d7710287af82ec59c42e27149eebf0..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabi/bits/hwcap.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#define HWCAP_SWP (1 << 0)
-#define HWCAP_HALF (1 << 1)
-#define HWCAP_THUMB (1 << 2)
-#define HWCAP_26BIT (1 << 3)
-#define HWCAP_FAST_MULT (1 << 4)
-#define HWCAP_FPA (1 << 5)
-#define HWCAP_VFP (1 << 6)
-#define HWCAP_EDSP (1 << 7)
-#define HWCAP_JAVA (1 << 8)
-#define HWCAP_IWMMXT (1 << 9)
-#define HWCAP_CRUNCH (1 << 10)
-#define HWCAP_THUMBEE (1 << 11)
-#define HWCAP_NEON (1 << 12)
-#define HWCAP_VFPv3 (1 << 13)
-#define HWCAP_VFPv3D16 (1 << 14)
-#define HWCAP_TLS (1 << 15)
-#define HWCAP_VFPv4 (1 << 16)
-#define HWCAP_IDIVA (1 << 17)
-#define HWCAP_IDIVT (1 << 18)
-#define HWCAP_VFPD32 (1 << 19)
-#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)
-#define HWCAP_LPAE (1 << 20)
-#define HWCAP_EVTSTRM (1 << 21)
-
-#define HWCAP2_AES (1 << 0)
-#define HWCAP2_PMULL (1 << 1)
-#define HWCAP2_SHA1 (1 << 2)
-#define HWCAP2_SHA2 (1 << 3)
-#define HWCAP2_CRC32 (1 << 4)
-
-#define HWCAP_ARM_SWP (1 << 0)
-#define HWCAP_ARM_HALF (1 << 1)
-#define HWCAP_ARM_THUMB (1 << 2)
-#define HWCAP_ARM_26BIT (1 << 3)
-#define HWCAP_ARM_FAST_MULT (1 << 4)
-#define HWCAP_ARM_FPA (1 << 5)
-#define HWCAP_ARM_VFP (1 << 6)
-#define HWCAP_ARM_EDSP (1 << 7)
-#define HWCAP_ARM_JAVA (1 << 8)
-#define HWCAP_ARM_IWMMXT (1 << 9)
-#define HWCAP_ARM_CRUNCH (1 << 10)
-#define HWCAP_ARM_THUMBEE (1 << 11)
-#define HWCAP_ARM_NEON (1 << 12)
-#define HWCAP_ARM_VFPv3 (1 << 13)
-#define HWCAP_ARM_VFPv3D16 (1 << 14)
-#define HWCAP_ARM_TLS (1 << 15)
-#define HWCAP_ARM_VFPv4 (1 << 16)
-#define HWCAP_ARM_IDIVA (1 << 17)
-#define HWCAP_ARM_IDIVT (1 << 18)
-#define HWCAP_ARM_VFPD32 (1 << 19)
-#define HWCAP_ARM_IDIV (HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT)
-#define HWCAP_ARM_LPAE (1 << 20)
-#define HWCAP_ARM_EVTSTRM (1 << 21)
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabi/bits/ioctl_fix.h b/lib/libc/include/arm-linux-musleabi/bits/ioctl_fix.h
deleted file mode 100644
index 9c177f7679e4ddf3a89e03a984cc3cd45476d773..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabi/bits/ioctl_fix.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#undef FIOQSIZE
-#define FIOQSIZE 0x545e
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabi/bits/msg.h b/lib/libc/include/arm-linux-musleabi/bits/msg.h
deleted file mode 100644
index e5c8ba75208c2ed80da66995f1afe78fdab39893..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabi/bits/msg.h
+++ /dev/null
@@ -1,15 +0,0 @@
-struct msqid_ds {
- struct ipc_perm msg_perm;
- time_t msg_stime;
- int __unused1;
- time_t msg_rtime;
- int __unused2;
- time_t msg_ctime;
- int __unused3;
- unsigned long msg_cbytes;
- msgqnum_t msg_qnum;
- msglen_t msg_qbytes;
- pid_t msg_lspid;
- pid_t msg_lrpid;
- unsigned long __unused[2];
-};
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabi/bits/ptrace.h b/lib/libc/include/arm-linux-musleabi/bits/ptrace.h
deleted file mode 100644
index cd96d836f1fdae143f8b0faa5ea72695152b995f..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabi/bits/ptrace.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#define PTRACE_GETWMMXREGS 18
-#define PTRACE_SETWMMXREGS 19
-#define PTRACE_GET_THREAD_AREA 22
-#define PTRACE_SET_SYSCALL 23
-#define PTRACE_GETCRUNCHREGS 25
-#define PTRACE_SETCRUNCHREGS 26
-#define PTRACE_GETVFPREGS 27
-#define PTRACE_SETVFPREGS 28
-#define PTRACE_GETHBPREGS 29
-#define PTRACE_SETHBPREGS 30
-#define PTRACE_GETFDPIC 31
-#define PTRACE_GETFDPIC_EXEC 0
-#define PTRACE_GETFDPIC_INTERP 1
-
-#define PT_GETWMMXREGS PTRACE_GETWMMXREGS
-#define PT_SETWMMXREGS PTRACE_SETWMMXREGS
-#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
-#define PT_SET_SYSCALL PTRACE_SET_SYSCALL
-#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS
-#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS
-#define PT_GETVFPREGS PTRACE_GETVFPREGS
-#define PT_SETVFPREGS PTRACE_SETVFPREGS
-#define PT_GETHBPREGS PTRACE_GETHBPREGS
-#define PT_SETHBPREGS PTRACE_SETHBPREGS
-#define PT_GETFDPIC PTRACE_GETFDPIC
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabi/bits/shm.h b/lib/libc/include/arm-linux-musleabi/bits/shm.h
deleted file mode 100644
index aa5587127ab24a71b87e7bef5946234c46a9c916..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabi/bits/shm.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#define SHMLBA 4096
-
-struct shmid_ds {
- struct ipc_perm shm_perm;
- size_t shm_segsz;
- time_t shm_atime;
- int __unused1;
- time_t shm_dtime;
- int __unused2;
- time_t shm_ctime;
- int __unused3;
- pid_t shm_cpid;
- pid_t shm_lpid;
- unsigned long shm_nattch;
- unsigned long __pad1;
- unsigned long __pad2;
-};
-
-struct shminfo {
- unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-};
-
-struct shm_info {
- int __used_ids;
- unsigned long shm_tot, shm_rss, shm_swp;
- unsigned long __swap_attempts, __swap_successes;
-};
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabi/bits/stdint.h b/lib/libc/include/arm-linux-musleabi/bits/stdint.h
deleted file mode 100644
index b70a87dc9d5868de097ab14ec47980f3980e9e65..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabi/bits/stdint.h
+++ /dev/null
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN INT32_MIN
-#define INT_FAST32_MIN INT32_MIN
-
-#define INT_FAST16_MAX INT32_MAX
-#define INT_FAST32_MAX INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-
-#define INTPTR_MIN INT32_MIN
-#define INTPTR_MAX INT32_MAX
-#define UINTPTR_MAX UINT32_MAX
-#define PTRDIFF_MIN INT32_MIN
-#define PTRDIFF_MAX INT32_MAX
-#define SIZE_MAX UINT32_MAX
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabihf/bfd.h b/lib/libc/include/arm-linux-musleabihf/bfd.h
deleted file mode 100644
index 73d2dccfe27dcdd2c636e967e661b2ff7a035116..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabihf/bfd.h
+++ /dev/null
@@ -1,8034 +0,0 @@
-/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
- generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
- "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
- "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
- "linker.c", "simple.c" and "compress.c".
- Run "make headers" in your build bfd/ to regenerate. */
-
-/* Main header file for the bfd library -- portable access to object files.
-
- Copyright (C) 1990-2019 Free Software Foundation, Inc.
-
- Contributed by Cygnus Support.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef __BFD_H_SEEN__
-#define __BFD_H_SEEN__
-
-/* PR 14072: Ensure that config.h is included first. */
-#if !defined PACKAGE && !defined PACKAGE_VERSION
-#error config.h must be included before this header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ansidecl.h"
-#include "symcat.h"
-#include "bfd_stdint.h"
-#include "diagnostics.h"
-#include
-#include
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#ifndef SABER
-/* This hack is to avoid a problem with some strict ANSI C preprocessors.
- The problem is, "32_" is not a valid preprocessing token, and we don't
- want extra underscores (e.g., "nlm_32_"). The XCONCAT2 macro will
- cause the inner CONCAT2 macros to be evaluated first, producing
- still-valid pp-tokens. Then the final concatenation can be done. */
-#undef CONCAT4
-#define CONCAT4(a,b,c,d) XCONCAT2(CONCAT2(a,b),CONCAT2(c,d))
-#endif
-#endif
-
-/* This is a utility macro to handle the situation where the code
- wants to place a constant string into the code, followed by a
- comma and then the length of the string. Doing this by hand
- is error prone, so using this macro is safer. */
-#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
-/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
- to create the arguments to another macro, since the preprocessor
- will mis-count the number of arguments to the outer macro (by not
- evaluating STRING_COMMA_LEN and so missing the comma). This is a
- problem for example when trying to use STRING_COMMA_LEN to build
- the arguments to the strncmp() macro. Hence this alternative
- definition of strncmp is provided here.
-
- Note - these macros do NOT work if STR2 is not a constant string. */
-#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
- /* strcpy() can have a similar problem, but since we know we are
- copying a constant string, we can use memcpy which will be faster
- since there is no need to check for a NUL byte inside STR. We
- can also save time if we do not need to copy the terminating NUL. */
-#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
-#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
-
-
-#define BFD_SUPPORTS_PLUGINS 1
-
-/* The word size used by BFD on the host. This may be 64 with a 32
- bit target if the host is 64 bit, or if other 64 bit targets have
- been selected with --enable-targets, or if --enable-64-bit-bfd. */
-#define BFD_ARCH_SIZE 32
-
-/* The word size of the default bfd target. */
-#define BFD_DEFAULT_TARGET_SIZE 32
-
-#define BFD_HOST_64BIT_LONG 0
-#define BFD_HOST_64BIT_LONG_LONG 1
-#if 1
-#define BFD_HOST_64_BIT long long
-#define BFD_HOST_U_64_BIT unsigned long long
-typedef BFD_HOST_64_BIT bfd_int64_t;
-typedef BFD_HOST_U_64_BIT bfd_uint64_t;
-#endif
-
-#ifdef HAVE_INTTYPES_H
-# include
-#else
-# if BFD_HOST_64BIT_LONG
-# define BFD_PRI64 "l"
-# elif defined (__MSVCRT__)
-# define BFD_PRI64 "I64"
-# else
-# define BFD_PRI64 "ll"
-# endif
-# undef PRId64
-# define PRId64 BFD_PRI64 "d"
-# undef PRIu64
-# define PRIu64 BFD_PRI64 "u"
-# undef PRIx64
-# define PRIx64 BFD_PRI64 "x"
-#endif
-
-#if BFD_ARCH_SIZE >= 64
-#define BFD64
-#endif
-
-#ifndef INLINE
-#if __GNUC__ >= 2
-#define INLINE __inline__
-#else
-#define INLINE
-#endif
-#endif
-
-/* Declaring a type wide enough to hold a host long and a host pointer. */
-#define BFD_HOSTPTR_T unsigned long
-typedef BFD_HOSTPTR_T bfd_hostptr_t;
-
-/* Forward declaration. */
-typedef struct bfd bfd;
-
-/* Boolean type used in bfd. Too many systems define their own
- versions of "boolean" for us to safely typedef a "boolean" of
- our own. Using an enum for "bfd_boolean" has its own set of
- problems, with strange looking casts required to avoid warnings
- on some older compilers. Thus we just use an int.
-
- General rule: Functions which are bfd_boolean return TRUE on
- success and FALSE on failure (unless they're a predicate). */
-
-typedef int bfd_boolean;
-#undef FALSE
-#undef TRUE
-#define FALSE 0
-#define TRUE 1
-
-#ifdef BFD64
-
-#ifndef BFD_HOST_64_BIT
- #error No 64 bit integer type available
-#endif /* ! defined (BFD_HOST_64_BIT) */
-
-typedef BFD_HOST_U_64_BIT bfd_vma;
-typedef BFD_HOST_64_BIT bfd_signed_vma;
-typedef BFD_HOST_U_64_BIT bfd_size_type;
-typedef BFD_HOST_U_64_BIT symvalue;
-
-#if BFD_HOST_64BIT_LONG
-#define BFD_VMA_FMT "l"
-#elif defined (__MSVCRT__)
-#define BFD_VMA_FMT "I64"
-#else
-#define BFD_VMA_FMT "ll"
-#endif
-
-#ifndef fprintf_vma
-#define sprintf_vma(s,x) sprintf (s, "%016" BFD_VMA_FMT "x", x)
-#define fprintf_vma(f,x) fprintf (f, "%016" BFD_VMA_FMT "x", x)
-#endif
-
-#else /* not BFD64 */
-
-/* Represent a target address. Also used as a generic unsigned type
- which is guaranteed to be big enough to hold any arithmetic types
- we need to deal with. */
-typedef unsigned long bfd_vma;
-
-/* A generic signed type which is guaranteed to be big enough to hold any
- arithmetic types we need to deal with. Can be assumed to be compatible
- with bfd_vma in the same way that signed and unsigned ints are compatible
- (as parameters, in assignment, etc). */
-typedef long bfd_signed_vma;
-
-typedef unsigned long symvalue;
-typedef unsigned long bfd_size_type;
-
-/* Print a bfd_vma x on stream s. */
-#define BFD_VMA_FMT "l"
-#define fprintf_vma(s,x) fprintf (s, "%08" BFD_VMA_FMT "x", x)
-#define sprintf_vma(s,x) sprintf (s, "%08" BFD_VMA_FMT "x", x)
-
-#endif /* not BFD64 */
-
-#define HALF_BFD_SIZE_TYPE \
- (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2))
-
-#ifndef BFD_HOST_64_BIT
-/* Fall back on a 32 bit type. The idea is to make these types always
- available for function return types, but in the case that
- BFD_HOST_64_BIT is undefined such a function should abort or
- otherwise signal an error. */
-typedef bfd_signed_vma bfd_int64_t;
-typedef bfd_vma bfd_uint64_t;
-#endif
-
-/* An offset into a file. BFD always uses the largest possible offset
- based on the build time availability of fseek, fseeko, or fseeko64. */
-typedef BFD_HOST_64_BIT file_ptr;
-typedef unsigned BFD_HOST_64_BIT ufile_ptr;
-
-extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
-extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
-
-#define printf_vma(x) fprintf_vma(stdout,x)
-#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
-
-typedef unsigned int flagword; /* 32 bits of flags */
-typedef unsigned char bfd_byte;
-
-/* File formats. */
-
-typedef enum bfd_format
-{
- bfd_unknown = 0, /* File format is unknown. */
- bfd_object, /* Linker/assembler/compiler output. */
- bfd_archive, /* Object archive file. */
- bfd_core, /* Core dump. */
- bfd_type_end /* Marks the end; don't use it! */
-}
-bfd_format;
-
-/* Symbols and relocation. */
-
-/* A count of carsyms (canonical archive symbols). */
-typedef unsigned long symindex;
-
-#define BFD_NO_MORE_SYMBOLS ((symindex) ~0)
-
-/* General purpose part of a symbol X;
- target specific parts are in libcoff.h, libaout.h, etc. */
-
-#define bfd_get_section(x) ((x)->section)
-#define bfd_get_output_section(x) ((x)->section->output_section)
-#define bfd_set_section(x,y) ((x)->section) = (y)
-#define bfd_asymbol_base(x) ((x)->section->vma)
-#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value)
-#define bfd_asymbol_name(x) ((x)->name)
-/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/
-#define bfd_asymbol_bfd(x) ((x)->the_bfd)
-#define bfd_asymbol_flavour(x) \
- (((x)->flags & BSF_SYNTHETIC) != 0 \
- ? bfd_target_unknown_flavour \
- : bfd_asymbol_bfd (x)->xvec->flavour)
-
-/* A canonical archive symbol. */
-/* This is a type pun with struct ranlib on purpose! */
-typedef struct carsym
-{
- char *name;
- file_ptr file_offset; /* Look here to find the file. */
-}
-carsym; /* To make these you call a carsymogen. */
-
-/* Used in generating armaps (archive tables of contents).
- Perhaps just a forward definition would do? */
-struct orl /* Output ranlib. */
-{
- char **name; /* Symbol name. */
- union
- {
- file_ptr pos;
- bfd *abfd;
- } u; /* bfd* or file position. */
- int namidx; /* Index into string table. */
-};
-
-/* Linenumber stuff. */
-typedef struct lineno_cache_entry
-{
- unsigned int line_number; /* Linenumber from start of function. */
- union
- {
- struct bfd_symbol *sym; /* Function name. */
- bfd_vma offset; /* Offset into section. */
- } u;
-}
-alent;
-
-/* Object and core file sections. */
-typedef struct bfd_section *sec_ptr;
-
-#define align_power(addr, align) \
- (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align))))
-
-/* Align an address upward to a boundary, expressed as a number of bytes.
- E.g. align to an 8-byte boundary with argument of 8. Take care never
- to wrap around if the address is within boundary-1 of the end of the
- address space. */
-#define BFD_ALIGN(this, boundary) \
- ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
- ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \
- : ~ (bfd_vma) 0)
-
-#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name)
-#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma)
-#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma)
-#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \
- (ptr)->alignment_power)
-#define bfd_section_name(bfd, ptr) ((ptr)->name)
-#define bfd_section_size(bfd, ptr) ((ptr)->size)
-#define bfd_get_section_size(ptr) ((ptr)->size)
-#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
-#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
-#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
-#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags)
-#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata)
-
-#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
-
-#define bfd_get_section_limit_octets(bfd, sec) \
- ((bfd)->direction != write_direction && (sec)->rawsize != 0 \
- ? (sec)->rawsize : (sec)->size)
-
-/* Find the address one past the end of SEC. */
-#define bfd_get_section_limit(bfd, sec) \
- (bfd_get_section_limit_octets(bfd, sec) / bfd_octets_per_byte (bfd))
-
-/* Return TRUE if input section SEC has been discarded. */
-#define discarded_section(sec) \
- (!bfd_is_abs_section (sec) \
- && bfd_is_abs_section ((sec)->output_section) \
- && (sec)->sec_info_type != SEC_INFO_TYPE_MERGE \
- && (sec)->sec_info_type != SEC_INFO_TYPE_JUST_SYMS)
-
-typedef enum bfd_print_symbol
-{
- bfd_print_symbol_name,
- bfd_print_symbol_more,
- bfd_print_symbol_all
-} bfd_print_symbol_type;
-
-/* Information about a symbol that nm needs. */
-
-typedef struct _symbol_info
-{
- symvalue value;
- char type;
- const char *name; /* Symbol name. */
- unsigned char stab_type; /* Stab type. */
- char stab_other; /* Stab other. */
- short stab_desc; /* Stab desc. */
- const char *stab_name; /* String for stab type. */
-} symbol_info;
-
-/* Get the name of a stabs type code. */
-
-extern const char *bfd_get_stab_name (int);
-
-/* Hash table routines. There is no way to free up a hash table. */
-
-/* An element in the hash table. Most uses will actually use a larger
- structure, and an instance of this will be the first field. */
-
-struct bfd_hash_entry
-{
- /* Next entry for this hash code. */
- struct bfd_hash_entry *next;
- /* String being hashed. */
- const char *string;
- /* Hash code. This is the full hash code, not the index into the
- table. */
- unsigned long hash;
-};
-
-/* A hash table. */
-
-struct bfd_hash_table
-{
- /* The hash array. */
- struct bfd_hash_entry **table;
- /* A function used to create new elements in the hash table. The
- first entry is itself a pointer to an element. When this
- function is first invoked, this pointer will be NULL. However,
- having the pointer permits a hierarchy of method functions to be
- built each of which calls the function in the superclass. Thus
- each function should be written to allocate a new block of memory
- only if the argument is NULL. */
- struct bfd_hash_entry *(*newfunc)
- (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
- /* An objalloc for this hash table. This is a struct objalloc *,
- but we use void * to avoid requiring the inclusion of objalloc.h. */
- void *memory;
- /* The number of slots in the hash table. */
- unsigned int size;
- /* The number of entries in the hash table. */
- unsigned int count;
- /* The size of elements. */
- unsigned int entsize;
- /* If non-zero, don't grow the hash table. */
- unsigned int frozen:1;
-};
-
-/* Initialize a hash table. */
-extern bfd_boolean bfd_hash_table_init
- (struct bfd_hash_table *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *),
- unsigned int);
-
-/* Initialize a hash table specifying a size. */
-extern bfd_boolean bfd_hash_table_init_n
- (struct bfd_hash_table *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *),
- unsigned int, unsigned int);
-
-/* Free up a hash table. */
-extern void bfd_hash_table_free
- (struct bfd_hash_table *);
-
-/* Look up a string in a hash table. If CREATE is TRUE, a new entry
- will be created for this string if one does not already exist. The
- COPY argument must be TRUE if this routine should copy the string
- into newly allocated memory when adding an entry. */
-extern struct bfd_hash_entry *bfd_hash_lookup
- (struct bfd_hash_table *, const char *, bfd_boolean create,
- bfd_boolean copy);
-
-/* Insert an entry in a hash table. */
-extern struct bfd_hash_entry *bfd_hash_insert
- (struct bfd_hash_table *, const char *, unsigned long);
-
-/* Rename an entry in a hash table. */
-extern void bfd_hash_rename
- (struct bfd_hash_table *, const char *, struct bfd_hash_entry *);
-
-/* Replace an entry in a hash table. */
-extern void bfd_hash_replace
- (struct bfd_hash_table *, struct bfd_hash_entry *old,
- struct bfd_hash_entry *nw);
-
-/* Base method for creating a hash table entry. */
-extern struct bfd_hash_entry *bfd_hash_newfunc
- (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
-
-/* Grab some space for a hash table entry. */
-extern void *bfd_hash_allocate
- (struct bfd_hash_table *, unsigned int);
-
-/* Traverse a hash table in a random order, calling a function on each
- element. If the function returns FALSE, the traversal stops. The
- INFO argument is passed to the function. */
-extern void bfd_hash_traverse
- (struct bfd_hash_table *,
- bfd_boolean (*) (struct bfd_hash_entry *, void *),
- void *info);
-
-/* Allows the default size of a hash table to be configured. New hash
- tables allocated using bfd_hash_table_init will be created with
- this size. */
-extern unsigned long bfd_hash_set_default_size (unsigned long);
-
-/* Types of compressed DWARF debug sections. We currently support
- zlib. */
-enum compressed_debug_section_type
-{
- COMPRESS_DEBUG_NONE = 0,
- COMPRESS_DEBUG = 1 << 0,
- COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1,
- COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2
-};
-
-/* This structure is used to keep track of stabs in sections
- information while linking. */
-
-struct stab_info
-{
- /* A hash table used to hold stabs strings. */
- struct bfd_strtab_hash *strings;
- /* The header file hash table. */
- struct bfd_hash_table includes;
- /* The first .stabstr section. */
- struct bfd_section *stabstr;
-};
-
-#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table
-
-/* User program access to BFD facilities. */
-
-/* Direct I/O routines, for programs which know more about the object
- file than BFD does. Use higher level routines if possible. */
-
-extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *);
-extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *);
-extern int bfd_seek (bfd *, file_ptr, int);
-extern file_ptr bfd_tell (bfd *);
-extern int bfd_flush (bfd *);
-extern int bfd_stat (bfd *, struct stat *);
-
-/* Deprecated old routines. */
-#if __GNUC__
-#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \
- bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \
- bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#else
-#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
- bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
- bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#endif
-extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
-
-/* Cast from const char * to char * so that caller can assign to
- a char * without a warning. */
-#define bfd_get_filename(abfd) ((char *) (abfd)->filename)
-#define bfd_get_cacheable(abfd) ((abfd)->cacheable)
-#define bfd_get_format(abfd) ((abfd)->format)
-#define bfd_get_target(abfd) ((abfd)->xvec->name)
-#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
-#define bfd_family_coff(abfd) \
- (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \
- bfd_get_flavour (abfd) == bfd_target_xcoff_flavour)
-#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
-#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
-#define bfd_header_big_endian(abfd) \
- ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG)
-#define bfd_header_little_endian(abfd) \
- ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE)
-#define bfd_get_file_flags(abfd) ((abfd)->flags)
-#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
-#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
-#define bfd_has_map(abfd) ((abfd)->has_armap)
-#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive)
-
-#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types)
-#define bfd_usrdata(abfd) ((abfd)->usrdata)
-
-#define bfd_get_start_address(abfd) ((abfd)->start_address)
-#define bfd_get_symcount(abfd) ((abfd)->symcount)
-#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols)
-#define bfd_count_sections(abfd) ((abfd)->section_count)
-
-#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount)
-
-#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
-
-extern bfd_boolean bfd_cache_close
- (bfd *abfd);
-/* NB: This declaration should match the autogenerated one in libbfd.h. */
-
-extern bfd_boolean bfd_cache_close_all (void);
-
-extern bfd_boolean bfd_record_phdr
- (bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
- bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
-
-/* Byte swapping routines. */
-
-bfd_uint64_t bfd_getb64 (const void *);
-bfd_uint64_t bfd_getl64 (const void *);
-bfd_int64_t bfd_getb_signed_64 (const void *);
-bfd_int64_t bfd_getl_signed_64 (const void *);
-bfd_vma bfd_getb32 (const void *);
-bfd_vma bfd_getl32 (const void *);
-bfd_signed_vma bfd_getb_signed_32 (const void *);
-bfd_signed_vma bfd_getl_signed_32 (const void *);
-bfd_vma bfd_getb16 (const void *);
-bfd_vma bfd_getl16 (const void *);
-bfd_signed_vma bfd_getb_signed_16 (const void *);
-bfd_signed_vma bfd_getl_signed_16 (const void *);
-void bfd_putb64 (bfd_uint64_t, void *);
-void bfd_putl64 (bfd_uint64_t, void *);
-void bfd_putb32 (bfd_vma, void *);
-void bfd_putl32 (bfd_vma, void *);
-void bfd_putb24 (bfd_vma, void *);
-void bfd_putl24 (bfd_vma, void *);
-void bfd_putb16 (bfd_vma, void *);
-void bfd_putl16 (bfd_vma, void *);
-
-/* Byte swapping routines which take size and endiannes as arguments. */
-
-bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
-void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
-
-#if defined(__STDC__) || defined(ALMOST_STDC)
-struct ecoff_debug_info;
-struct ecoff_debug_swap;
-struct ecoff_extr;
-struct bfd_symbol;
-struct bfd_link_info;
-struct bfd_link_hash_entry;
-struct bfd_section_already_linked;
-struct bfd_elf_version_tree;
-#endif
-
-extern bfd_boolean bfd_section_already_linked_table_init (void);
-extern void bfd_section_already_linked_table_free (void);
-extern bfd_boolean _bfd_handle_already_linked
- (struct bfd_section *, struct bfd_section_already_linked *,
- struct bfd_link_info *);
-
-/* Externally visible ECOFF routines. */
-
-extern bfd_boolean bfd_ecoff_set_gp_value
- (bfd *abfd, bfd_vma gp_value);
-extern bfd_boolean bfd_ecoff_set_regmasks
- (bfd *abfd, unsigned long gprmask, unsigned long fprmask,
- unsigned long *cprmask);
-extern void *bfd_ecoff_debug_init
- (bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
-extern void bfd_ecoff_debug_free
- (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_accumulate
- (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
- struct ecoff_debug_info *input_debug,
- const struct ecoff_debug_swap *input_swap, struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_accumulate_other
- (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
- struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_externals
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap, bfd_boolean relocatable,
- bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *),
- void (*set_index) (struct bfd_symbol *, bfd_size_type));
-extern bfd_boolean bfd_ecoff_debug_one_external
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap, const char *name,
- struct ecoff_extr *esym);
-extern bfd_size_type bfd_ecoff_debug_size
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap);
-extern bfd_boolean bfd_ecoff_write_debug
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap, file_ptr where);
-extern bfd_boolean bfd_ecoff_write_accumulated_debug
- (void *handle, bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap,
- struct bfd_link_info *info, file_ptr where);
-
-/* Externally visible ELF routines. */
-
-struct bfd_link_needed_list
-{
- struct bfd_link_needed_list *next;
- bfd *by;
- const char *name;
-};
-
-enum dynamic_lib_link_class {
- DYN_NORMAL = 0,
- DYN_AS_NEEDED = 1,
- DYN_DT_NEEDED = 2,
- DYN_NO_ADD_NEEDED = 4,
- DYN_NO_NEEDED = 8
-};
-
-enum notice_asneeded_action {
- notice_as_needed,
- notice_not_needed,
- notice_needed
-};
-
-extern bfd_boolean bfd_elf_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
- bfd_boolean);
-extern struct bfd_link_needed_list *bfd_elf_get_needed_list
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_elf_get_bfd_needed_list
- (bfd *, struct bfd_link_needed_list **);
-extern bfd_boolean bfd_elf_stack_segment_size (bfd *, struct bfd_link_info *,
- const char *, bfd_vma);
-extern bfd_boolean bfd_elf_size_dynamic_sections
- (bfd *, const char *, const char *, const char *, const char *, const char *,
- const char * const *, struct bfd_link_info *, struct bfd_section **);
-extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr
- (bfd *, struct bfd_link_info *);
-extern void bfd_elf_set_dt_needed_name
- (bfd *, const char *);
-extern const char *bfd_elf_get_dt_soname
- (bfd *);
-extern void bfd_elf_set_dyn_lib_class
- (bfd *, enum dynamic_lib_link_class);
-extern int bfd_elf_get_dyn_lib_class
- (bfd *);
-extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
- (bfd *, struct bfd_link_info *);
-extern int bfd_elf_discard_info
- (bfd *, struct bfd_link_info *);
-extern unsigned int _bfd_elf_default_action_discarded
- (struct bfd_section *);
-
-/* Return an upper bound on the number of bytes required to store a
- copy of ABFD's program header table entries. Return -1 if an error
- occurs; bfd_get_error will return an appropriate code. */
-extern long bfd_get_elf_phdr_upper_bound
- (bfd *abfd);
-
-/* Copy ABFD's program header table entries to *PHDRS. The entries
- will be stored as an array of Elf_Internal_Phdr structures, as
- defined in include/elf/internal.h. To find out how large the
- buffer needs to be, call bfd_get_elf_phdr_upper_bound.
-
- Return the number of program header table entries read, or -1 if an
- error occurs; bfd_get_error will return an appropriate code. */
-extern int bfd_get_elf_phdrs
- (bfd *abfd, void *phdrs);
-
-/* Create a new BFD as if by bfd_openr. Rather than opening a file,
- reconstruct an ELF file by reading the segments out of remote
- memory based on the ELF file header at EHDR_VMA and the ELF program
- headers it points to. If non-zero, SIZE is the known extent of the
- object. If not null, *LOADBASEP is filled in with the difference
- between the VMAs from which the segments were read, and the VMAs
- the file headers (and hence BFD's idea of each section's VMA) put
- them at.
-
- The function TARGET_READ_MEMORY is called to copy LEN bytes from
- the remote memory at target address VMA into the local buffer at
- MYADDR; it should return zero on success or an `errno' code on
- failure. TEMPL must be a BFD for a target with the word size and
- byte order found in the remote memory. */
-extern bfd *bfd_elf_bfd_from_remote_memory
- (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr,
- bfd_size_type len));
-
-extern struct bfd_section *_bfd_elf_tls_setup
- (bfd *, struct bfd_link_info *);
-
-extern struct bfd_section *
-_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma);
-
-extern void _bfd_fix_excluded_sec_syms
- (bfd *, struct bfd_link_info *);
-
-extern unsigned bfd_m68k_mach_to_features (int);
-
-extern int bfd_m68k_features_to_mach (unsigned);
-
-extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
- char **);
-
-extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
- char **);
-
-extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
- char **);
-
-/* SunOS shared library support routines for the linker. */
-
-extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_sunos_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_sunos_size_dynamic_sections
- (bfd *, struct bfd_link_info *, struct bfd_section **,
- struct bfd_section **, struct bfd_section **);
-
-/* Linux shared library support routines for the linker. */
-
-extern bfd_boolean bfd_i386linux_size_dynamic_sections
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_sparclinux_size_dynamic_sections
- (bfd *, struct bfd_link_info *);
-
-/* mmap hacks */
-
-struct _bfd_window_internal;
-typedef struct _bfd_window_internal bfd_window_internal;
-
-typedef struct _bfd_window
-{
- /* What the user asked for. */
- void *data;
- bfd_size_type size;
- /* The actual window used by BFD. Small user-requested read-only
- regions sharing a page may share a single window into the object
- file. Read-write versions shouldn't until I've fixed things to
- keep track of which portions have been claimed by the
- application; don't want to give the same region back when the
- application wants two writable copies! */
- struct _bfd_window_internal *i;
-}
-bfd_window;
-
-extern void bfd_init_window
- (bfd_window *);
-extern void bfd_free_window
- (bfd_window *);
-extern bfd_boolean bfd_get_file_window
- (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean);
-
-/* XCOFF support routines for the linker. */
-
-extern bfd_boolean bfd_xcoff_split_import_path
- (bfd *, const char *, const char **, const char **);
-extern bfd_boolean bfd_xcoff_set_archive_import_path
- (struct bfd_link_info *, bfd *, const char *);
-extern bfd_boolean bfd_xcoff_link_record_set
- (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
-extern bfd_boolean bfd_xcoff_import_symbol
- (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
- const char *, const char *, const char *, unsigned int);
-extern bfd_boolean bfd_xcoff_export_symbol
- (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
-extern bfd_boolean bfd_xcoff_link_count_reloc
- (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_xcoff_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_xcoff_size_dynamic_sections
- (bfd *, struct bfd_link_info *, const char *, const char *,
- unsigned long, unsigned long, unsigned long, bfd_boolean,
- int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean);
-extern bfd_boolean bfd_xcoff_link_generate_rtinit
- (bfd *, const char *, const char *, bfd_boolean);
-
-/* XCOFF support routines for ar. */
-extern bfd_boolean bfd_xcoff_ar_archive_set_magic
- (bfd *, char *);
-
-/* Externally visible COFF routines. */
-
-#if defined(__STDC__) || defined(ALMOST_STDC)
-struct internal_syment;
-union internal_auxent;
-#endif
-
-extern bfd_boolean bfd_coff_set_symbol_class
- (bfd *, struct bfd_symbol *, unsigned int);
-
-/* ARM VFP11 erratum workaround support. */
-typedef enum
-{
- BFD_ARM_VFP11_FIX_DEFAULT,
- BFD_ARM_VFP11_FIX_NONE,
- BFD_ARM_VFP11_FIX_SCALAR,
- BFD_ARM_VFP11_FIX_VECTOR
-} bfd_arm_vfp11_fix;
-
-extern void bfd_elf32_arm_init_maps
- (bfd *);
-
-extern void bfd_elf32_arm_set_vfp11_fix
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_set_cortex_a8_fix
- (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_vfp11_fix_veneer_locations
- (bfd *, struct bfd_link_info *);
-
-/* ARM STM STM32L4XX erratum workaround support. */
-typedef enum
-{
- BFD_ARM_STM32L4XX_FIX_NONE,
- BFD_ARM_STM32L4XX_FIX_DEFAULT,
- BFD_ARM_STM32L4XX_FIX_ALL
-} bfd_arm_stm32l4xx_fix;
-
-extern void bfd_elf32_arm_set_stm32l4xx_fix
- (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations
- (bfd *, struct bfd_link_info *);
-
-/* ARM Interworking support. Called from linker. */
-extern bfd_boolean bfd_arm_allocate_interworking_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean bfd_arm_process_before_allocation
- (bfd *, struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_arm_get_bfd_for_interworking
- (bfd *, struct bfd_link_info *);
-
-/* PE ARM Interworking support. Called from linker. */
-extern bfd_boolean bfd_arm_pe_allocate_interworking_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean bfd_arm_pe_process_before_allocation
- (bfd *, struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking
- (bfd *, struct bfd_link_info *);
-
-/* ELF ARM Interworking support. Called from linker. */
-extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_process_before_allocation
- (bfd *, struct bfd_link_info *);
-
-struct elf32_arm_params {
- char *thumb_entry_symbol;
- int byteswap_code;
- int target1_is_rel;
- char * target2_type;
- int fix_v4bx;
- int use_blx;
- bfd_arm_vfp11_fix vfp11_denorm_fix;
- bfd_arm_stm32l4xx_fix stm32l4xx_fix;
- int no_enum_size_warning;
- int no_wchar_size_warning;
- int pic_veneer;
- int fix_cortex_a8;
- int fix_arm1176;
- int merge_exidx_entries;
- int cmse_implib;
- bfd *in_implib_bfd;
-};
-
-void bfd_elf32_arm_set_target_params
- (bfd *, struct bfd_link_info *, struct elf32_arm_params *);
-
-extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
- (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_keep_private_stub_output_sections
- (struct bfd_link_info *);
-
-/* ELF ARM mapping symbol support. */
-#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0)
-#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1)
-#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2)
-#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0)
-
-extern bfd_boolean bfd_is_arm_special_symbol_name
- (const char *, int);
-
-extern void bfd_elf32_arm_set_byteswap_code
- (struct bfd_link_info *, int);
-
-extern void bfd_elf32_arm_use_long_plt (void);
-
-/* ARM Note section processing. */
-extern bfd_boolean bfd_arm_merge_machines
- (bfd *, bfd *);
-
-extern bfd_boolean bfd_arm_update_notes
- (bfd *, const char *);
-
-extern unsigned int bfd_arm_get_mach_from_notes
- (bfd *, const char *);
-
-/* ARM stub generation support. Called from the linker. */
-extern int elf32_arm_setup_section_lists
- (bfd *, struct bfd_link_info *);
-extern void elf32_arm_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf32_arm_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *,
- struct bfd_section *, unsigned int),
- void (*) (void));
-extern bfd_boolean elf32_arm_build_stubs
- (struct bfd_link_info *);
-
-/* ARM unwind section editing support. */
-extern bfd_boolean elf32_arm_fix_exidx_coverage
-(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
-
-/* C6x unwind section editing support. */
-extern bfd_boolean elf32_tic6x_fix_exidx_coverage
-(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
-
-extern void bfd_elf64_aarch64_init_maps
- (bfd *);
-
-extern void bfd_elf32_aarch64_init_maps
- (bfd *);
-
-extern void bfd_elf64_aarch64_set_options
- (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
-
-extern void bfd_elf32_aarch64_set_options
- (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
-
-/* ELF AArch64 mapping symbol support. */
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0)
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1)
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2)
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0)
-extern bfd_boolean bfd_is_aarch64_special_symbol_name
- (const char * name, int type);
-
-/* AArch64 stub generation support for ELF64. Called from the linker. */
-extern int elf64_aarch64_setup_section_lists
- (bfd *, struct bfd_link_info *);
-extern void elf64_aarch64_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf64_aarch64_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *),
- void (*) (void));
-extern bfd_boolean elf64_aarch64_build_stubs
- (struct bfd_link_info *);
-/* AArch64 stub generation support for ELF32. Called from the linker. */
-extern int elf32_aarch64_setup_section_lists
- (bfd *, struct bfd_link_info *);
-extern void elf32_aarch64_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf32_aarch64_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *),
- void (*) (void));
-extern bfd_boolean elf32_aarch64_build_stubs
- (struct bfd_link_info *);
-
-
-/* TI COFF load page support. */
-extern void bfd_ticoff_set_section_load_page
- (struct bfd_section *, int);
-
-extern int bfd_ticoff_get_section_load_page
- (struct bfd_section *);
-
-/* H8/300 functions. */
-extern bfd_vma bfd_h8300_pad_address
- (bfd *, bfd_vma);
-
-/* IA64 Itanium code generation. Called from linker. */
-extern void bfd_elf32_ia64_after_parse
- (int);
-
-extern void bfd_elf64_ia64_after_parse
- (int);
-
-/* V850 Note manipulation routines. */
-extern bfd_boolean v850_elf_create_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean v850_elf_set_note
- (bfd *, unsigned int, unsigned int);
-
-/* MIPS ABI flags data access. For the disassembler. */
-struct elf_internal_abiflags_v0;
-extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *);
-
-/* C-SKY functions. */
-extern bfd_boolean elf32_csky_build_stubs
- (struct bfd_link_info *);
-extern bfd_boolean elf32_csky_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section *(*) (const char*, struct bfd_section*),
- void (*) (void));
-extern void elf32_csky_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern int elf32_csky_setup_section_lists
- (bfd *, struct bfd_link_info *);
-/* Extracted from init.c. */
-unsigned int bfd_init (void);
-
-
-/* Value returned by bfd_init. */
-
-#define BFD_INIT_MAGIC (sizeof (struct bfd_section))
-/* Extracted from opncls.c. */
-/* Set to N to open the next N BFDs using an alternate id space. */
-extern unsigned int bfd_use_reserved_id;
-bfd *bfd_fopen (const char *filename, const char *target,
- const char *mode, int fd);
-
-bfd *bfd_openr (const char *filename, const char *target);
-
-bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
-
-bfd *bfd_openstreamr (const char * filename, const char * target,
- void * stream);
-
-bfd *bfd_openr_iovec (const char *filename, const char *target,
- void *(*open_func) (struct bfd *nbfd,
- void *open_closure),
- void *open_closure,
- file_ptr (*pread_func) (struct bfd *nbfd,
- void *stream,
- void *buf,
- file_ptr nbytes,
- file_ptr offset),
- int (*close_func) (struct bfd *nbfd,
- void *stream),
- int (*stat_func) (struct bfd *abfd,
- void *stream,
- struct stat *sb));
-
-bfd *bfd_openw (const char *filename, const char *target);
-
-bfd_boolean bfd_close (bfd *abfd);
-
-bfd_boolean bfd_close_all_done (bfd *);
-
-bfd *bfd_create (const char *filename, bfd *templ);
-
-bfd_boolean bfd_make_writable (bfd *abfd);
-
-bfd_boolean bfd_make_readable (bfd *abfd);
-
-void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
-
-void *bfd_zalloc (bfd *abfd, bfd_size_type wanted);
-
-unsigned long bfd_calc_gnu_debuglink_crc32
- (unsigned long crc, const unsigned char *buf, bfd_size_type len);
-
-char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
-
-char *bfd_get_alt_debug_link_info (bfd * abfd,
- bfd_size_type *buildid_len,
- bfd_byte **buildid_out);
-
-char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
-
-char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir);
-
-struct bfd_section *bfd_create_gnu_debuglink_section
- (bfd *abfd, const char *filename);
-
-bfd_boolean bfd_fill_in_gnu_debuglink_section
- (bfd *abfd, struct bfd_section *sect, const char *filename);
-
-char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir);
-
-/* Extracted from libbfd.c. */
-
-/* Byte swapping macros for user section data. */
-
-#define bfd_put_8(abfd, val, ptr) \
- ((void) (*((unsigned char *) (ptr)) = (val) & 0xff))
-#define bfd_put_signed_8 \
- bfd_put_8
-#define bfd_get_8(abfd, ptr) \
- (*(const unsigned char *) (ptr) & 0xff)
-#define bfd_get_signed_8(abfd, ptr) \
- (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
-
-#define bfd_put_16(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
-#define bfd_put_signed_16 \
- bfd_put_16
-#define bfd_get_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx16, (ptr))
-#define bfd_get_signed_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
-
-#define bfd_put_24(abfd, val, ptr) \
- do \
- if (bfd_big_endian (abfd)) \
- bfd_putb24 ((val), (ptr)); \
- else \
- bfd_putl24 ((val), (ptr)); \
- while (0)
-
-bfd_vma bfd_getb24 (const void *p);
-bfd_vma bfd_getl24 (const void *p);
-
-#define bfd_get_24(abfd, ptr) \
- (bfd_big_endian (abfd) ? bfd_getb24 (ptr) : bfd_getl24 (ptr))
-
-#define bfd_put_32(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
-#define bfd_put_signed_32 \
- bfd_put_32
-#define bfd_get_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx32, (ptr))
-#define bfd_get_signed_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_32, (ptr))
-
-#define bfd_put_64(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx64, ((val), (ptr)))
-#define bfd_put_signed_64 \
- bfd_put_64
-#define bfd_get_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx64, (ptr))
-#define bfd_get_signed_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
-
-#define bfd_get(bits, abfd, ptr) \
- ((bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr) \
- : (bits) == 16 ? bfd_get_16 (abfd, ptr) \
- : (bits) == 32 ? bfd_get_32 (abfd, ptr) \
- : (bits) == 64 ? bfd_get_64 (abfd, ptr) \
- : (abort (), (bfd_vma) - 1))
-
-#define bfd_put(bits, abfd, val, ptr) \
- ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
- : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
- : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
- : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
- : (abort (), (void) 0))
-
-
-/* Byte swapping macros for file header data. */
-
-#define bfd_h_put_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
-#define bfd_h_put_signed_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
-#define bfd_h_get_8(abfd, ptr) \
- bfd_get_8 (abfd, ptr)
-#define bfd_h_get_signed_8(abfd, ptr) \
- bfd_get_signed_8 (abfd, ptr)
-
-#define bfd_h_put_16(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
-#define bfd_h_put_signed_16 \
- bfd_h_put_16
-#define bfd_h_get_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx16, (ptr))
-#define bfd_h_get_signed_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
-
-#define bfd_h_put_32(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
-#define bfd_h_put_signed_32 \
- bfd_h_put_32
-#define bfd_h_get_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx32, (ptr))
-#define bfd_h_get_signed_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
-
-#define bfd_h_put_64(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
-#define bfd_h_put_signed_64 \
- bfd_h_put_64
-#define bfd_h_get_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx64, (ptr))
-#define bfd_h_get_signed_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
-
-/* Aliases for the above, which should eventually go away. */
-
-#define H_PUT_64 bfd_h_put_64
-#define H_PUT_32 bfd_h_put_32
-#define H_PUT_16 bfd_h_put_16
-#define H_PUT_8 bfd_h_put_8
-#define H_PUT_S64 bfd_h_put_signed_64
-#define H_PUT_S32 bfd_h_put_signed_32
-#define H_PUT_S16 bfd_h_put_signed_16
-#define H_PUT_S8 bfd_h_put_signed_8
-#define H_GET_64 bfd_h_get_64
-#define H_GET_32 bfd_h_get_32
-#define H_GET_16 bfd_h_get_16
-#define H_GET_8 bfd_h_get_8
-#define H_GET_S64 bfd_h_get_signed_64
-#define H_GET_S32 bfd_h_get_signed_32
-#define H_GET_S16 bfd_h_get_signed_16
-#define H_GET_S8 bfd_h_get_signed_8
-
-
-/* Extracted from bfdio.c. */
-long bfd_get_mtime (bfd *abfd);
-
-ufile_ptr bfd_get_size (bfd *abfd);
-
-ufile_ptr bfd_get_file_size (bfd *abfd);
-
-void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
- int prot, int flags, file_ptr offset,
- void **map_addr, bfd_size_type *map_len);
-
-/* Extracted from bfdwin.c. */
-/* Extracted from section.c. */
-
-typedef struct bfd_section
-{
- /* The name of the section; the name isn't a copy, the pointer is
- the same as that passed to bfd_make_section. */
- const char *name;
-
- /* A unique sequence number. */
- unsigned int id;
-
- /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
- unsigned int index;
-
- /* The next section in the list belonging to the BFD, or NULL. */
- struct bfd_section *next;
-
- /* The previous section in the list belonging to the BFD, or NULL. */
- struct bfd_section *prev;
-
- /* The field flags contains attributes of the section. Some
- flags are read in from the object file, and some are
- synthesized from other information. */
- flagword flags;
-
-#define SEC_NO_FLAGS 0x0
-
- /* Tells the OS to allocate space for this section when loading.
- This is clear for a section containing debug information only. */
-#define SEC_ALLOC 0x1
-
- /* Tells the OS to load the section from the file when loading.
- This is clear for a .bss section. */
-#define SEC_LOAD 0x2
-
- /* The section contains data still to be relocated, so there is
- some relocation information too. */
-#define SEC_RELOC 0x4
-
- /* A signal to the OS that the section contains read only data. */
-#define SEC_READONLY 0x8
-
- /* The section contains code only. */
-#define SEC_CODE 0x10
-
- /* The section contains data only. */
-#define SEC_DATA 0x20
-
- /* The section will reside in ROM. */
-#define SEC_ROM 0x40
-
- /* The section contains constructor information. This section
- type is used by the linker to create lists of constructors and
- destructors used by <>. When a back end sees a symbol
- which should be used in a constructor list, it creates a new
- section for the type of name (e.g., <<__CTOR_LIST__>>), attaches
- the symbol to it, and builds a relocation. To build the lists
- of constructors, all the linker has to do is catenate all the
- sections called <<__CTOR_LIST__>> and relocate the data
- contained within - exactly the operations it would peform on
- standard data. */
-#define SEC_CONSTRUCTOR 0x80
-
- /* The section has contents - a data section could be
- <> | <>; a debug section could be
- <> */
-#define SEC_HAS_CONTENTS 0x100
-
- /* An instruction to the linker to not output the section
- even if it has information which would normally be written. */
-#define SEC_NEVER_LOAD 0x200
-
- /* The section contains thread local data. */
-#define SEC_THREAD_LOCAL 0x400
-
- /* The section's size is fixed. Generic linker code will not
- recalculate it and it is up to whoever has set this flag to
- get the size right. */
-#define SEC_FIXED_SIZE 0x800
-
- /* The section contains common symbols (symbols may be defined
- multiple times, the value of a symbol is the amount of
- space it requires, and the largest symbol value is the one
- used). Most targets have exactly one of these (which we
- translate to bfd_com_section_ptr), but ECOFF has two. */
-#define SEC_IS_COMMON 0x1000
-
- /* The section contains only debugging information. For
- example, this is set for ELF .debug and .stab sections.
- strip tests this flag to see if a section can be
- discarded. */
-#define SEC_DEBUGGING 0x2000
-
- /* The contents of this section are held in memory pointed to
- by the contents field. This is checked by bfd_get_section_contents,
- and the data is retrieved from memory if appropriate. */
-#define SEC_IN_MEMORY 0x4000
-
- /* The contents of this section are to be excluded by the
- linker for executable and shared objects unless those
- objects are to be further relocated. */
-#define SEC_EXCLUDE 0x8000
-
- /* The contents of this section are to be sorted based on the sum of
- the symbol and addend values specified by the associated relocation
- entries. Entries without associated relocation entries will be
- appended to the end of the section in an unspecified order. */
-#define SEC_SORT_ENTRIES 0x10000
-
- /* When linking, duplicate sections of the same name should be
- discarded, rather than being combined into a single section as
- is usually done. This is similar to how common symbols are
- handled. See SEC_LINK_DUPLICATES below. */
-#define SEC_LINK_ONCE 0x20000
-
- /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
- should handle duplicate sections. */
-#define SEC_LINK_DUPLICATES 0xc0000
-
- /* This value for SEC_LINK_DUPLICATES means that duplicate
- sections with the same name should simply be discarded. */
-#define SEC_LINK_DUPLICATES_DISCARD 0x0
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if there are any duplicate sections, although
- it should still only link one copy. */
-#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections are a different size. */
-#define SEC_LINK_DUPLICATES_SAME_SIZE 0x80000
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections contain different
- contents. */
-#define SEC_LINK_DUPLICATES_SAME_CONTENTS \
- (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
-
- /* This section was created by the linker as part of dynamic
- relocation or other arcane processing. It is skipped when
- going through the first-pass output, trusting that someone
- else up the line will take care of it later. */
-#define SEC_LINKER_CREATED 0x100000
-
- /* This section should not be subject to garbage collection.
- Also set to inform the linker that this section should not be
- listed in the link map as discarded. */
-#define SEC_KEEP 0x200000
-
- /* This section contains "short" data, and should be placed
- "near" the GP. */
-#define SEC_SMALL_DATA 0x400000
-
- /* Attempt to merge identical entities in the section.
- Entity size is given in the entsize field. */
-#define SEC_MERGE 0x800000
-
- /* If given with SEC_MERGE, entities to merge are zero terminated
- strings where entsize specifies character size instead of fixed
- size entries. */
-#define SEC_STRINGS 0x1000000
-
- /* This section contains data about section groups. */
-#define SEC_GROUP 0x2000000
-
- /* The section is a COFF shared library section. This flag is
- only for the linker. If this type of section appears in
- the input file, the linker must copy it to the output file
- without changing the vma or size. FIXME: Although this
- was originally intended to be general, it really is COFF
- specific (and the flag was renamed to indicate this). It
- might be cleaner to have some more general mechanism to
- allow the back end to control what the linker does with
- sections. */
-#define SEC_COFF_SHARED_LIBRARY 0x4000000
-
- /* This input section should be copied to output in reverse order
- as an array of pointers. This is for ELF linker internal use
- only. */
-#define SEC_ELF_REVERSE_COPY 0x4000000
-
- /* This section contains data which may be shared with other
- executables or shared objects. This is for COFF only. */
-#define SEC_COFF_SHARED 0x8000000
-
- /* This section should be compressed. This is for ELF linker
- internal use only. */
-#define SEC_ELF_COMPRESS 0x8000000
-
- /* When a section with this flag is being linked, then if the size of
- the input section is less than a page, it should not cross a page
- boundary. If the size of the input section is one page or more,
- it should be aligned on a page boundary. This is for TI
- TMS320C54X only. */
-#define SEC_TIC54X_BLOCK 0x10000000
-
- /* This section should be renamed. This is for ELF linker
- internal use only. */
-#define SEC_ELF_RENAME 0x10000000
-
- /* Conditionally link this section; do not link if there are no
- references found to any symbol in the section. This is for TI
- TMS320C54X only. */
-#define SEC_TIC54X_CLINK 0x20000000
-
- /* This section contains vliw code. This is for Toshiba MeP only. */
-#define SEC_MEP_VLIW 0x20000000
-
- /* Indicate that section has the no read flag set. This happens
- when memory read flag isn't set. */
-#define SEC_COFF_NOREAD 0x40000000
-
- /* Indicate that section has the purecode flag set. */
-#define SEC_ELF_PURECODE 0x80000000
-
- /* End of section flags. */
-
- /* Some internal packed boolean fields. */
-
- /* See the vma field. */
- unsigned int user_set_vma : 1;
-
- /* A mark flag used by some of the linker backends. */
- unsigned int linker_mark : 1;
-
- /* Another mark flag used by some of the linker backends. Set for
- output sections that have an input section. */
- unsigned int linker_has_input : 1;
-
- /* Mark flag used by some linker backends for garbage collection. */
- unsigned int gc_mark : 1;
-
- /* Section compression status. */
- unsigned int compress_status : 2;
-#define COMPRESS_SECTION_NONE 0
-#define COMPRESS_SECTION_DONE 1
-#define DECOMPRESS_SECTION_SIZED 2
-
- /* The following flags are used by the ELF linker. */
-
- /* Mark sections which have been allocated to segments. */
- unsigned int segment_mark : 1;
-
- /* Type of sec_info information. */
- unsigned int sec_info_type:3;
-#define SEC_INFO_TYPE_NONE 0
-#define SEC_INFO_TYPE_STABS 1
-#define SEC_INFO_TYPE_MERGE 2
-#define SEC_INFO_TYPE_EH_FRAME 3
-#define SEC_INFO_TYPE_JUST_SYMS 4
-#define SEC_INFO_TYPE_TARGET 5
-#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6
-
- /* Nonzero if this section uses RELA relocations, rather than REL. */
- unsigned int use_rela_p:1;
-
- /* Bits used by various backends. The generic code doesn't touch
- these fields. */
-
- unsigned int sec_flg0:1;
- unsigned int sec_flg1:1;
- unsigned int sec_flg2:1;
- unsigned int sec_flg3:1;
- unsigned int sec_flg4:1;
- unsigned int sec_flg5:1;
-
- /* End of internal packed boolean fields. */
-
- /* The virtual memory address of the section - where it will be
- at run time. The symbols are relocated against this. The
- user_set_vma flag is maintained by bfd; if it's not set, the
- backend can assign addresses (for example, in <>, where
- the default address for <<.data>> is dependent on the specific
- target and various flags). */
- bfd_vma vma;
-
- /* The load address of the section - where it would be in a
- rom image; really only used for writing section header
- information. */
- bfd_vma lma;
-
- /* The size of the section in *octets*, as it will be output.
- Contains a value even if the section has no contents (e.g., the
- size of <<.bss>>). */
- bfd_size_type size;
-
- /* For input sections, the original size on disk of the section, in
- octets. This field should be set for any section whose size is
- changed by linker relaxation. It is required for sections where
- the linker relaxation scheme doesn't cache altered section and
- reloc contents (stabs, eh_frame, SEC_MERGE, some coff relaxing
- targets), and thus the original size needs to be kept to read the
- section multiple times. For output sections, rawsize holds the
- section size calculated on a previous linker relaxation pass. */
- bfd_size_type rawsize;
-
- /* The compressed size of the section in octets. */
- bfd_size_type compressed_size;
-
- /* Relaxation table. */
- struct relax_table *relax;
-
- /* Count of used relaxation table entries. */
- int relax_count;
-
-
- /* If this section is going to be output, then this value is the
- offset in *bytes* into the output section of the first byte in the
- input section (byte ==> smallest addressable unit on the
- target). In most cases, if this was going to start at the
- 100th octet (8-bit quantity) in the output section, this value
- would be 100. However, if the target byte size is 16 bits
- (bfd_octets_per_byte is "2"), this value would be 50. */
- bfd_vma output_offset;
-
- /* The output section through which to map on output. */
- struct bfd_section *output_section;
-
- /* The alignment requirement of the section, as an exponent of 2 -
- e.g., 3 aligns to 2^3 (or 8). */
- unsigned int alignment_power;
-
- /* If an input section, a pointer to a vector of relocation
- records for the data in this section. */
- struct reloc_cache_entry *relocation;
-
- /* If an output section, a pointer to a vector of pointers to
- relocation records for the data in this section. */
- struct reloc_cache_entry **orelocation;
-
- /* The number of relocation records in one of the above. */
- unsigned reloc_count;
-
- /* Information below is back end specific - and not always used
- or updated. */
-
- /* File position of section data. */
- file_ptr filepos;
-
- /* File position of relocation info. */
- file_ptr rel_filepos;
-
- /* File position of line data. */
- file_ptr line_filepos;
-
- /* Pointer to data for applications. */
- void *userdata;
-
- /* If the SEC_IN_MEMORY flag is set, this points to the actual
- contents. */
- unsigned char *contents;
-
- /* Attached line number information. */
- alent *lineno;
-
- /* Number of line number records. */
- unsigned int lineno_count;
-
- /* Entity size for merging purposes. */
- unsigned int entsize;
-
- /* Points to the kept section if this section is a link-once section,
- and is discarded. */
- struct bfd_section *kept_section;
-
- /* When a section is being output, this value changes as more
- linenumbers are written out. */
- file_ptr moving_line_filepos;
-
- /* What the section number is in the target world. */
- int target_index;
-
- void *used_by_bfd;
-
- /* If this is a constructor section then here is a list of the
- relocations created to relocate items within it. */
- struct relent_chain *constructor_chain;
-
- /* The BFD which owns the section. */
- bfd *owner;
-
- /* A symbol which points at this section only. */
- struct bfd_symbol *symbol;
- struct bfd_symbol **symbol_ptr_ptr;
-
- /* Early in the link process, map_head and map_tail are used to build
- a list of input sections attached to an output section. Later,
- output sections use these fields for a list of bfd_link_order
- structs. */
- union {
- struct bfd_link_order *link_order;
- struct bfd_section *s;
- } map_head, map_tail;
-} asection;
-
-/* Relax table contains information about instructions which can
- be removed by relaxation -- replacing a long address with a
- short address. */
-struct relax_table {
- /* Address where bytes may be deleted. */
- bfd_vma addr;
-
- /* Number of bytes to be deleted. */
- int size;
-};
-
-/* Note: the following are provided as inline functions rather than macros
- because not all callers use the return value. A macro implementation
- would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
- compilers will complain about comma expressions that have no effect. */
-static inline bfd_boolean
-bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr,
- void * val)
-{
- ptr->userdata = val;
- return TRUE;
-}
-
-static inline bfd_boolean
-bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
-{
- ptr->vma = ptr->lma = val;
- ptr->user_set_vma = TRUE;
- return TRUE;
-}
-
-static inline bfd_boolean
-bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr,
- unsigned int val)
-{
- ptr->alignment_power = val;
- return TRUE;
-}
-
-/* These sections are global, and are managed by BFD. The application
- and target back end are not permitted to change the values in
- these sections. */
-extern asection _bfd_std_section[4];
-
-#define BFD_ABS_SECTION_NAME "*ABS*"
-#define BFD_UND_SECTION_NAME "*UND*"
-#define BFD_COM_SECTION_NAME "*COM*"
-#define BFD_IND_SECTION_NAME "*IND*"
-
-/* Pointer to the common section. */
-#define bfd_com_section_ptr (&_bfd_std_section[0])
-/* Pointer to the undefined section. */
-#define bfd_und_section_ptr (&_bfd_std_section[1])
-/* Pointer to the absolute section. */
-#define bfd_abs_section_ptr (&_bfd_std_section[2])
-/* Pointer to the indirect section. */
-#define bfd_ind_section_ptr (&_bfd_std_section[3])
-
-#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
-#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
-#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
-
-#define bfd_is_const_section(SEC) \
- ( ((SEC) == bfd_abs_section_ptr) \
- || ((SEC) == bfd_und_section_ptr) \
- || ((SEC) == bfd_com_section_ptr) \
- || ((SEC) == bfd_ind_section_ptr))
-
-/* Macros to handle insertion and deletion of a bfd's sections. These
- only handle the list pointers, ie. do not adjust section_count,
- target_index etc. */
-#define bfd_section_list_remove(ABFD, S) \
- do \
- { \
- asection *_s = S; \
- asection *_next = _s->next; \
- asection *_prev = _s->prev; \
- if (_prev) \
- _prev->next = _next; \
- else \
- (ABFD)->sections = _next; \
- if (_next) \
- _next->prev = _prev; \
- else \
- (ABFD)->section_last = _prev; \
- } \
- while (0)
-#define bfd_section_list_append(ABFD, S) \
- do \
- { \
- asection *_s = S; \
- bfd *_abfd = ABFD; \
- _s->next = NULL; \
- if (_abfd->section_last) \
- { \
- _s->prev = _abfd->section_last; \
- _abfd->section_last->next = _s; \
- } \
- else \
- { \
- _s->prev = NULL; \
- _abfd->sections = _s; \
- } \
- _abfd->section_last = _s; \
- } \
- while (0)
-#define bfd_section_list_prepend(ABFD, S) \
- do \
- { \
- asection *_s = S; \
- bfd *_abfd = ABFD; \
- _s->prev = NULL; \
- if (_abfd->sections) \
- { \
- _s->next = _abfd->sections; \
- _abfd->sections->prev = _s; \
- } \
- else \
- { \
- _s->next = NULL; \
- _abfd->section_last = _s; \
- } \
- _abfd->sections = _s; \
- } \
- while (0)
-#define bfd_section_list_insert_after(ABFD, A, S) \
- do \
- { \
- asection *_a = A; \
- asection *_s = S; \
- asection *_next = _a->next; \
- _s->next = _next; \
- _s->prev = _a; \
- _a->next = _s; \
- if (_next) \
- _next->prev = _s; \
- else \
- (ABFD)->section_last = _s; \
- } \
- while (0)
-#define bfd_section_list_insert_before(ABFD, B, S) \
- do \
- { \
- asection *_b = B; \
- asection *_s = S; \
- asection *_prev = _b->prev; \
- _s->prev = _prev; \
- _s->next = _b; \
- _b->prev = _s; \
- if (_prev) \
- _prev->next = _s; \
- else \
- (ABFD)->sections = _s; \
- } \
- while (0)
-#define bfd_section_removed_from_list(ABFD, S) \
- ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
-
-#define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS) \
- /* name, id, index, next, prev, flags, user_set_vma, */ \
- { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \
- \
- /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \
- 0, 0, 1, 0, \
- \
- /* segment_mark, sec_info_type, use_rela_p, */ \
- 0, 0, 0, \
- \
- /* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5, */ \
- 0, 0, 0, 0, 0, 0, \
- \
- /* vma, lma, size, rawsize, compressed_size, relax, relax_count, */ \
- 0, 0, 0, 0, 0, 0, 0, \
- \
- /* output_offset, output_section, alignment_power, */ \
- 0, &SEC, 0, \
- \
- /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
- NULL, NULL, 0, 0, 0, \
- \
- /* line_filepos, userdata, contents, lineno, lineno_count, */ \
- 0, NULL, NULL, NULL, 0, \
- \
- /* entsize, kept_section, moving_line_filepos, */ \
- 0, NULL, 0, \
- \
- /* target_index, used_by_bfd, constructor_chain, owner, */ \
- 0, NULL, NULL, NULL, \
- \
- /* symbol, symbol_ptr_ptr, */ \
- (struct bfd_symbol *) SYM, &SEC.symbol, \
- \
- /* map_head, map_tail */ \
- { NULL }, { NULL } \
- }
-
-/* We use a macro to initialize the static asymbol structures because
- traditional C does not permit us to initialize a union member while
- gcc warns if we don't initialize it.
- the_bfd, name, value, attr, section [, udata] */
-#ifdef __STDC__
-#define GLOBAL_SYM_INIT(NAME, SECTION) \
- { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }}
-#else
-#define GLOBAL_SYM_INIT(NAME, SECTION) \
- { 0, NAME, 0, BSF_SECTION_SYM, SECTION }
-#endif
-
-void bfd_section_list_clear (bfd *);
-
-asection *bfd_get_section_by_name (bfd *abfd, const char *name);
-
-asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec);
-
-asection *bfd_get_linker_section (bfd *abfd, const char *name);
-
-asection *bfd_get_section_by_name_if
- (bfd *abfd,
- const char *name,
- bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-
-char *bfd_get_unique_section_name
- (bfd *abfd, const char *templat, int *count);
-
-asection *bfd_make_section_old_way (bfd *abfd, const char *name);
-
-asection *bfd_make_section_anyway_with_flags
- (bfd *abfd, const char *name, flagword flags);
-
-asection *bfd_make_section_anyway (bfd *abfd, const char *name);
-
-asection *bfd_make_section_with_flags
- (bfd *, const char *name, flagword flags);
-
-asection *bfd_make_section (bfd *, const char *name);
-
-bfd_boolean bfd_set_section_flags
- (bfd *abfd, asection *sec, flagword flags);
-
-void bfd_rename_section
- (bfd *abfd, asection *sec, const char *newname);
-
-void bfd_map_over_sections
- (bfd *abfd,
- void (*func) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-
-asection *bfd_sections_find_if
- (bfd *abfd,
- bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-
-bfd_boolean bfd_set_section_size
- (bfd *abfd, asection *sec, bfd_size_type val);
-
-bfd_boolean bfd_set_section_contents
- (bfd *abfd, asection *section, const void *data,
- file_ptr offset, bfd_size_type count);
-
-bfd_boolean bfd_get_section_contents
- (bfd *abfd, asection *section, void *location, file_ptr offset,
- bfd_size_type count);
-
-bfd_boolean bfd_malloc_and_get_section
- (bfd *abfd, asection *section, bfd_byte **buf);
-
-bfd_boolean bfd_copy_private_section_data
- (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
-
-#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
- BFD_SEND (obfd, _bfd_copy_private_section_data, \
- (ibfd, isection, obfd, osection))
-bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
-
-bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
-
-/* Extracted from archures.c. */
-enum bfd_architecture
-{
- bfd_arch_unknown, /* File arch not known. */
- bfd_arch_obscure, /* Arch known, not one of these. */
- bfd_arch_m68k, /* Motorola 68xxx. */
-#define bfd_mach_m68000 1
-#define bfd_mach_m68008 2
-#define bfd_mach_m68010 3
-#define bfd_mach_m68020 4
-#define bfd_mach_m68030 5
-#define bfd_mach_m68040 6
-#define bfd_mach_m68060 7
-#define bfd_mach_cpu32 8
-#define bfd_mach_fido 9
-#define bfd_mach_mcf_isa_a_nodiv 10
-#define bfd_mach_mcf_isa_a 11
-#define bfd_mach_mcf_isa_a_mac 12
-#define bfd_mach_mcf_isa_a_emac 13
-#define bfd_mach_mcf_isa_aplus 14
-#define bfd_mach_mcf_isa_aplus_mac 15
-#define bfd_mach_mcf_isa_aplus_emac 16
-#define bfd_mach_mcf_isa_b_nousp 17
-#define bfd_mach_mcf_isa_b_nousp_mac 18
-#define bfd_mach_mcf_isa_b_nousp_emac 19
-#define bfd_mach_mcf_isa_b 20
-#define bfd_mach_mcf_isa_b_mac 21
-#define bfd_mach_mcf_isa_b_emac 22
-#define bfd_mach_mcf_isa_b_float 23
-#define bfd_mach_mcf_isa_b_float_mac 24
-#define bfd_mach_mcf_isa_b_float_emac 25
-#define bfd_mach_mcf_isa_c 26
-#define bfd_mach_mcf_isa_c_mac 27
-#define bfd_mach_mcf_isa_c_emac 28
-#define bfd_mach_mcf_isa_c_nodiv 29
-#define bfd_mach_mcf_isa_c_nodiv_mac 30
-#define bfd_mach_mcf_isa_c_nodiv_emac 31
- bfd_arch_vax, /* DEC Vax. */
-
- bfd_arch_or1k, /* OpenRISC 1000. */
-#define bfd_mach_or1k 1
-#define bfd_mach_or1knd 2
-
- bfd_arch_sparc, /* SPARC. */
-#define bfd_mach_sparc 1
-/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
-#define bfd_mach_sparc_sparclet 2
-#define bfd_mach_sparc_sparclite 3
-#define bfd_mach_sparc_v8plus 4
-#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */
-#define bfd_mach_sparc_sparclite_le 6
-#define bfd_mach_sparc_v9 7
-#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */
-#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */
-#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */
-#define bfd_mach_sparc_v8plusc 11 /* with UA2005 and T1 add'ns. */
-#define bfd_mach_sparc_v9c 12 /* with UA2005 and T1 add'ns. */
-#define bfd_mach_sparc_v8plusd 13 /* with UA2007 and T3 add'ns. */
-#define bfd_mach_sparc_v9d 14 /* with UA2007 and T3 add'ns. */
-#define bfd_mach_sparc_v8pluse 15 /* with OSA2001 and T4 add'ns (no IMA). */
-#define bfd_mach_sparc_v9e 16 /* with OSA2001 and T4 add'ns (no IMA). */
-#define bfd_mach_sparc_v8plusv 17 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
-#define bfd_mach_sparc_v9v 18 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
-#define bfd_mach_sparc_v8plusm 19 /* with OSA2015 and M7 add'ns. */
-#define bfd_mach_sparc_v9m 20 /* with OSA2015 and M7 add'ns. */
-#define bfd_mach_sparc_v8plusm8 21 /* with OSA2017 and M8 add'ns. */
-#define bfd_mach_sparc_v9m8 22 /* with OSA2017 and M8 add'ns. */
-/* Nonzero if MACH has the v9 instruction set. */
-#define bfd_mach_sparc_v9_p(mach) \
- ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9m8 \
- && (mach) != bfd_mach_sparc_sparclite_le)
-/* Nonzero if MACH is a 64 bit sparc architecture. */
-#define bfd_mach_sparc_64bit_p(mach) \
- ((mach) >= bfd_mach_sparc_v9 \
- && (mach) != bfd_mach_sparc_v8plusb \
- && (mach) != bfd_mach_sparc_v8plusc \
- && (mach) != bfd_mach_sparc_v8plusd \
- && (mach) != bfd_mach_sparc_v8pluse \
- && (mach) != bfd_mach_sparc_v8plusv \
- && (mach) != bfd_mach_sparc_v8plusm \
- && (mach) != bfd_mach_sparc_v8plusm8)
- bfd_arch_spu, /* PowerPC SPU. */
-#define bfd_mach_spu 256
- bfd_arch_mips, /* MIPS Rxxxx. */
-#define bfd_mach_mips3000 3000
-#define bfd_mach_mips3900 3900
-#define bfd_mach_mips4000 4000
-#define bfd_mach_mips4010 4010
-#define bfd_mach_mips4100 4100
-#define bfd_mach_mips4111 4111
-#define bfd_mach_mips4120 4120
-#define bfd_mach_mips4300 4300
-#define bfd_mach_mips4400 4400
-#define bfd_mach_mips4600 4600
-#define bfd_mach_mips4650 4650
-#define bfd_mach_mips5000 5000
-#define bfd_mach_mips5400 5400
-#define bfd_mach_mips5500 5500
-#define bfd_mach_mips5900 5900
-#define bfd_mach_mips6000 6000
-#define bfd_mach_mips7000 7000
-#define bfd_mach_mips8000 8000
-#define bfd_mach_mips9000 9000
-#define bfd_mach_mips10000 10000
-#define bfd_mach_mips12000 12000
-#define bfd_mach_mips14000 14000
-#define bfd_mach_mips16000 16000
-#define bfd_mach_mips16 16
-#define bfd_mach_mips5 5
-#define bfd_mach_mips_loongson_2e 3001
-#define bfd_mach_mips_loongson_2f 3002
-#define bfd_mach_mips_gs464 3003
-#define bfd_mach_mips_gs464e 3004
-#define bfd_mach_mips_gs264e 3005
-#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01. */
-#define bfd_mach_mips_octeon 6501
-#define bfd_mach_mips_octeonp 6601
-#define bfd_mach_mips_octeon2 6502
-#define bfd_mach_mips_octeon3 6503
-#define bfd_mach_mips_xlr 887682 /* decimal 'XLR'. */
-#define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2'. */
-#define bfd_mach_mipsisa32 32
-#define bfd_mach_mipsisa32r2 33
-#define bfd_mach_mipsisa32r3 34
-#define bfd_mach_mipsisa32r5 36
-#define bfd_mach_mipsisa32r6 37
-#define bfd_mach_mipsisa64 64
-#define bfd_mach_mipsisa64r2 65
-#define bfd_mach_mipsisa64r3 66
-#define bfd_mach_mipsisa64r5 68
-#define bfd_mach_mipsisa64r6 69
-#define bfd_mach_mips_micromips 96
- bfd_arch_i386, /* Intel 386. */
-#define bfd_mach_i386_intel_syntax (1 << 0)
-#define bfd_mach_i386_i8086 (1 << 1)
-#define bfd_mach_i386_i386 (1 << 2)
-#define bfd_mach_x86_64 (1 << 3)
-#define bfd_mach_x64_32 (1 << 4)
-#define bfd_mach_i386_i386_intel_syntax (bfd_mach_i386_i386 | bfd_mach_i386_intel_syntax)
-#define bfd_mach_x86_64_intel_syntax (bfd_mach_x86_64 | bfd_mach_i386_intel_syntax)
-#define bfd_mach_x64_32_intel_syntax (bfd_mach_x64_32 | bfd_mach_i386_intel_syntax)
- bfd_arch_l1om, /* Intel L1OM. */
-#define bfd_mach_l1om (1 << 5)
-#define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax)
- bfd_arch_k1om, /* Intel K1OM. */
-#define bfd_mach_k1om (1 << 6)
-#define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax)
-#define bfd_mach_i386_nacl (1 << 7)
-#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl)
-#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl)
-#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl)
- bfd_arch_iamcu, /* Intel MCU. */
-#define bfd_mach_iamcu (1 << 8)
-#define bfd_mach_i386_iamcu (bfd_mach_i386_i386 | bfd_mach_iamcu)
-#define bfd_mach_i386_iamcu_intel_syntax (bfd_mach_i386_iamcu | bfd_mach_i386_intel_syntax)
- bfd_arch_romp, /* IBM ROMP PC/RT. */
- bfd_arch_convex, /* Convex. */
- bfd_arch_m98k, /* Motorola 98xxx. */
- bfd_arch_pyramid, /* Pyramid Technology. */
- bfd_arch_h8300, /* Renesas H8/300 (formerly Hitachi H8/300). */
-#define bfd_mach_h8300 1
-#define bfd_mach_h8300h 2
-#define bfd_mach_h8300s 3
-#define bfd_mach_h8300hn 4
-#define bfd_mach_h8300sn 5
-#define bfd_mach_h8300sx 6
-#define bfd_mach_h8300sxn 7
- bfd_arch_pdp11, /* DEC PDP-11. */
- bfd_arch_plugin,
- bfd_arch_powerpc, /* PowerPC. */
-#define bfd_mach_ppc 32
-#define bfd_mach_ppc64 64
-#define bfd_mach_ppc_403 403
-#define bfd_mach_ppc_403gc 4030
-#define bfd_mach_ppc_405 405
-#define bfd_mach_ppc_505 505
-#define bfd_mach_ppc_601 601
-#define bfd_mach_ppc_602 602
-#define bfd_mach_ppc_603 603
-#define bfd_mach_ppc_ec603e 6031
-#define bfd_mach_ppc_604 604
-#define bfd_mach_ppc_620 620
-#define bfd_mach_ppc_630 630
-#define bfd_mach_ppc_750 750
-#define bfd_mach_ppc_860 860
-#define bfd_mach_ppc_a35 35
-#define bfd_mach_ppc_rs64ii 642
-#define bfd_mach_ppc_rs64iii 643
-#define bfd_mach_ppc_7400 7400
-#define bfd_mach_ppc_e500 500
-#define bfd_mach_ppc_e500mc 5001
-#define bfd_mach_ppc_e500mc64 5005
-#define bfd_mach_ppc_e5500 5006
-#define bfd_mach_ppc_e6500 5007
-#define bfd_mach_ppc_titan 83
-#define bfd_mach_ppc_vle 84
- bfd_arch_rs6000, /* IBM RS/6000. */
-#define bfd_mach_rs6k 6000
-#define bfd_mach_rs6k_rs1 6001
-#define bfd_mach_rs6k_rsc 6003
-#define bfd_mach_rs6k_rs2 6002
- bfd_arch_hppa, /* HP PA RISC. */
-#define bfd_mach_hppa10 10
-#define bfd_mach_hppa11 11
-#define bfd_mach_hppa20 20
-#define bfd_mach_hppa20w 25
- bfd_arch_d10v, /* Mitsubishi D10V. */
-#define bfd_mach_d10v 1
-#define bfd_mach_d10v_ts2 2
-#define bfd_mach_d10v_ts3 3
- bfd_arch_d30v, /* Mitsubishi D30V. */
- bfd_arch_dlx, /* DLX. */
- bfd_arch_m68hc11, /* Motorola 68HC11. */
- bfd_arch_m68hc12, /* Motorola 68HC12. */
-#define bfd_mach_m6812_default 0
-#define bfd_mach_m6812 1
-#define bfd_mach_m6812s 2
- bfd_arch_m9s12x, /* Freescale S12X. */
- bfd_arch_m9s12xg, /* Freescale XGATE. */
- bfd_arch_s12z, /* Freescale S12Z. */
-#define bfd_mach_s12z_default 0
- bfd_arch_z8k, /* Zilog Z8000. */
-#define bfd_mach_z8001 1
-#define bfd_mach_z8002 2
- bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */
-#define bfd_mach_sh 1
-#define bfd_mach_sh2 0x20
-#define bfd_mach_sh_dsp 0x2d
-#define bfd_mach_sh2a 0x2a
-#define bfd_mach_sh2a_nofpu 0x2b
-#define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
-#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2
-#define bfd_mach_sh2a_or_sh4 0x2a3
-#define bfd_mach_sh2a_or_sh3e 0x2a4
-#define bfd_mach_sh2e 0x2e
-#define bfd_mach_sh3 0x30
-#define bfd_mach_sh3_nommu 0x31
-#define bfd_mach_sh3_dsp 0x3d
-#define bfd_mach_sh3e 0x3e
-#define bfd_mach_sh4 0x40
-#define bfd_mach_sh4_nofpu 0x41
-#define bfd_mach_sh4_nommu_nofpu 0x42
-#define bfd_mach_sh4a 0x4a
-#define bfd_mach_sh4a_nofpu 0x4b
-#define bfd_mach_sh4al_dsp 0x4d
- bfd_arch_alpha, /* Dec Alpha. */
-#define bfd_mach_alpha_ev4 0x10
-#define bfd_mach_alpha_ev5 0x20
-#define bfd_mach_alpha_ev6 0x30
- bfd_arch_arm, /* Advanced Risc Machines ARM. */
-#define bfd_mach_arm_unknown 0
-#define bfd_mach_arm_2 1
-#define bfd_mach_arm_2a 2
-#define bfd_mach_arm_3 3
-#define bfd_mach_arm_3M 4
-#define bfd_mach_arm_4 5
-#define bfd_mach_arm_4T 6
-#define bfd_mach_arm_5 7
-#define bfd_mach_arm_5T 8
-#define bfd_mach_arm_5TE 9
-#define bfd_mach_arm_XScale 10
-#define bfd_mach_arm_ep9312 11
-#define bfd_mach_arm_iWMMXt 12
-#define bfd_mach_arm_iWMMXt2 13
-#define bfd_mach_arm_5TEJ 14
-#define bfd_mach_arm_6 15
-#define bfd_mach_arm_6KZ 16
-#define bfd_mach_arm_6T2 17
-#define bfd_mach_arm_6K 18
-#define bfd_mach_arm_7 19
-#define bfd_mach_arm_6M 20
-#define bfd_mach_arm_6SM 21
-#define bfd_mach_arm_7EM 22
-#define bfd_mach_arm_8 23
-#define bfd_mach_arm_8R 24
-#define bfd_mach_arm_8M_BASE 25
-#define bfd_mach_arm_8M_MAIN 26
- bfd_arch_nds32, /* Andes NDS32. */
-#define bfd_mach_n1 1
-#define bfd_mach_n1h 2
-#define bfd_mach_n1h_v2 3
-#define bfd_mach_n1h_v3 4
-#define bfd_mach_n1h_v3m 5
- bfd_arch_ns32k, /* National Semiconductors ns32000. */
- bfd_arch_tic30, /* Texas Instruments TMS320C30. */
- bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */
-#define bfd_mach_tic3x 30
-#define bfd_mach_tic4x 40
- bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */
- bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */
- bfd_arch_tic80, /* TI TMS320c80 (MVP). */
- bfd_arch_v850, /* NEC V850. */
- bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */
-#define bfd_mach_v850 1
-#define bfd_mach_v850e 'E'
-#define bfd_mach_v850e1 '1'
-#define bfd_mach_v850e2 0x4532
-#define bfd_mach_v850e2v3 0x45325633
-#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */
- bfd_arch_arc, /* ARC Cores. */
-#define bfd_mach_arc_a4 0
-#define bfd_mach_arc_a5 1
-#define bfd_mach_arc_arc600 2
-#define bfd_mach_arc_arc601 4
-#define bfd_mach_arc_arc700 3
-#define bfd_mach_arc_arcv2 5
- bfd_arch_m32c, /* Renesas M16C/M32C. */
-#define bfd_mach_m16c 0x75
-#define bfd_mach_m32c 0x78
- bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */
-#define bfd_mach_m32r 1 /* For backwards compatibility. */
-#define bfd_mach_m32rx 'x'
-#define bfd_mach_m32r2 '2'
- bfd_arch_mn10200, /* Matsushita MN10200. */
- bfd_arch_mn10300, /* Matsushita MN10300. */
-#define bfd_mach_mn10300 300
-#define bfd_mach_am33 330
-#define bfd_mach_am33_2 332
- bfd_arch_fr30,
-#define bfd_mach_fr30 0x46523330
- bfd_arch_frv,
-#define bfd_mach_frv 1
-#define bfd_mach_frvsimple 2
-#define bfd_mach_fr300 300
-#define bfd_mach_fr400 400
-#define bfd_mach_fr450 450
-#define bfd_mach_frvtomcat 499 /* fr500 prototype. */
-#define bfd_mach_fr500 500
-#define bfd_mach_fr550 550
- bfd_arch_moxie, /* The moxie processor. */
-#define bfd_mach_moxie 1
- bfd_arch_ft32, /* The ft32 processor. */
-#define bfd_mach_ft32 1
-#define bfd_mach_ft32b 2
- bfd_arch_mcore,
- bfd_arch_mep,
-#define bfd_mach_mep 1
-#define bfd_mach_mep_h1 0x6831
-#define bfd_mach_mep_c5 0x6335
- bfd_arch_metag,
-#define bfd_mach_metag 1
- bfd_arch_ia64, /* HP/Intel ia64. */
-#define bfd_mach_ia64_elf64 64
-#define bfd_mach_ia64_elf32 32
- bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */
-#define bfd_mach_ip2022 1
-#define bfd_mach_ip2022ext 2
- bfd_arch_iq2000, /* Vitesse IQ2000. */
-#define bfd_mach_iq2000 1
-#define bfd_mach_iq10 2
- bfd_arch_epiphany, /* Adapteva EPIPHANY. */
-#define bfd_mach_epiphany16 1
-#define bfd_mach_epiphany32 2
- bfd_arch_mt,
-#define bfd_mach_ms1 1
-#define bfd_mach_mrisc2 2
-#define bfd_mach_ms2 3
- bfd_arch_pj,
- bfd_arch_avr, /* Atmel AVR microcontrollers. */
-#define bfd_mach_avr1 1
-#define bfd_mach_avr2 2
-#define bfd_mach_avr25 25
-#define bfd_mach_avr3 3
-#define bfd_mach_avr31 31
-#define bfd_mach_avr35 35
-#define bfd_mach_avr4 4
-#define bfd_mach_avr5 5
-#define bfd_mach_avr51 51
-#define bfd_mach_avr6 6
-#define bfd_mach_avrtiny 100
-#define bfd_mach_avrxmega1 101
-#define bfd_mach_avrxmega2 102
-#define bfd_mach_avrxmega3 103
-#define bfd_mach_avrxmega4 104
-#define bfd_mach_avrxmega5 105
-#define bfd_mach_avrxmega6 106
-#define bfd_mach_avrxmega7 107
- bfd_arch_bfin, /* ADI Blackfin. */
-#define bfd_mach_bfin 1
- bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */
-#define bfd_mach_cr16 1
- bfd_arch_cr16c, /* National Semiconductor CompactRISC. */
-#define bfd_mach_cr16c 1
- bfd_arch_crx, /* National Semiconductor CRX. */
-#define bfd_mach_crx 1
- bfd_arch_cris, /* Axis CRIS. */
-#define bfd_mach_cris_v0_v10 255
-#define bfd_mach_cris_v32 32
-#define bfd_mach_cris_v10_v32 1032
- bfd_arch_riscv,
-#define bfd_mach_riscv32 132
-#define bfd_mach_riscv64 164
- bfd_arch_rl78,
-#define bfd_mach_rl78 0x75
- bfd_arch_rx, /* Renesas RX. */
-#define bfd_mach_rx 0x75
-#define bfd_mach_rx_v2 0x76
-#define bfd_mach_rx_v3 0x77
- bfd_arch_s390, /* IBM s390. */
-#define bfd_mach_s390_31 31
-#define bfd_mach_s390_64 64
- bfd_arch_score, /* Sunplus score. */
-#define bfd_mach_score3 3
-#define bfd_mach_score7 7
- bfd_arch_mmix, /* Donald Knuth's educational processor. */
- bfd_arch_xstormy16,
-#define bfd_mach_xstormy16 1
- bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */
-#define bfd_mach_msp11 11
-#define bfd_mach_msp110 110
-#define bfd_mach_msp12 12
-#define bfd_mach_msp13 13
-#define bfd_mach_msp14 14
-#define bfd_mach_msp15 15
-#define bfd_mach_msp16 16
-#define bfd_mach_msp20 20
-#define bfd_mach_msp21 21
-#define bfd_mach_msp22 22
-#define bfd_mach_msp23 23
-#define bfd_mach_msp24 24
-#define bfd_mach_msp26 26
-#define bfd_mach_msp31 31
-#define bfd_mach_msp32 32
-#define bfd_mach_msp33 33
-#define bfd_mach_msp41 41
-#define bfd_mach_msp42 42
-#define bfd_mach_msp43 43
-#define bfd_mach_msp44 44
-#define bfd_mach_msp430x 45
-#define bfd_mach_msp46 46
-#define bfd_mach_msp47 47
-#define bfd_mach_msp54 54
- bfd_arch_xc16x, /* Infineon's XC16X Series. */
-#define bfd_mach_xc16x 1
-#define bfd_mach_xc16xl 2
-#define bfd_mach_xc16xs 3
- bfd_arch_xgate, /* Freescale XGATE. */
-#define bfd_mach_xgate 1
- bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
-#define bfd_mach_xtensa 1
- bfd_arch_z80,
-#define bfd_mach_z80strict 1 /* No undocumented opcodes. */
-#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */
-#define bfd_mach_z80full 7 /* All undocumented instructions. */
-#define bfd_mach_r800 11 /* R800: successor with multiplication. */
- bfd_arch_lm32, /* Lattice Mico32. */
-#define bfd_mach_lm32 1
- bfd_arch_microblaze,/* Xilinx MicroBlaze. */
- bfd_arch_tilepro, /* Tilera TILEPro. */
- bfd_arch_tilegx, /* Tilera TILE-Gx. */
-#define bfd_mach_tilepro 1
-#define bfd_mach_tilegx 1
-#define bfd_mach_tilegx32 2
- bfd_arch_aarch64, /* AArch64. */
-#define bfd_mach_aarch64 0
-#define bfd_mach_aarch64_ilp32 32
- bfd_arch_nios2, /* Nios II. */
-#define bfd_mach_nios2 0
-#define bfd_mach_nios2r1 1
-#define bfd_mach_nios2r2 2
- bfd_arch_visium, /* Visium. */
-#define bfd_mach_visium 1
- bfd_arch_wasm32, /* WebAssembly. */
-#define bfd_mach_wasm32 1
- bfd_arch_pru, /* PRU. */
-#define bfd_mach_pru 0
- bfd_arch_nfp, /* Netronome Flow Processor */
-#define bfd_mach_nfp3200 0x3200
-#define bfd_mach_nfp6000 0x6000
- bfd_arch_csky, /* C-SKY. */
-#define bfd_mach_ck_unknown 0
-#define bfd_mach_ck510 1
-#define bfd_mach_ck610 2
-#define bfd_mach_ck801 3
-#define bfd_mach_ck802 4
-#define bfd_mach_ck803 5
-#define bfd_mach_ck807 6
-#define bfd_mach_ck810 7
- bfd_arch_last
- };
-
-typedef struct bfd_arch_info
-{
- int bits_per_word;
- int bits_per_address;
- int bits_per_byte;
- enum bfd_architecture arch;
- unsigned long mach;
- const char *arch_name;
- const char *printable_name;
- unsigned int section_align_power;
- /* TRUE if this is the default machine for the architecture.
- The default arch should be the first entry for an arch so that
- all the entries for that arch can be accessed via <>. */
- bfd_boolean the_default;
- const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *,
- const struct bfd_arch_info *);
-
- bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
-
- /* Allocate via bfd_malloc and return a fill buffer of size COUNT. If
- IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is
- TRUE, the buffer contains code. */
- void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian,
- bfd_boolean code);
-
- const struct bfd_arch_info *next;
-}
-bfd_arch_info_type;
-
-const char *bfd_printable_name (bfd *abfd);
-
-const bfd_arch_info_type *bfd_scan_arch (const char *string);
-
-const char **bfd_arch_list (void);
-
-const bfd_arch_info_type *bfd_arch_get_compatible
- (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
-
-void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
-
-bfd_boolean bfd_default_set_arch_mach
- (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
-
-enum bfd_architecture bfd_get_arch (bfd *abfd);
-
-unsigned long bfd_get_mach (bfd *abfd);
-
-unsigned int bfd_arch_bits_per_byte (bfd *abfd);
-
-unsigned int bfd_arch_bits_per_address (bfd *abfd);
-
-const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
-
-const bfd_arch_info_type *bfd_lookup_arch
- (enum bfd_architecture arch, unsigned long machine);
-
-const char *bfd_printable_arch_mach
- (enum bfd_architecture arch, unsigned long machine);
-
-unsigned int bfd_octets_per_byte (bfd *abfd);
-
-unsigned int bfd_arch_mach_octets_per_byte
- (enum bfd_architecture arch, unsigned long machine);
-
-/* Extracted from reloc.c. */
-
-typedef enum bfd_reloc_status
-{
- /* No errors detected. Note - the value 2 is used so that it
- will not be mistaken for the boolean TRUE or FALSE values. */
- bfd_reloc_ok = 2,
-
- /* The relocation was performed, but there was an overflow. */
- bfd_reloc_overflow,
-
- /* The address to relocate was not within the section supplied. */
- bfd_reloc_outofrange,
-
- /* Used by special functions. */
- bfd_reloc_continue,
-
- /* Unsupported relocation size requested. */
- bfd_reloc_notsupported,
-
- /* Unused. */
- bfd_reloc_other,
-
- /* The symbol to relocate against was undefined. */
- bfd_reloc_undefined,
-
- /* The relocation was performed, but may not be ok. If this type is
- returned, the error_message argument to bfd_perform_relocation
- will be set. */
- bfd_reloc_dangerous
- }
- bfd_reloc_status_type;
-
-typedef const struct reloc_howto_struct reloc_howto_type;
-
-typedef struct reloc_cache_entry
-{
- /* A pointer into the canonical table of pointers. */
- struct bfd_symbol **sym_ptr_ptr;
-
- /* offset in section. */
- bfd_size_type address;
-
- /* addend for relocation value. */
- bfd_vma addend;
-
- /* Pointer to how to perform the required relocation. */
- reloc_howto_type *howto;
-
-}
-arelent;
-
-
-enum complain_overflow
-{
- /* Do not complain on overflow. */
- complain_overflow_dont,
-
- /* Complain if the value overflows when considered as a signed
- number one bit larger than the field. ie. A bitfield of N bits
- is allowed to represent -2**n to 2**n-1. */
- complain_overflow_bitfield,
-
- /* Complain if the value overflows when considered as a signed
- number. */
- complain_overflow_signed,
-
- /* Complain if the value overflows when considered as an
- unsigned number. */
- complain_overflow_unsigned
-};
-struct reloc_howto_struct
-{
- /* The type field has mainly a documentary use - the back end can
- do what it wants with it, though normally the back end's idea of
- an external reloc number is stored in this field. */
- unsigned int type;
-
- /* The encoded size of the item to be relocated. This is *not* a
- power-of-two measure. Use bfd_get_reloc_size to find the size
- of the item in bytes. */
- unsigned int size:3;
-
- /* The number of bits in the field to be relocated. This is used
- when doing overflow checking. */
- unsigned int bitsize:7;
-
- /* The value the final relocation is shifted right by. This drops
- unwanted data from the relocation. */
- unsigned int rightshift:6;
-
- /* The bit position of the reloc value in the destination.
- The relocated value is left shifted by this amount. */
- unsigned int bitpos:6;
-
- /* What type of overflow error should be checked for when
- relocating. */
- ENUM_BITFIELD (complain_overflow) complain_on_overflow:2;
-
- /* The relocation value should be negated before applying. */
- unsigned int negate:1;
-
- /* The relocation is relative to the item being relocated. */
- unsigned int pc_relative:1;
-
- /* Some formats record a relocation addend in the section contents
- rather than with the relocation. For ELF formats this is the
- distinction between USE_REL and USE_RELA (though the code checks
- for USE_REL == 1/0). The value of this field is TRUE if the
- addend is recorded with the section contents; when performing a
- partial link (ld -r) the section contents (the data) will be
- modified. The value of this field is FALSE if addends are
- recorded with the relocation (in arelent.addend); when performing
- a partial link the relocation will be modified.
- All relocations for all ELF USE_RELA targets should set this field
- to FALSE (values of TRUE should be looked on with suspicion).
- However, the converse is not true: not all relocations of all ELF
- USE_REL targets set this field to TRUE. Why this is so is peculiar
- to each particular target. For relocs that aren't used in partial
- links (e.g. GOT stuff) it doesn't matter what this is set to. */
- unsigned int partial_inplace:1;
-
- /* When some formats create PC relative instructions, they leave
- the value of the pc of the place being relocated in the offset
- slot of the instruction, so that a PC relative relocation can
- be made just by adding in an ordinary offset (e.g., sun3 a.out).
- Some formats leave the displacement part of an instruction
- empty (e.g., ELF); this flag signals the fact. */
- unsigned int pcrel_offset:1;
-
- /* src_mask selects the part of the instruction (or data) to be used
- in the relocation sum. If the target relocations don't have an
- addend in the reloc, eg. ELF USE_REL, src_mask will normally equal
- dst_mask to extract the addend from the section contents. If
- relocations do have an addend in the reloc, eg. ELF USE_RELA, this
- field should normally be zero. Non-zero values for ELF USE_RELA
- targets should be viewed with suspicion as normally the value in
- the dst_mask part of the section contents should be ignored. */
- bfd_vma src_mask;
-
- /* dst_mask selects which parts of the instruction (or data) are
- replaced with a relocated value. */
- bfd_vma dst_mask;
-
- /* If this field is non null, then the supplied function is
- called rather than the normal function. This allows really
- strange relocation methods to be accommodated. */
- bfd_reloc_status_type (*special_function)
- (bfd *, arelent *, struct bfd_symbol *, void *, asection *,
- bfd *, char **);
-
- /* The textual name of the relocation type. */
- char *name;
-};
-
-#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \
- inplace, src_mask, dst_mask, pcrel_off) \
- { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \
- size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name }
-#define EMPTY_HOWTO(C) \
- HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \
- NULL, FALSE, 0, 0, FALSE)
-
-unsigned int bfd_get_reloc_size (reloc_howto_type *);
-
-typedef struct relent_chain
-{
- arelent relent;
- struct relent_chain *next;
-}
-arelent_chain;
-
-bfd_reloc_status_type bfd_check_overflow
- (enum complain_overflow how,
- unsigned int bitsize,
- unsigned int rightshift,
- unsigned int addrsize,
- bfd_vma relocation);
-
-bfd_boolean bfd_reloc_offset_in_range
- (reloc_howto_type *howto,
- bfd *abfd,
- asection *section,
- bfd_size_type offset);
-
-bfd_reloc_status_type bfd_perform_relocation
- (bfd *abfd,
- arelent *reloc_entry,
- void *data,
- asection *input_section,
- bfd *output_bfd,
- char **error_message);
-
-bfd_reloc_status_type bfd_install_relocation
- (bfd *abfd,
- arelent *reloc_entry,
- void *data, bfd_vma data_start,
- asection *input_section,
- char **error_message);
-
-enum bfd_reloc_code_real {
- _dummy_first_bfd_reloc_code_real,
-
-
-/* Basic absolute relocations of N bits. */
- BFD_RELOC_64,
- BFD_RELOC_32,
- BFD_RELOC_26,
- BFD_RELOC_24,
- BFD_RELOC_16,
- BFD_RELOC_14,
- BFD_RELOC_8,
-
-/* PC-relative relocations. Sometimes these are relative to the address
-of the relocation itself; sometimes they are relative to the start of
-the section containing the relocation. It depends on the specific target. */
- BFD_RELOC_64_PCREL,
- BFD_RELOC_32_PCREL,
- BFD_RELOC_24_PCREL,
- BFD_RELOC_16_PCREL,
- BFD_RELOC_12_PCREL,
- BFD_RELOC_8_PCREL,
-
-/* Section relative relocations. Some targets need this for DWARF2. */
- BFD_RELOC_32_SECREL,
-
-/* For ELF. */
- BFD_RELOC_32_GOT_PCREL,
- BFD_RELOC_16_GOT_PCREL,
- BFD_RELOC_8_GOT_PCREL,
- BFD_RELOC_32_GOTOFF,
- BFD_RELOC_16_GOTOFF,
- BFD_RELOC_LO16_GOTOFF,
- BFD_RELOC_HI16_GOTOFF,
- BFD_RELOC_HI16_S_GOTOFF,
- BFD_RELOC_8_GOTOFF,
- BFD_RELOC_64_PLT_PCREL,
- BFD_RELOC_32_PLT_PCREL,
- BFD_RELOC_24_PLT_PCREL,
- BFD_RELOC_16_PLT_PCREL,
- BFD_RELOC_8_PLT_PCREL,
- BFD_RELOC_64_PLTOFF,
- BFD_RELOC_32_PLTOFF,
- BFD_RELOC_16_PLTOFF,
- BFD_RELOC_LO16_PLTOFF,
- BFD_RELOC_HI16_PLTOFF,
- BFD_RELOC_HI16_S_PLTOFF,
- BFD_RELOC_8_PLTOFF,
-
-/* Size relocations. */
- BFD_RELOC_SIZE32,
- BFD_RELOC_SIZE64,
-
-/* Relocations used by 68K ELF. */
- BFD_RELOC_68K_GLOB_DAT,
- BFD_RELOC_68K_JMP_SLOT,
- BFD_RELOC_68K_RELATIVE,
- BFD_RELOC_68K_TLS_GD32,
- BFD_RELOC_68K_TLS_GD16,
- BFD_RELOC_68K_TLS_GD8,
- BFD_RELOC_68K_TLS_LDM32,
- BFD_RELOC_68K_TLS_LDM16,
- BFD_RELOC_68K_TLS_LDM8,
- BFD_RELOC_68K_TLS_LDO32,
- BFD_RELOC_68K_TLS_LDO16,
- BFD_RELOC_68K_TLS_LDO8,
- BFD_RELOC_68K_TLS_IE32,
- BFD_RELOC_68K_TLS_IE16,
- BFD_RELOC_68K_TLS_IE8,
- BFD_RELOC_68K_TLS_LE32,
- BFD_RELOC_68K_TLS_LE16,
- BFD_RELOC_68K_TLS_LE8,
-
-/* Linkage-table relative. */
- BFD_RELOC_32_BASEREL,
- BFD_RELOC_16_BASEREL,
- BFD_RELOC_LO16_BASEREL,
- BFD_RELOC_HI16_BASEREL,
- BFD_RELOC_HI16_S_BASEREL,
- BFD_RELOC_8_BASEREL,
- BFD_RELOC_RVA,
-
-/* Absolute 8-bit relocation, but used to form an address like 0xFFnn. */
- BFD_RELOC_8_FFnn,
-
-/* These PC-relative relocations are stored as word displacements --
-i.e., byte displacements shifted right two bits. The 30-bit word
-displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the
-SPARC. (SPARC tools generally refer to this as <>.) The
-signed 16-bit displacement is used on the MIPS, and the 23-bit
-displacement is used on the Alpha. */
- BFD_RELOC_32_PCREL_S2,
- BFD_RELOC_16_PCREL_S2,
- BFD_RELOC_23_PCREL_S2,
-
-/* High 22 bits and low 10 bits of 32-bit value, placed into lower bits of
-the target word. These are used on the SPARC. */
- BFD_RELOC_HI22,
- BFD_RELOC_LO10,
-
-/* For systems that allocate a Global Pointer register, these are
-displacements off that register. These relocation types are
-handled specially, because the value the register will have is
-decided relatively late. */
- BFD_RELOC_GPREL16,
- BFD_RELOC_GPREL32,
-
-/* SPARC ELF relocations. There is probably some overlap with other
-relocation types already defined. */
- BFD_RELOC_NONE,
- BFD_RELOC_SPARC_WDISP22,
- BFD_RELOC_SPARC22,
- BFD_RELOC_SPARC13,
- BFD_RELOC_SPARC_GOT10,
- BFD_RELOC_SPARC_GOT13,
- BFD_RELOC_SPARC_GOT22,
- BFD_RELOC_SPARC_PC10,
- BFD_RELOC_SPARC_PC22,
- BFD_RELOC_SPARC_WPLT30,
- BFD_RELOC_SPARC_COPY,
- BFD_RELOC_SPARC_GLOB_DAT,
- BFD_RELOC_SPARC_JMP_SLOT,
- BFD_RELOC_SPARC_RELATIVE,
- BFD_RELOC_SPARC_UA16,
- BFD_RELOC_SPARC_UA32,
- BFD_RELOC_SPARC_UA64,
- BFD_RELOC_SPARC_GOTDATA_HIX22,
- BFD_RELOC_SPARC_GOTDATA_LOX10,
- BFD_RELOC_SPARC_GOTDATA_OP_HIX22,
- BFD_RELOC_SPARC_GOTDATA_OP_LOX10,
- BFD_RELOC_SPARC_GOTDATA_OP,
- BFD_RELOC_SPARC_JMP_IREL,
- BFD_RELOC_SPARC_IRELATIVE,
-
-/* I think these are specific to SPARC a.out (e.g., Sun 4). */
- BFD_RELOC_SPARC_BASE13,
- BFD_RELOC_SPARC_BASE22,
-
-/* SPARC64 relocations */
-#define BFD_RELOC_SPARC_64 BFD_RELOC_64
- BFD_RELOC_SPARC_10,
- BFD_RELOC_SPARC_11,
- BFD_RELOC_SPARC_OLO10,
- BFD_RELOC_SPARC_HH22,
- BFD_RELOC_SPARC_HM10,
- BFD_RELOC_SPARC_LM22,
- BFD_RELOC_SPARC_PC_HH22,
- BFD_RELOC_SPARC_PC_HM10,
- BFD_RELOC_SPARC_PC_LM22,
- BFD_RELOC_SPARC_WDISP16,
- BFD_RELOC_SPARC_WDISP19,
- BFD_RELOC_SPARC_7,
- BFD_RELOC_SPARC_6,
- BFD_RELOC_SPARC_5,
-#define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL
- BFD_RELOC_SPARC_PLT32,
- BFD_RELOC_SPARC_PLT64,
- BFD_RELOC_SPARC_HIX22,
- BFD_RELOC_SPARC_LOX10,
- BFD_RELOC_SPARC_H44,
- BFD_RELOC_SPARC_M44,
- BFD_RELOC_SPARC_L44,
- BFD_RELOC_SPARC_REGISTER,
- BFD_RELOC_SPARC_H34,
- BFD_RELOC_SPARC_SIZE32,
- BFD_RELOC_SPARC_SIZE64,
- BFD_RELOC_SPARC_WDISP10,
-
-/* SPARC little endian relocation */
- BFD_RELOC_SPARC_REV32,
-
-/* SPARC TLS relocations */
- BFD_RELOC_SPARC_TLS_GD_HI22,
- BFD_RELOC_SPARC_TLS_GD_LO10,
- BFD_RELOC_SPARC_TLS_GD_ADD,
- BFD_RELOC_SPARC_TLS_GD_CALL,
- BFD_RELOC_SPARC_TLS_LDM_HI22,
- BFD_RELOC_SPARC_TLS_LDM_LO10,
- BFD_RELOC_SPARC_TLS_LDM_ADD,
- BFD_RELOC_SPARC_TLS_LDM_CALL,
- BFD_RELOC_SPARC_TLS_LDO_HIX22,
- BFD_RELOC_SPARC_TLS_LDO_LOX10,
- BFD_RELOC_SPARC_TLS_LDO_ADD,
- BFD_RELOC_SPARC_TLS_IE_HI22,
- BFD_RELOC_SPARC_TLS_IE_LO10,
- BFD_RELOC_SPARC_TLS_IE_LD,
- BFD_RELOC_SPARC_TLS_IE_LDX,
- BFD_RELOC_SPARC_TLS_IE_ADD,
- BFD_RELOC_SPARC_TLS_LE_HIX22,
- BFD_RELOC_SPARC_TLS_LE_LOX10,
- BFD_RELOC_SPARC_TLS_DTPMOD32,
- BFD_RELOC_SPARC_TLS_DTPMOD64,
- BFD_RELOC_SPARC_TLS_DTPOFF32,
- BFD_RELOC_SPARC_TLS_DTPOFF64,
- BFD_RELOC_SPARC_TLS_TPOFF32,
- BFD_RELOC_SPARC_TLS_TPOFF64,
-
-/* SPU Relocations. */
- BFD_RELOC_SPU_IMM7,
- BFD_RELOC_SPU_IMM8,
- BFD_RELOC_SPU_IMM10,
- BFD_RELOC_SPU_IMM10W,
- BFD_RELOC_SPU_IMM16,
- BFD_RELOC_SPU_IMM16W,
- BFD_RELOC_SPU_IMM18,
- BFD_RELOC_SPU_PCREL9a,
- BFD_RELOC_SPU_PCREL9b,
- BFD_RELOC_SPU_PCREL16,
- BFD_RELOC_SPU_LO16,
- BFD_RELOC_SPU_HI16,
- BFD_RELOC_SPU_PPU32,
- BFD_RELOC_SPU_PPU64,
- BFD_RELOC_SPU_ADD_PIC,
-
-/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
-"addend" in some special way.
-For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
-writing; when reading, it will be the absolute section symbol. The
-addend is the displacement in bytes of the "lda" instruction from
-the "ldah" instruction (which is at the address of this reloc). */
- BFD_RELOC_ALPHA_GPDISP_HI16,
-
-/* For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
-with GPDISP_HI16 relocs. The addend is ignored when writing the
-relocations out, and is filled in with the file's GP value on
-reading, for convenience. */
- BFD_RELOC_ALPHA_GPDISP_LO16,
-
-/* The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
-relocation except that there is no accompanying GPDISP_LO16
-relocation. */
- BFD_RELOC_ALPHA_GPDISP,
-
-/* The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
-the assembler turns it into a LDQ instruction to load the address of
-the symbol, and then fills in a register in the real instruction.
-
-The LITERAL reloc, at the LDQ instruction, refers to the .lita
-section symbol. The addend is ignored when writing, but is filled
-in with the file's GP value on reading, for convenience, as with the
-GPDISP_LO16 reloc.
-
-The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16.
-It should refer to the symbol to be referenced, as with 16_GOTOFF,
-but it generates output not based on the position within the .got
-section, but relative to the GP value chosen for the file during the
-final link stage.
-
-The LITUSE reloc, on the instruction using the loaded address, gives
-information to the linker that it might be able to use to optimize
-away some literal section references. The symbol is ignored (read
-as the absolute section symbol), and the "addend" indicates the type
-of instruction using the register:
-1 - "memory" fmt insn
-2 - byte-manipulation (byte offset reg)
-3 - jsr (target of branch) */
- BFD_RELOC_ALPHA_LITERAL,
- BFD_RELOC_ALPHA_ELF_LITERAL,
- BFD_RELOC_ALPHA_LITUSE,
-
-/* The HINT relocation indicates a value that should be filled into the
-"hint" field of a jmp/jsr/ret instruction, for possible branch-
-prediction logic which may be provided on some processors. */
- BFD_RELOC_ALPHA_HINT,
-
-/* The LINKAGE relocation outputs a linkage pair in the object file,
-which is filled by the linker. */
- BFD_RELOC_ALPHA_LINKAGE,
-
-/* The CODEADDR relocation outputs a STO_CA in the object file,
-which is filled by the linker. */
- BFD_RELOC_ALPHA_CODEADDR,
-
-/* The GPREL_HI/LO relocations together form a 32-bit offset from the
-GP register. */
- BFD_RELOC_ALPHA_GPREL_HI16,
- BFD_RELOC_ALPHA_GPREL_LO16,
-
-/* Like BFD_RELOC_23_PCREL_S2, except that the source and target must
-share a common GP, and the target address is adjusted for
-STO_ALPHA_STD_GPLOAD. */
- BFD_RELOC_ALPHA_BRSGP,
-
-/* The NOP relocation outputs a NOP if the longword displacement
-between two procedure entry points is < 2^21. */
- BFD_RELOC_ALPHA_NOP,
-
-/* The BSR relocation outputs a BSR if the longword displacement
-between two procedure entry points is < 2^21. */
- BFD_RELOC_ALPHA_BSR,
-
-/* The LDA relocation outputs a LDA if the longword displacement
-between two procedure entry points is < 2^16. */
- BFD_RELOC_ALPHA_LDA,
-
-/* The BOH relocation outputs a BSR if the longword displacement
-between two procedure entry points is < 2^21, or else a hint. */
- BFD_RELOC_ALPHA_BOH,
-
-/* Alpha thread-local storage relocations. */
- BFD_RELOC_ALPHA_TLSGD,
- BFD_RELOC_ALPHA_TLSLDM,
- BFD_RELOC_ALPHA_DTPMOD64,
- BFD_RELOC_ALPHA_GOTDTPREL16,
- BFD_RELOC_ALPHA_DTPREL64,
- BFD_RELOC_ALPHA_DTPREL_HI16,
- BFD_RELOC_ALPHA_DTPREL_LO16,
- BFD_RELOC_ALPHA_DTPREL16,
- BFD_RELOC_ALPHA_GOTTPREL16,
- BFD_RELOC_ALPHA_TPREL64,
- BFD_RELOC_ALPHA_TPREL_HI16,
- BFD_RELOC_ALPHA_TPREL_LO16,
- BFD_RELOC_ALPHA_TPREL16,
-
-/* The MIPS jump instruction. */
- BFD_RELOC_MIPS_JMP,
- BFD_RELOC_MICROMIPS_JMP,
-
-/* The MIPS16 jump instruction. */
- BFD_RELOC_MIPS16_JMP,
-
-/* MIPS16 GP relative reloc. */
- BFD_RELOC_MIPS16_GPREL,
-
-/* High 16 bits of 32-bit value; simple reloc. */
- BFD_RELOC_HI16,
-
-/* High 16 bits of 32-bit value but the low 16 bits will be sign
-extended and added to form the final result. If the low 16
-bits form a negative number, we need to add one to the high value
-to compensate for the borrow when the low bits are added. */
- BFD_RELOC_HI16_S,
-
-/* Low 16 bits. */
- BFD_RELOC_LO16,
-
-/* High 16 bits of 32-bit pc-relative value */
- BFD_RELOC_HI16_PCREL,
-
-/* High 16 bits of 32-bit pc-relative value, adjusted */
- BFD_RELOC_HI16_S_PCREL,
-
-/* Low 16 bits of pc-relative value */
- BFD_RELOC_LO16_PCREL,
-
-/* Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of
-16-bit immediate fields */
- BFD_RELOC_MIPS16_GOT16,
- BFD_RELOC_MIPS16_CALL16,
-
-/* MIPS16 high 16 bits of 32-bit value. */
- BFD_RELOC_MIPS16_HI16,
-
-/* MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign
-extended and added to form the final result. If the low 16
-bits form a negative number, we need to add one to the high value
-to compensate for the borrow when the low bits are added. */
- BFD_RELOC_MIPS16_HI16_S,
-
-/* MIPS16 low 16 bits. */
- BFD_RELOC_MIPS16_LO16,
-
-/* MIPS16 TLS relocations */
- BFD_RELOC_MIPS16_TLS_GD,
- BFD_RELOC_MIPS16_TLS_LDM,
- BFD_RELOC_MIPS16_TLS_DTPREL_HI16,
- BFD_RELOC_MIPS16_TLS_DTPREL_LO16,
- BFD_RELOC_MIPS16_TLS_GOTTPREL,
- BFD_RELOC_MIPS16_TLS_TPREL_HI16,
- BFD_RELOC_MIPS16_TLS_TPREL_LO16,
-
-/* Relocation against a MIPS literal section. */
- BFD_RELOC_MIPS_LITERAL,
- BFD_RELOC_MICROMIPS_LITERAL,
-
-/* microMIPS PC-relative relocations. */
- BFD_RELOC_MICROMIPS_7_PCREL_S1,
- BFD_RELOC_MICROMIPS_10_PCREL_S1,
- BFD_RELOC_MICROMIPS_16_PCREL_S1,
-
-/* MIPS16 PC-relative relocation. */
- BFD_RELOC_MIPS16_16_PCREL_S1,
-
-/* MIPS PC-relative relocations. */
- BFD_RELOC_MIPS_21_PCREL_S2,
- BFD_RELOC_MIPS_26_PCREL_S2,
- BFD_RELOC_MIPS_18_PCREL_S3,
- BFD_RELOC_MIPS_19_PCREL_S2,
-
-/* microMIPS versions of generic BFD relocs. */
- BFD_RELOC_MICROMIPS_GPREL16,
- BFD_RELOC_MICROMIPS_HI16,
- BFD_RELOC_MICROMIPS_HI16_S,
- BFD_RELOC_MICROMIPS_LO16,
-
-/* MIPS ELF relocations. */
- BFD_RELOC_MIPS_GOT16,
- BFD_RELOC_MICROMIPS_GOT16,
- BFD_RELOC_MIPS_CALL16,
- BFD_RELOC_MICROMIPS_CALL16,
- BFD_RELOC_MIPS_GOT_HI16,
- BFD_RELOC_MICROMIPS_GOT_HI16,
- BFD_RELOC_MIPS_GOT_LO16,
- BFD_RELOC_MICROMIPS_GOT_LO16,
- BFD_RELOC_MIPS_CALL_HI16,
- BFD_RELOC_MICROMIPS_CALL_HI16,
- BFD_RELOC_MIPS_CALL_LO16,
- BFD_RELOC_MICROMIPS_CALL_LO16,
- BFD_RELOC_MIPS_SUB,
- BFD_RELOC_MICROMIPS_SUB,
- BFD_RELOC_MIPS_GOT_PAGE,
- BFD_RELOC_MICROMIPS_GOT_PAGE,
- BFD_RELOC_MIPS_GOT_OFST,
- BFD_RELOC_MICROMIPS_GOT_OFST,
- BFD_RELOC_MIPS_GOT_DISP,
- BFD_RELOC_MICROMIPS_GOT_DISP,
- BFD_RELOC_MIPS_SHIFT5,
- BFD_RELOC_MIPS_SHIFT6,
- BFD_RELOC_MIPS_INSERT_A,
- BFD_RELOC_MIPS_INSERT_B,
- BFD_RELOC_MIPS_DELETE,
- BFD_RELOC_MIPS_HIGHEST,
- BFD_RELOC_MICROMIPS_HIGHEST,
- BFD_RELOC_MIPS_HIGHER,
- BFD_RELOC_MICROMIPS_HIGHER,
- BFD_RELOC_MIPS_SCN_DISP,
- BFD_RELOC_MICROMIPS_SCN_DISP,
- BFD_RELOC_MIPS_REL16,
- BFD_RELOC_MIPS_RELGOT,
- BFD_RELOC_MIPS_JALR,
- BFD_RELOC_MICROMIPS_JALR,
- BFD_RELOC_MIPS_TLS_DTPMOD32,
- BFD_RELOC_MIPS_TLS_DTPREL32,
- BFD_RELOC_MIPS_TLS_DTPMOD64,
- BFD_RELOC_MIPS_TLS_DTPREL64,
- BFD_RELOC_MIPS_TLS_GD,
- BFD_RELOC_MICROMIPS_TLS_GD,
- BFD_RELOC_MIPS_TLS_LDM,
- BFD_RELOC_MICROMIPS_TLS_LDM,
- BFD_RELOC_MIPS_TLS_DTPREL_HI16,
- BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16,
- BFD_RELOC_MIPS_TLS_DTPREL_LO16,
- BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16,
- BFD_RELOC_MIPS_TLS_GOTTPREL,
- BFD_RELOC_MICROMIPS_TLS_GOTTPREL,
- BFD_RELOC_MIPS_TLS_TPREL32,
- BFD_RELOC_MIPS_TLS_TPREL64,
- BFD_RELOC_MIPS_TLS_TPREL_HI16,
- BFD_RELOC_MICROMIPS_TLS_TPREL_HI16,
- BFD_RELOC_MIPS_TLS_TPREL_LO16,
- BFD_RELOC_MICROMIPS_TLS_TPREL_LO16,
- BFD_RELOC_MIPS_EH,
-
-
-/* MIPS ELF relocations (VxWorks and PLT extensions). */
- BFD_RELOC_MIPS_COPY,
- BFD_RELOC_MIPS_JUMP_SLOT,
-
-
-/* Moxie ELF relocations. */
- BFD_RELOC_MOXIE_10_PCREL,
-
-
-/* FT32 ELF relocations. */
- BFD_RELOC_FT32_10,
- BFD_RELOC_FT32_20,
- BFD_RELOC_FT32_17,
- BFD_RELOC_FT32_18,
- BFD_RELOC_FT32_RELAX,
- BFD_RELOC_FT32_SC0,
- BFD_RELOC_FT32_SC1,
- BFD_RELOC_FT32_15,
- BFD_RELOC_FT32_DIFF32,
-
-
-/* Fujitsu Frv Relocations. */
- BFD_RELOC_FRV_LABEL16,
- BFD_RELOC_FRV_LABEL24,
- BFD_RELOC_FRV_LO16,
- BFD_RELOC_FRV_HI16,
- BFD_RELOC_FRV_GPREL12,
- BFD_RELOC_FRV_GPRELU12,
- BFD_RELOC_FRV_GPREL32,
- BFD_RELOC_FRV_GPRELHI,
- BFD_RELOC_FRV_GPRELLO,
- BFD_RELOC_FRV_GOT12,
- BFD_RELOC_FRV_GOTHI,
- BFD_RELOC_FRV_GOTLO,
- BFD_RELOC_FRV_FUNCDESC,
- BFD_RELOC_FRV_FUNCDESC_GOT12,
- BFD_RELOC_FRV_FUNCDESC_GOTHI,
- BFD_RELOC_FRV_FUNCDESC_GOTLO,
- BFD_RELOC_FRV_FUNCDESC_VALUE,
- BFD_RELOC_FRV_FUNCDESC_GOTOFF12,
- BFD_RELOC_FRV_FUNCDESC_GOTOFFHI,
- BFD_RELOC_FRV_FUNCDESC_GOTOFFLO,
- BFD_RELOC_FRV_GOTOFF12,
- BFD_RELOC_FRV_GOTOFFHI,
- BFD_RELOC_FRV_GOTOFFLO,
- BFD_RELOC_FRV_GETTLSOFF,
- BFD_RELOC_FRV_TLSDESC_VALUE,
- BFD_RELOC_FRV_GOTTLSDESC12,
- BFD_RELOC_FRV_GOTTLSDESCHI,
- BFD_RELOC_FRV_GOTTLSDESCLO,
- BFD_RELOC_FRV_TLSMOFF12,
- BFD_RELOC_FRV_TLSMOFFHI,
- BFD_RELOC_FRV_TLSMOFFLO,
- BFD_RELOC_FRV_GOTTLSOFF12,
- BFD_RELOC_FRV_GOTTLSOFFHI,
- BFD_RELOC_FRV_GOTTLSOFFLO,
- BFD_RELOC_FRV_TLSOFF,
- BFD_RELOC_FRV_TLSDESC_RELAX,
- BFD_RELOC_FRV_GETTLSOFF_RELAX,
- BFD_RELOC_FRV_TLSOFF_RELAX,
- BFD_RELOC_FRV_TLSMOFF,
-
-
-/* This is a 24bit GOT-relative reloc for the mn10300. */
- BFD_RELOC_MN10300_GOTOFF24,
-
-/* This is a 32bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction. */
- BFD_RELOC_MN10300_GOT32,
-
-/* This is a 24bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction. */
- BFD_RELOC_MN10300_GOT24,
-
-/* This is a 16bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction. */
- BFD_RELOC_MN10300_GOT16,
-
-/* Copy symbol at runtime. */
- BFD_RELOC_MN10300_COPY,
-
-/* Create GOT entry. */
- BFD_RELOC_MN10300_GLOB_DAT,
-
-/* Create PLT entry. */
- BFD_RELOC_MN10300_JMP_SLOT,
-
-/* Adjust by program base. */
- BFD_RELOC_MN10300_RELATIVE,
-
-/* Together with another reloc targeted at the same location,
-allows for a value that is the difference of two symbols
-in the same section. */
- BFD_RELOC_MN10300_SYM_DIFF,
-
-/* The addend of this reloc is an alignment power that must
-be honoured at the offset's location, regardless of linker
-relaxation. */
- BFD_RELOC_MN10300_ALIGN,
-
-/* Various TLS-related relocations. */
- BFD_RELOC_MN10300_TLS_GD,
- BFD_RELOC_MN10300_TLS_LD,
- BFD_RELOC_MN10300_TLS_LDO,
- BFD_RELOC_MN10300_TLS_GOTIE,
- BFD_RELOC_MN10300_TLS_IE,
- BFD_RELOC_MN10300_TLS_LE,
- BFD_RELOC_MN10300_TLS_DTPMOD,
- BFD_RELOC_MN10300_TLS_DTPOFF,
- BFD_RELOC_MN10300_TLS_TPOFF,
-
-/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction. */
- BFD_RELOC_MN10300_32_PCREL,
-
-/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction. */
- BFD_RELOC_MN10300_16_PCREL,
-
-
-/* i386/elf relocations */
- BFD_RELOC_386_GOT32,
- BFD_RELOC_386_PLT32,
- BFD_RELOC_386_COPY,
- BFD_RELOC_386_GLOB_DAT,
- BFD_RELOC_386_JUMP_SLOT,
- BFD_RELOC_386_RELATIVE,
- BFD_RELOC_386_GOTOFF,
- BFD_RELOC_386_GOTPC,
- BFD_RELOC_386_TLS_TPOFF,
- BFD_RELOC_386_TLS_IE,
- BFD_RELOC_386_TLS_GOTIE,
- BFD_RELOC_386_TLS_LE,
- BFD_RELOC_386_TLS_GD,
- BFD_RELOC_386_TLS_LDM,
- BFD_RELOC_386_TLS_LDO_32,
- BFD_RELOC_386_TLS_IE_32,
- BFD_RELOC_386_TLS_LE_32,
- BFD_RELOC_386_TLS_DTPMOD32,
- BFD_RELOC_386_TLS_DTPOFF32,
- BFD_RELOC_386_TLS_TPOFF32,
- BFD_RELOC_386_TLS_GOTDESC,
- BFD_RELOC_386_TLS_DESC_CALL,
- BFD_RELOC_386_TLS_DESC,
- BFD_RELOC_386_IRELATIVE,
- BFD_RELOC_386_GOT32X,
-
-/* x86-64/elf relocations */
- BFD_RELOC_X86_64_GOT32,
- BFD_RELOC_X86_64_PLT32,
- BFD_RELOC_X86_64_COPY,
- BFD_RELOC_X86_64_GLOB_DAT,
- BFD_RELOC_X86_64_JUMP_SLOT,
- BFD_RELOC_X86_64_RELATIVE,
- BFD_RELOC_X86_64_GOTPCREL,
- BFD_RELOC_X86_64_32S,
- BFD_RELOC_X86_64_DTPMOD64,
- BFD_RELOC_X86_64_DTPOFF64,
- BFD_RELOC_X86_64_TPOFF64,
- BFD_RELOC_X86_64_TLSGD,
- BFD_RELOC_X86_64_TLSLD,
- BFD_RELOC_X86_64_DTPOFF32,
- BFD_RELOC_X86_64_GOTTPOFF,
- BFD_RELOC_X86_64_TPOFF32,
- BFD_RELOC_X86_64_GOTOFF64,
- BFD_RELOC_X86_64_GOTPC32,
- BFD_RELOC_X86_64_GOT64,
- BFD_RELOC_X86_64_GOTPCREL64,
- BFD_RELOC_X86_64_GOTPC64,
- BFD_RELOC_X86_64_GOTPLT64,
- BFD_RELOC_X86_64_PLTOFF64,
- BFD_RELOC_X86_64_GOTPC32_TLSDESC,
- BFD_RELOC_X86_64_TLSDESC_CALL,
- BFD_RELOC_X86_64_TLSDESC,
- BFD_RELOC_X86_64_IRELATIVE,
- BFD_RELOC_X86_64_PC32_BND,
- BFD_RELOC_X86_64_PLT32_BND,
- BFD_RELOC_X86_64_GOTPCRELX,
- BFD_RELOC_X86_64_REX_GOTPCRELX,
-
-/* ns32k relocations */
- BFD_RELOC_NS32K_IMM_8,
- BFD_RELOC_NS32K_IMM_16,
- BFD_RELOC_NS32K_IMM_32,
- BFD_RELOC_NS32K_IMM_8_PCREL,
- BFD_RELOC_NS32K_IMM_16_PCREL,
- BFD_RELOC_NS32K_IMM_32_PCREL,
- BFD_RELOC_NS32K_DISP_8,
- BFD_RELOC_NS32K_DISP_16,
- BFD_RELOC_NS32K_DISP_32,
- BFD_RELOC_NS32K_DISP_8_PCREL,
- BFD_RELOC_NS32K_DISP_16_PCREL,
- BFD_RELOC_NS32K_DISP_32_PCREL,
-
-/* PDP11 relocations */
- BFD_RELOC_PDP11_DISP_8_PCREL,
- BFD_RELOC_PDP11_DISP_6_PCREL,
-
-/* Picojava relocs. Not all of these appear in object files. */
- BFD_RELOC_PJ_CODE_HI16,
- BFD_RELOC_PJ_CODE_LO16,
- BFD_RELOC_PJ_CODE_DIR16,
- BFD_RELOC_PJ_CODE_DIR32,
- BFD_RELOC_PJ_CODE_REL16,
- BFD_RELOC_PJ_CODE_REL32,
-
-/* Power(rs6000) and PowerPC relocations. */
- BFD_RELOC_PPC_B26,
- BFD_RELOC_PPC_BA26,
- BFD_RELOC_PPC_TOC16,
- BFD_RELOC_PPC_B16,
- BFD_RELOC_PPC_B16_BRTAKEN,
- BFD_RELOC_PPC_B16_BRNTAKEN,
- BFD_RELOC_PPC_BA16,
- BFD_RELOC_PPC_BA16_BRTAKEN,
- BFD_RELOC_PPC_BA16_BRNTAKEN,
- BFD_RELOC_PPC_COPY,
- BFD_RELOC_PPC_GLOB_DAT,
- BFD_RELOC_PPC_JMP_SLOT,
- BFD_RELOC_PPC_RELATIVE,
- BFD_RELOC_PPC_LOCAL24PC,
- BFD_RELOC_PPC_EMB_NADDR32,
- BFD_RELOC_PPC_EMB_NADDR16,
- BFD_RELOC_PPC_EMB_NADDR16_LO,
- BFD_RELOC_PPC_EMB_NADDR16_HI,
- BFD_RELOC_PPC_EMB_NADDR16_HA,
- BFD_RELOC_PPC_EMB_SDAI16,
- BFD_RELOC_PPC_EMB_SDA2I16,
- BFD_RELOC_PPC_EMB_SDA2REL,
- BFD_RELOC_PPC_EMB_SDA21,
- BFD_RELOC_PPC_EMB_MRKREF,
- BFD_RELOC_PPC_EMB_RELSEC16,
- BFD_RELOC_PPC_EMB_RELST_LO,
- BFD_RELOC_PPC_EMB_RELST_HI,
- BFD_RELOC_PPC_EMB_RELST_HA,
- BFD_RELOC_PPC_EMB_BIT_FLD,
- BFD_RELOC_PPC_EMB_RELSDA,
- BFD_RELOC_PPC_VLE_REL8,
- BFD_RELOC_PPC_VLE_REL15,
- BFD_RELOC_PPC_VLE_REL24,
- BFD_RELOC_PPC_VLE_LO16A,
- BFD_RELOC_PPC_VLE_LO16D,
- BFD_RELOC_PPC_VLE_HI16A,
- BFD_RELOC_PPC_VLE_HI16D,
- BFD_RELOC_PPC_VLE_HA16A,
- BFD_RELOC_PPC_VLE_HA16D,
- BFD_RELOC_PPC_VLE_SDA21,
- BFD_RELOC_PPC_VLE_SDA21_LO,
- BFD_RELOC_PPC_VLE_SDAREL_LO16A,
- BFD_RELOC_PPC_VLE_SDAREL_LO16D,
- BFD_RELOC_PPC_VLE_SDAREL_HI16A,
- BFD_RELOC_PPC_VLE_SDAREL_HI16D,
- BFD_RELOC_PPC_VLE_SDAREL_HA16A,
- BFD_RELOC_PPC_VLE_SDAREL_HA16D,
- BFD_RELOC_PPC_16DX_HA,
- BFD_RELOC_PPC_REL16DX_HA,
- BFD_RELOC_PPC64_HIGHER,
- BFD_RELOC_PPC64_HIGHER_S,
- BFD_RELOC_PPC64_HIGHEST,
- BFD_RELOC_PPC64_HIGHEST_S,
- BFD_RELOC_PPC64_TOC16_LO,
- BFD_RELOC_PPC64_TOC16_HI,
- BFD_RELOC_PPC64_TOC16_HA,
- BFD_RELOC_PPC64_TOC,
- BFD_RELOC_PPC64_PLTGOT16,
- BFD_RELOC_PPC64_PLTGOT16_LO,
- BFD_RELOC_PPC64_PLTGOT16_HI,
- BFD_RELOC_PPC64_PLTGOT16_HA,
- BFD_RELOC_PPC64_ADDR16_DS,
- BFD_RELOC_PPC64_ADDR16_LO_DS,
- BFD_RELOC_PPC64_GOT16_DS,
- BFD_RELOC_PPC64_GOT16_LO_DS,
- BFD_RELOC_PPC64_PLT16_LO_DS,
- BFD_RELOC_PPC64_SECTOFF_DS,
- BFD_RELOC_PPC64_SECTOFF_LO_DS,
- BFD_RELOC_PPC64_TOC16_DS,
- BFD_RELOC_PPC64_TOC16_LO_DS,
- BFD_RELOC_PPC64_PLTGOT16_DS,
- BFD_RELOC_PPC64_PLTGOT16_LO_DS,
- BFD_RELOC_PPC64_ADDR16_HIGH,
- BFD_RELOC_PPC64_ADDR16_HIGHA,
- BFD_RELOC_PPC64_REL16_HIGH,
- BFD_RELOC_PPC64_REL16_HIGHA,
- BFD_RELOC_PPC64_REL16_HIGHER,
- BFD_RELOC_PPC64_REL16_HIGHERA,
- BFD_RELOC_PPC64_REL16_HIGHEST,
- BFD_RELOC_PPC64_REL16_HIGHESTA,
- BFD_RELOC_PPC64_ADDR64_LOCAL,
- BFD_RELOC_PPC64_ENTRY,
- BFD_RELOC_PPC64_REL24_NOTOC,
-
-/* PowerPC and PowerPC64 thread-local storage relocations. */
- BFD_RELOC_PPC_TLS,
- BFD_RELOC_PPC_TLSGD,
- BFD_RELOC_PPC_TLSLD,
- BFD_RELOC_PPC_DTPMOD,
- BFD_RELOC_PPC_TPREL16,
- BFD_RELOC_PPC_TPREL16_LO,
- BFD_RELOC_PPC_TPREL16_HI,
- BFD_RELOC_PPC_TPREL16_HA,
- BFD_RELOC_PPC_TPREL,
- BFD_RELOC_PPC_DTPREL16,
- BFD_RELOC_PPC_DTPREL16_LO,
- BFD_RELOC_PPC_DTPREL16_HI,
- BFD_RELOC_PPC_DTPREL16_HA,
- BFD_RELOC_PPC_DTPREL,
- BFD_RELOC_PPC_GOT_TLSGD16,
- BFD_RELOC_PPC_GOT_TLSGD16_LO,
- BFD_RELOC_PPC_GOT_TLSGD16_HI,
- BFD_RELOC_PPC_GOT_TLSGD16_HA,
- BFD_RELOC_PPC_GOT_TLSLD16,
- BFD_RELOC_PPC_GOT_TLSLD16_LO,
- BFD_RELOC_PPC_GOT_TLSLD16_HI,
- BFD_RELOC_PPC_GOT_TLSLD16_HA,
- BFD_RELOC_PPC_GOT_TPREL16,
- BFD_RELOC_PPC_GOT_TPREL16_LO,
- BFD_RELOC_PPC_GOT_TPREL16_HI,
- BFD_RELOC_PPC_GOT_TPREL16_HA,
- BFD_RELOC_PPC_GOT_DTPREL16,
- BFD_RELOC_PPC_GOT_DTPREL16_LO,
- BFD_RELOC_PPC_GOT_DTPREL16_HI,
- BFD_RELOC_PPC_GOT_DTPREL16_HA,
- BFD_RELOC_PPC64_TPREL16_DS,
- BFD_RELOC_PPC64_TPREL16_LO_DS,
- BFD_RELOC_PPC64_TPREL16_HIGHER,
- BFD_RELOC_PPC64_TPREL16_HIGHERA,
- BFD_RELOC_PPC64_TPREL16_HIGHEST,
- BFD_RELOC_PPC64_TPREL16_HIGHESTA,
- BFD_RELOC_PPC64_DTPREL16_DS,
- BFD_RELOC_PPC64_DTPREL16_LO_DS,
- BFD_RELOC_PPC64_DTPREL16_HIGHER,
- BFD_RELOC_PPC64_DTPREL16_HIGHERA,
- BFD_RELOC_PPC64_DTPREL16_HIGHEST,
- BFD_RELOC_PPC64_DTPREL16_HIGHESTA,
- BFD_RELOC_PPC64_TPREL16_HIGH,
- BFD_RELOC_PPC64_TPREL16_HIGHA,
- BFD_RELOC_PPC64_DTPREL16_HIGH,
- BFD_RELOC_PPC64_DTPREL16_HIGHA,
-
-/* IBM 370/390 relocations */
- BFD_RELOC_I370_D12,
-
-/* The type of reloc used to build a constructor table - at the moment
-probably a 32 bit wide absolute relocation, but the target can choose.
-It generally does map to one of the other relocation types. */
- BFD_RELOC_CTOR,
-
-/* ARM 26 bit pc-relative branch. The lowest two bits must be zero and are
-not stored in the instruction. */
- BFD_RELOC_ARM_PCREL_BRANCH,
-
-/* ARM 26 bit pc-relative branch. The lowest bit must be zero and is
-not stored in the instruction. The 2nd lowest bit comes from a 1 bit
-field in the instruction. */
- BFD_RELOC_ARM_PCREL_BLX,
-
-/* Thumb 22 bit pc-relative branch. The lowest bit must be zero and is
-not stored in the instruction. The 2nd lowest bit comes from a 1 bit
-field in the instruction. */
- BFD_RELOC_THUMB_PCREL_BLX,
-
-/* ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction. */
- BFD_RELOC_ARM_PCREL_CALL,
-
-/* ARM 26-bit pc-relative branch for B or conditional BL instruction. */
- BFD_RELOC_ARM_PCREL_JUMP,
-
-/* Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches.
-The lowest bit must be zero and is not stored in the instruction.
-Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an
-"nn" one smaller in all cases. Note further that BRANCH23
-corresponds to R_ARM_THM_CALL. */
- BFD_RELOC_THUMB_PCREL_BRANCH7,
- BFD_RELOC_THUMB_PCREL_BRANCH9,
- BFD_RELOC_THUMB_PCREL_BRANCH12,
- BFD_RELOC_THUMB_PCREL_BRANCH20,
- BFD_RELOC_THUMB_PCREL_BRANCH23,
- BFD_RELOC_THUMB_PCREL_BRANCH25,
-
-/* 12-bit immediate offset, used in ARM-format ldr and str instructions. */
- BFD_RELOC_ARM_OFFSET_IMM,
-
-/* 5-bit immediate offset, used in Thumb-format ldr and str instructions. */
- BFD_RELOC_ARM_THUMB_OFFSET,
-
-/* Pc-relative or absolute relocation depending on target. Used for
-entries in .init_array sections. */
- BFD_RELOC_ARM_TARGET1,
-
-/* Read-only segment base relative address. */
- BFD_RELOC_ARM_ROSEGREL32,
-
-/* Data segment base relative address. */
- BFD_RELOC_ARM_SBREL32,
-
-/* This reloc is used for references to RTTI data from exception handling
-tables. The actual definition depends on the target. It may be a
-pc-relative or some form of GOT-indirect relocation. */
- BFD_RELOC_ARM_TARGET2,
-
-/* 31-bit PC relative address. */
- BFD_RELOC_ARM_PREL31,
-
-/* Low and High halfword relocations for MOVW and MOVT instructions. */
- BFD_RELOC_ARM_MOVW,
- BFD_RELOC_ARM_MOVT,
- BFD_RELOC_ARM_MOVW_PCREL,
- BFD_RELOC_ARM_MOVT_PCREL,
- BFD_RELOC_ARM_THUMB_MOVW,
- BFD_RELOC_ARM_THUMB_MOVT,
- BFD_RELOC_ARM_THUMB_MOVW_PCREL,
- BFD_RELOC_ARM_THUMB_MOVT_PCREL,
-
-/* ARM FDPIC specific relocations. */
- BFD_RELOC_ARM_GOTFUNCDESC,
- BFD_RELOC_ARM_GOTOFFFUNCDESC,
- BFD_RELOC_ARM_FUNCDESC,
- BFD_RELOC_ARM_FUNCDESC_VALUE,
- BFD_RELOC_ARM_TLS_GD32_FDPIC,
- BFD_RELOC_ARM_TLS_LDM32_FDPIC,
- BFD_RELOC_ARM_TLS_IE32_FDPIC,
-
-/* Relocations for setting up GOTs and PLTs for shared libraries. */
- BFD_RELOC_ARM_JUMP_SLOT,
- BFD_RELOC_ARM_GLOB_DAT,
- BFD_RELOC_ARM_GOT32,
- BFD_RELOC_ARM_PLT32,
- BFD_RELOC_ARM_RELATIVE,
- BFD_RELOC_ARM_GOTOFF,
- BFD_RELOC_ARM_GOTPC,
- BFD_RELOC_ARM_GOT_PREL,
-
-/* ARM thread-local storage relocations. */
- BFD_RELOC_ARM_TLS_GD32,
- BFD_RELOC_ARM_TLS_LDO32,
- BFD_RELOC_ARM_TLS_LDM32,
- BFD_RELOC_ARM_TLS_DTPOFF32,
- BFD_RELOC_ARM_TLS_DTPMOD32,
- BFD_RELOC_ARM_TLS_TPOFF32,
- BFD_RELOC_ARM_TLS_IE32,
- BFD_RELOC_ARM_TLS_LE32,
- BFD_RELOC_ARM_TLS_GOTDESC,
- BFD_RELOC_ARM_TLS_CALL,
- BFD_RELOC_ARM_THM_TLS_CALL,
- BFD_RELOC_ARM_TLS_DESCSEQ,
- BFD_RELOC_ARM_THM_TLS_DESCSEQ,
- BFD_RELOC_ARM_TLS_DESC,
-
-/* ARM group relocations. */
- BFD_RELOC_ARM_ALU_PC_G0_NC,
- BFD_RELOC_ARM_ALU_PC_G0,
- BFD_RELOC_ARM_ALU_PC_G1_NC,
- BFD_RELOC_ARM_ALU_PC_G1,
- BFD_RELOC_ARM_ALU_PC_G2,
- BFD_RELOC_ARM_LDR_PC_G0,
- BFD_RELOC_ARM_LDR_PC_G1,
- BFD_RELOC_ARM_LDR_PC_G2,
- BFD_RELOC_ARM_LDRS_PC_G0,
- BFD_RELOC_ARM_LDRS_PC_G1,
- BFD_RELOC_ARM_LDRS_PC_G2,
- BFD_RELOC_ARM_LDC_PC_G0,
- BFD_RELOC_ARM_LDC_PC_G1,
- BFD_RELOC_ARM_LDC_PC_G2,
- BFD_RELOC_ARM_ALU_SB_G0_NC,
- BFD_RELOC_ARM_ALU_SB_G0,
- BFD_RELOC_ARM_ALU_SB_G1_NC,
- BFD_RELOC_ARM_ALU_SB_G1,
- BFD_RELOC_ARM_ALU_SB_G2,
- BFD_RELOC_ARM_LDR_SB_G0,
- BFD_RELOC_ARM_LDR_SB_G1,
- BFD_RELOC_ARM_LDR_SB_G2,
- BFD_RELOC_ARM_LDRS_SB_G0,
- BFD_RELOC_ARM_LDRS_SB_G1,
- BFD_RELOC_ARM_LDRS_SB_G2,
- BFD_RELOC_ARM_LDC_SB_G0,
- BFD_RELOC_ARM_LDC_SB_G1,
- BFD_RELOC_ARM_LDC_SB_G2,
-
-/* Annotation of BX instructions. */
- BFD_RELOC_ARM_V4BX,
-
-/* ARM support for STT_GNU_IFUNC. */
- BFD_RELOC_ARM_IRELATIVE,
-
-/* Thumb1 relocations to support execute-only code. */
- BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC,
- BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC,
- BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC,
- BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC,
-
-/* These relocs are only used within the ARM assembler. They are not
-(at present) written to any object files. */
- BFD_RELOC_ARM_IMMEDIATE,
- BFD_RELOC_ARM_ADRL_IMMEDIATE,
- BFD_RELOC_ARM_T32_IMMEDIATE,
- BFD_RELOC_ARM_T32_ADD_IMM,
- BFD_RELOC_ARM_T32_IMM12,
- BFD_RELOC_ARM_T32_ADD_PC12,
- BFD_RELOC_ARM_SHIFT_IMM,
- BFD_RELOC_ARM_SMC,
- BFD_RELOC_ARM_HVC,
- BFD_RELOC_ARM_SWI,
- BFD_RELOC_ARM_MULTI,
- BFD_RELOC_ARM_CP_OFF_IMM,
- BFD_RELOC_ARM_CP_OFF_IMM_S2,
- BFD_RELOC_ARM_T32_CP_OFF_IMM,
- BFD_RELOC_ARM_T32_CP_OFF_IMM_S2,
- BFD_RELOC_ARM_ADR_IMM,
- BFD_RELOC_ARM_LDR_IMM,
- BFD_RELOC_ARM_LITERAL,
- BFD_RELOC_ARM_IN_POOL,
- BFD_RELOC_ARM_OFFSET_IMM8,
- BFD_RELOC_ARM_T32_OFFSET_U8,
- BFD_RELOC_ARM_T32_OFFSET_IMM,
- BFD_RELOC_ARM_HWLITERAL,
- BFD_RELOC_ARM_THUMB_ADD,
- BFD_RELOC_ARM_THUMB_IMM,
- BFD_RELOC_ARM_THUMB_SHIFT,
-
-/* Renesas / SuperH SH relocs. Not all of these appear in object files. */
- BFD_RELOC_SH_PCDISP8BY2,
- BFD_RELOC_SH_PCDISP12BY2,
- BFD_RELOC_SH_IMM3,
- BFD_RELOC_SH_IMM3U,
- BFD_RELOC_SH_DISP12,
- BFD_RELOC_SH_DISP12BY2,
- BFD_RELOC_SH_DISP12BY4,
- BFD_RELOC_SH_DISP12BY8,
- BFD_RELOC_SH_DISP20,
- BFD_RELOC_SH_DISP20BY8,
- BFD_RELOC_SH_IMM4,
- BFD_RELOC_SH_IMM4BY2,
- BFD_RELOC_SH_IMM4BY4,
- BFD_RELOC_SH_IMM8,
- BFD_RELOC_SH_IMM8BY2,
- BFD_RELOC_SH_IMM8BY4,
- BFD_RELOC_SH_PCRELIMM8BY2,
- BFD_RELOC_SH_PCRELIMM8BY4,
- BFD_RELOC_SH_SWITCH16,
- BFD_RELOC_SH_SWITCH32,
- BFD_RELOC_SH_USES,
- BFD_RELOC_SH_COUNT,
- BFD_RELOC_SH_ALIGN,
- BFD_RELOC_SH_CODE,
- BFD_RELOC_SH_DATA,
- BFD_RELOC_SH_LABEL,
- BFD_RELOC_SH_LOOP_START,
- BFD_RELOC_SH_LOOP_END,
- BFD_RELOC_SH_COPY,
- BFD_RELOC_SH_GLOB_DAT,
- BFD_RELOC_SH_JMP_SLOT,
- BFD_RELOC_SH_RELATIVE,
- BFD_RELOC_SH_GOTPC,
- BFD_RELOC_SH_GOT_LOW16,
- BFD_RELOC_SH_GOT_MEDLOW16,
- BFD_RELOC_SH_GOT_MEDHI16,
- BFD_RELOC_SH_GOT_HI16,
- BFD_RELOC_SH_GOTPLT_LOW16,
- BFD_RELOC_SH_GOTPLT_MEDLOW16,
- BFD_RELOC_SH_GOTPLT_MEDHI16,
- BFD_RELOC_SH_GOTPLT_HI16,
- BFD_RELOC_SH_PLT_LOW16,
- BFD_RELOC_SH_PLT_MEDLOW16,
- BFD_RELOC_SH_PLT_MEDHI16,
- BFD_RELOC_SH_PLT_HI16,
- BFD_RELOC_SH_GOTOFF_LOW16,
- BFD_RELOC_SH_GOTOFF_MEDLOW16,
- BFD_RELOC_SH_GOTOFF_MEDHI16,
- BFD_RELOC_SH_GOTOFF_HI16,
- BFD_RELOC_SH_GOTPC_LOW16,
- BFD_RELOC_SH_GOTPC_MEDLOW16,
- BFD_RELOC_SH_GOTPC_MEDHI16,
- BFD_RELOC_SH_GOTPC_HI16,
- BFD_RELOC_SH_COPY64,
- BFD_RELOC_SH_GLOB_DAT64,
- BFD_RELOC_SH_JMP_SLOT64,
- BFD_RELOC_SH_RELATIVE64,
- BFD_RELOC_SH_GOT10BY4,
- BFD_RELOC_SH_GOT10BY8,
- BFD_RELOC_SH_GOTPLT10BY4,
- BFD_RELOC_SH_GOTPLT10BY8,
- BFD_RELOC_SH_GOTPLT32,
- BFD_RELOC_SH_SHMEDIA_CODE,
- BFD_RELOC_SH_IMMU5,
- BFD_RELOC_SH_IMMS6,
- BFD_RELOC_SH_IMMS6BY32,
- BFD_RELOC_SH_IMMU6,
- BFD_RELOC_SH_IMMS10,
- BFD_RELOC_SH_IMMS10BY2,
- BFD_RELOC_SH_IMMS10BY4,
- BFD_RELOC_SH_IMMS10BY8,
- BFD_RELOC_SH_IMMS16,
- BFD_RELOC_SH_IMMU16,
- BFD_RELOC_SH_IMM_LOW16,
- BFD_RELOC_SH_IMM_LOW16_PCREL,
- BFD_RELOC_SH_IMM_MEDLOW16,
- BFD_RELOC_SH_IMM_MEDLOW16_PCREL,
- BFD_RELOC_SH_IMM_MEDHI16,
- BFD_RELOC_SH_IMM_MEDHI16_PCREL,
- BFD_RELOC_SH_IMM_HI16,
- BFD_RELOC_SH_IMM_HI16_PCREL,
- BFD_RELOC_SH_PT_16,
- BFD_RELOC_SH_TLS_GD_32,
- BFD_RELOC_SH_TLS_LD_32,
- BFD_RELOC_SH_TLS_LDO_32,
- BFD_RELOC_SH_TLS_IE_32,
- BFD_RELOC_SH_TLS_LE_32,
- BFD_RELOC_SH_TLS_DTPMOD32,
- BFD_RELOC_SH_TLS_DTPOFF32,
- BFD_RELOC_SH_TLS_TPOFF32,
- BFD_RELOC_SH_GOT20,
- BFD_RELOC_SH_GOTOFF20,
- BFD_RELOC_SH_GOTFUNCDESC,
- BFD_RELOC_SH_GOTFUNCDESC20,
- BFD_RELOC_SH_GOTOFFFUNCDESC,
- BFD_RELOC_SH_GOTOFFFUNCDESC20,
- BFD_RELOC_SH_FUNCDESC,
-
-/* ARC relocs. */
- BFD_RELOC_ARC_NONE,
- BFD_RELOC_ARC_8,
- BFD_RELOC_ARC_16,
- BFD_RELOC_ARC_24,
- BFD_RELOC_ARC_32,
- BFD_RELOC_ARC_N8,
- BFD_RELOC_ARC_N16,
- BFD_RELOC_ARC_N24,
- BFD_RELOC_ARC_N32,
- BFD_RELOC_ARC_SDA,
- BFD_RELOC_ARC_SECTOFF,
- BFD_RELOC_ARC_S21H_PCREL,
- BFD_RELOC_ARC_S21W_PCREL,
- BFD_RELOC_ARC_S25H_PCREL,
- BFD_RELOC_ARC_S25W_PCREL,
- BFD_RELOC_ARC_SDA32,
- BFD_RELOC_ARC_SDA_LDST,
- BFD_RELOC_ARC_SDA_LDST1,
- BFD_RELOC_ARC_SDA_LDST2,
- BFD_RELOC_ARC_SDA16_LD,
- BFD_RELOC_ARC_SDA16_LD1,
- BFD_RELOC_ARC_SDA16_LD2,
- BFD_RELOC_ARC_S13_PCREL,
- BFD_RELOC_ARC_W,
- BFD_RELOC_ARC_32_ME,
- BFD_RELOC_ARC_32_ME_S,
- BFD_RELOC_ARC_N32_ME,
- BFD_RELOC_ARC_SECTOFF_ME,
- BFD_RELOC_ARC_SDA32_ME,
- BFD_RELOC_ARC_W_ME,
- BFD_RELOC_AC_SECTOFF_U8,
- BFD_RELOC_AC_SECTOFF_U8_1,
- BFD_RELOC_AC_SECTOFF_U8_2,
- BFD_RELOC_AC_SECTOFF_S9,
- BFD_RELOC_AC_SECTOFF_S9_1,
- BFD_RELOC_AC_SECTOFF_S9_2,
- BFD_RELOC_ARC_SECTOFF_ME_1,
- BFD_RELOC_ARC_SECTOFF_ME_2,
- BFD_RELOC_ARC_SECTOFF_1,
- BFD_RELOC_ARC_SECTOFF_2,
- BFD_RELOC_ARC_SDA_12,
- BFD_RELOC_ARC_SDA16_ST2,
- BFD_RELOC_ARC_32_PCREL,
- BFD_RELOC_ARC_PC32,
- BFD_RELOC_ARC_GOT32,
- BFD_RELOC_ARC_GOTPC32,
- BFD_RELOC_ARC_PLT32,
- BFD_RELOC_ARC_COPY,
- BFD_RELOC_ARC_GLOB_DAT,
- BFD_RELOC_ARC_JMP_SLOT,
- BFD_RELOC_ARC_RELATIVE,
- BFD_RELOC_ARC_GOTOFF,
- BFD_RELOC_ARC_GOTPC,
- BFD_RELOC_ARC_S21W_PCREL_PLT,
- BFD_RELOC_ARC_S25H_PCREL_PLT,
- BFD_RELOC_ARC_TLS_DTPMOD,
- BFD_RELOC_ARC_TLS_TPOFF,
- BFD_RELOC_ARC_TLS_GD_GOT,
- BFD_RELOC_ARC_TLS_GD_LD,
- BFD_RELOC_ARC_TLS_GD_CALL,
- BFD_RELOC_ARC_TLS_IE_GOT,
- BFD_RELOC_ARC_TLS_DTPOFF,
- BFD_RELOC_ARC_TLS_DTPOFF_S9,
- BFD_RELOC_ARC_TLS_LE_S9,
- BFD_RELOC_ARC_TLS_LE_32,
- BFD_RELOC_ARC_S25W_PCREL_PLT,
- BFD_RELOC_ARC_S21H_PCREL_PLT,
- BFD_RELOC_ARC_NPS_CMEM16,
- BFD_RELOC_ARC_JLI_SECTOFF,
-
-/* ADI Blackfin 16 bit immediate absolute reloc. */
- BFD_RELOC_BFIN_16_IMM,
-
-/* ADI Blackfin 16 bit immediate absolute reloc higher 16 bits. */
- BFD_RELOC_BFIN_16_HIGH,
-
-/* ADI Blackfin 'a' part of LSETUP. */
- BFD_RELOC_BFIN_4_PCREL,
-
-/* ADI Blackfin. */
- BFD_RELOC_BFIN_5_PCREL,
-
-/* ADI Blackfin 16 bit immediate absolute reloc lower 16 bits. */
- BFD_RELOC_BFIN_16_LOW,
-
-/* ADI Blackfin. */
- BFD_RELOC_BFIN_10_PCREL,
-
-/* ADI Blackfin 'b' part of LSETUP. */
- BFD_RELOC_BFIN_11_PCREL,
-
-/* ADI Blackfin. */
- BFD_RELOC_BFIN_12_PCREL_JUMP,
-
-/* ADI Blackfin Short jump, pcrel. */
- BFD_RELOC_BFIN_12_PCREL_JUMP_S,
-
-/* ADI Blackfin Call.x not implemented. */
- BFD_RELOC_BFIN_24_PCREL_CALL_X,
-
-/* ADI Blackfin Long Jump pcrel. */
- BFD_RELOC_BFIN_24_PCREL_JUMP_L,
-
-/* ADI Blackfin FD-PIC relocations. */
- BFD_RELOC_BFIN_GOT17M4,
- BFD_RELOC_BFIN_GOTHI,
- BFD_RELOC_BFIN_GOTLO,
- BFD_RELOC_BFIN_FUNCDESC,
- BFD_RELOC_BFIN_FUNCDESC_GOT17M4,
- BFD_RELOC_BFIN_FUNCDESC_GOTHI,
- BFD_RELOC_BFIN_FUNCDESC_GOTLO,
- BFD_RELOC_BFIN_FUNCDESC_VALUE,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO,
- BFD_RELOC_BFIN_GOTOFF17M4,
- BFD_RELOC_BFIN_GOTOFFHI,
- BFD_RELOC_BFIN_GOTOFFLO,
-
-/* ADI Blackfin GOT relocation. */
- BFD_RELOC_BFIN_GOT,
-
-/* ADI Blackfin PLTPC relocation. */
- BFD_RELOC_BFIN_PLTPC,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_PUSH,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_CONST,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_ADD,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_SUB,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_MULT,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_DIV,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_MOD,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LSHIFT,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_RSHIFT,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_AND,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_OR,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_XOR,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LAND,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LOR,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LEN,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_NEG,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_COMP,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_PAGE,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_HWPAGE,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_ADDR,
-
-/* Mitsubishi D10V relocs.
-This is a 10-bit reloc with the right 2 bits
-assumed to be 0. */
- BFD_RELOC_D10V_10_PCREL_R,
-
-/* Mitsubishi D10V relocs.
-This is a 10-bit reloc with the right 2 bits
-assumed to be 0. This is the same as the previous reloc
-except it is in the left container, i.e.,
-shifted left 15 bits. */
- BFD_RELOC_D10V_10_PCREL_L,
-
-/* This is an 18-bit reloc with the right 2 bits
-assumed to be 0. */
- BFD_RELOC_D10V_18,
-
-/* This is an 18-bit reloc with the right 2 bits
-assumed to be 0. */
- BFD_RELOC_D10V_18_PCREL,
-
-/* Mitsubishi D30V relocs.
-This is a 6-bit absolute reloc. */
- BFD_RELOC_D30V_6,
-
-/* This is a 6-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_9_PCREL,
-
-/* This is a 6-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
- BFD_RELOC_D30V_9_PCREL_R,
-
-/* This is a 12-bit absolute reloc with the
-right 3 bitsassumed to be 0. */
- BFD_RELOC_D30V_15,
-
-/* This is a 12-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_15_PCREL,
-
-/* This is a 12-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
- BFD_RELOC_D30V_15_PCREL_R,
-
-/* This is an 18-bit absolute reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_21,
-
-/* This is an 18-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_21_PCREL,
-
-/* This is an 18-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
- BFD_RELOC_D30V_21_PCREL_R,
-
-/* This is a 32-bit absolute reloc. */
- BFD_RELOC_D30V_32,
-
-/* This is a 32-bit pc-relative reloc. */
- BFD_RELOC_D30V_32_PCREL,
-
-/* DLX relocs */
- BFD_RELOC_DLX_HI16_S,
-
-/* DLX relocs */
- BFD_RELOC_DLX_LO16,
-
-/* DLX relocs */
- BFD_RELOC_DLX_JMP26,
-
-/* Renesas M16C/M32C Relocations. */
- BFD_RELOC_M32C_HI8,
- BFD_RELOC_M32C_RL_JUMP,
- BFD_RELOC_M32C_RL_1ADDR,
- BFD_RELOC_M32C_RL_2ADDR,
-
-/* Renesas M32R (formerly Mitsubishi M32R) relocs.
-This is a 24 bit absolute address. */
- BFD_RELOC_M32R_24,
-
-/* This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0. */
- BFD_RELOC_M32R_10_PCREL,
-
-/* This is an 18-bit reloc with the right 2 bits assumed to be 0. */
- BFD_RELOC_M32R_18_PCREL,
-
-/* This is a 26-bit reloc with the right 2 bits assumed to be 0. */
- BFD_RELOC_M32R_26_PCREL,
-
-/* This is a 16-bit reloc containing the high 16 bits of an address
-used when the lower 16 bits are treated as unsigned. */
- BFD_RELOC_M32R_HI16_ULO,
-
-/* This is a 16-bit reloc containing the high 16 bits of an address
-used when the lower 16 bits are treated as signed. */
- BFD_RELOC_M32R_HI16_SLO,
-
-/* This is a 16-bit reloc containing the lower 16 bits of an address. */
- BFD_RELOC_M32R_LO16,
-
-/* This is a 16-bit reloc containing the small data area offset for use in
-add3, load, and store instructions. */
- BFD_RELOC_M32R_SDA16,
-
-/* For PIC. */
- BFD_RELOC_M32R_GOT24,
- BFD_RELOC_M32R_26_PLTREL,
- BFD_RELOC_M32R_COPY,
- BFD_RELOC_M32R_GLOB_DAT,
- BFD_RELOC_M32R_JMP_SLOT,
- BFD_RELOC_M32R_RELATIVE,
- BFD_RELOC_M32R_GOTOFF,
- BFD_RELOC_M32R_GOTOFF_HI_ULO,
- BFD_RELOC_M32R_GOTOFF_HI_SLO,
- BFD_RELOC_M32R_GOTOFF_LO,
- BFD_RELOC_M32R_GOTPC24,
- BFD_RELOC_M32R_GOT16_HI_ULO,
- BFD_RELOC_M32R_GOT16_HI_SLO,
- BFD_RELOC_M32R_GOT16_LO,
- BFD_RELOC_M32R_GOTPC_HI_ULO,
- BFD_RELOC_M32R_GOTPC_HI_SLO,
- BFD_RELOC_M32R_GOTPC_LO,
-
-/* NDS32 relocs.
-This is a 20 bit absolute address. */
- BFD_RELOC_NDS32_20,
-
-/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_9_PCREL,
-
-/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_WORD_9_PCREL,
-
-/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_15_PCREL,
-
-/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_17_PCREL,
-
-/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_25_PCREL,
-
-/* This is a 20-bit reloc containing the high 20 bits of an address
-used with the lower 12 bits */
- BFD_RELOC_NDS32_HI20,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift right by 3. This is used with ldi,sdi... */
- BFD_RELOC_NDS32_LO12S3,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 2. This is used with lwi,swi... */
- BFD_RELOC_NDS32_LO12S2,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 1. This is used with lhi,shi... */
- BFD_RELOC_NDS32_LO12S1,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 0. This is used with lbisbi... */
- BFD_RELOC_NDS32_LO12S0,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 0. This is only used with branch relaxations */
- BFD_RELOC_NDS32_LO12S0_ORI,
-
-/* This is a 15-bit reloc containing the small data area 18-bit signed offset
-and shift left by 3 for use in ldi, sdi... */
- BFD_RELOC_NDS32_SDA15S3,
-
-/* This is a 15-bit reloc containing the small data area 17-bit signed offset
-and shift left by 2 for use in lwi, swi... */
- BFD_RELOC_NDS32_SDA15S2,
-
-/* This is a 15-bit reloc containing the small data area 16-bit signed offset
-and shift left by 1 for use in lhi, shi... */
- BFD_RELOC_NDS32_SDA15S1,
-
-/* This is a 15-bit reloc containing the small data area 15-bit signed offset
-and shift left by 0 for use in lbi, sbi... */
- BFD_RELOC_NDS32_SDA15S0,
-
-/* This is a 16-bit reloc containing the small data area 16-bit signed offset
-and shift left by 3 */
- BFD_RELOC_NDS32_SDA16S3,
-
-/* This is a 17-bit reloc containing the small data area 17-bit signed offset
-and shift left by 2 for use in lwi.gp, swi.gp... */
- BFD_RELOC_NDS32_SDA17S2,
-
-/* This is a 18-bit reloc containing the small data area 18-bit signed offset
-and shift left by 1 for use in lhi.gp, shi.gp... */
- BFD_RELOC_NDS32_SDA18S1,
-
-/* This is a 19-bit reloc containing the small data area 19-bit signed offset
-and shift left by 0 for use in lbi.gp, sbi.gp... */
- BFD_RELOC_NDS32_SDA19S0,
-
-/* for PIC */
- BFD_RELOC_NDS32_GOT20,
- BFD_RELOC_NDS32_9_PLTREL,
- BFD_RELOC_NDS32_25_PLTREL,
- BFD_RELOC_NDS32_COPY,
- BFD_RELOC_NDS32_GLOB_DAT,
- BFD_RELOC_NDS32_JMP_SLOT,
- BFD_RELOC_NDS32_RELATIVE,
- BFD_RELOC_NDS32_GOTOFF,
- BFD_RELOC_NDS32_GOTOFF_HI20,
- BFD_RELOC_NDS32_GOTOFF_LO12,
- BFD_RELOC_NDS32_GOTPC20,
- BFD_RELOC_NDS32_GOT_HI20,
- BFD_RELOC_NDS32_GOT_LO12,
- BFD_RELOC_NDS32_GOTPC_HI20,
- BFD_RELOC_NDS32_GOTPC_LO12,
-
-/* for relax */
- BFD_RELOC_NDS32_INSN16,
- BFD_RELOC_NDS32_LABEL,
- BFD_RELOC_NDS32_LONGCALL1,
- BFD_RELOC_NDS32_LONGCALL2,
- BFD_RELOC_NDS32_LONGCALL3,
- BFD_RELOC_NDS32_LONGJUMP1,
- BFD_RELOC_NDS32_LONGJUMP2,
- BFD_RELOC_NDS32_LONGJUMP3,
- BFD_RELOC_NDS32_LOADSTORE,
- BFD_RELOC_NDS32_9_FIXED,
- BFD_RELOC_NDS32_15_FIXED,
- BFD_RELOC_NDS32_17_FIXED,
- BFD_RELOC_NDS32_25_FIXED,
- BFD_RELOC_NDS32_LONGCALL4,
- BFD_RELOC_NDS32_LONGCALL5,
- BFD_RELOC_NDS32_LONGCALL6,
- BFD_RELOC_NDS32_LONGJUMP4,
- BFD_RELOC_NDS32_LONGJUMP5,
- BFD_RELOC_NDS32_LONGJUMP6,
- BFD_RELOC_NDS32_LONGJUMP7,
-
-/* for PIC */
- BFD_RELOC_NDS32_PLTREL_HI20,
- BFD_RELOC_NDS32_PLTREL_LO12,
- BFD_RELOC_NDS32_PLT_GOTREL_HI20,
- BFD_RELOC_NDS32_PLT_GOTREL_LO12,
-
-/* for floating point */
- BFD_RELOC_NDS32_SDA12S2_DP,
- BFD_RELOC_NDS32_SDA12S2_SP,
- BFD_RELOC_NDS32_LO12S2_DP,
- BFD_RELOC_NDS32_LO12S2_SP,
-
-/* for dwarf2 debug_line. */
- BFD_RELOC_NDS32_DWARF2_OP1,
- BFD_RELOC_NDS32_DWARF2_OP2,
- BFD_RELOC_NDS32_DWARF2_LEB,
-
-/* for eliminate 16-bit instructions */
- BFD_RELOC_NDS32_UPDATE_TA,
-
-/* for PIC object relaxation */
- BFD_RELOC_NDS32_PLT_GOTREL_LO20,
- BFD_RELOC_NDS32_PLT_GOTREL_LO15,
- BFD_RELOC_NDS32_PLT_GOTREL_LO19,
- BFD_RELOC_NDS32_GOT_LO15,
- BFD_RELOC_NDS32_GOT_LO19,
- BFD_RELOC_NDS32_GOTOFF_LO15,
- BFD_RELOC_NDS32_GOTOFF_LO19,
- BFD_RELOC_NDS32_GOT15S2,
- BFD_RELOC_NDS32_GOT17S2,
-
-/* NDS32 relocs.
-This is a 5 bit absolute address. */
- BFD_RELOC_NDS32_5,
-
-/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_10_UPCREL,
-
-/* If fp were omitted, fp can used as another gp. */
- BFD_RELOC_NDS32_SDA_FP7U2_RELA,
-
-/* relaxation relative relocation types */
- BFD_RELOC_NDS32_RELAX_ENTRY,
- BFD_RELOC_NDS32_GOT_SUFF,
- BFD_RELOC_NDS32_GOTOFF_SUFF,
- BFD_RELOC_NDS32_PLT_GOT_SUFF,
- BFD_RELOC_NDS32_MULCALL_SUFF,
- BFD_RELOC_NDS32_PTR,
- BFD_RELOC_NDS32_PTR_COUNT,
- BFD_RELOC_NDS32_PTR_RESOLVED,
- BFD_RELOC_NDS32_PLTBLOCK,
- BFD_RELOC_NDS32_RELAX_REGION_BEGIN,
- BFD_RELOC_NDS32_RELAX_REGION_END,
- BFD_RELOC_NDS32_MINUEND,
- BFD_RELOC_NDS32_SUBTRAHEND,
- BFD_RELOC_NDS32_DIFF8,
- BFD_RELOC_NDS32_DIFF16,
- BFD_RELOC_NDS32_DIFF32,
- BFD_RELOC_NDS32_DIFF_ULEB128,
- BFD_RELOC_NDS32_EMPTY,
-
-/* This is a 25 bit absolute address. */
- BFD_RELOC_NDS32_25_ABS,
-
-/* For ex9 and ifc using. */
- BFD_RELOC_NDS32_DATA,
- BFD_RELOC_NDS32_TRAN,
- BFD_RELOC_NDS32_17IFC_PCREL,
- BFD_RELOC_NDS32_10IFCU_PCREL,
-
-/* For TLS. */
- BFD_RELOC_NDS32_TPOFF,
- BFD_RELOC_NDS32_GOTTPOFF,
- BFD_RELOC_NDS32_TLS_LE_HI20,
- BFD_RELOC_NDS32_TLS_LE_LO12,
- BFD_RELOC_NDS32_TLS_LE_20,
- BFD_RELOC_NDS32_TLS_LE_15S0,
- BFD_RELOC_NDS32_TLS_LE_15S1,
- BFD_RELOC_NDS32_TLS_LE_15S2,
- BFD_RELOC_NDS32_TLS_LE_ADD,
- BFD_RELOC_NDS32_TLS_LE_LS,
- BFD_RELOC_NDS32_TLS_IE_HI20,
- BFD_RELOC_NDS32_TLS_IE_LO12,
- BFD_RELOC_NDS32_TLS_IE_LO12S2,
- BFD_RELOC_NDS32_TLS_IEGP_HI20,
- BFD_RELOC_NDS32_TLS_IEGP_LO12,
- BFD_RELOC_NDS32_TLS_IEGP_LO12S2,
- BFD_RELOC_NDS32_TLS_IEGP_LW,
- BFD_RELOC_NDS32_TLS_DESC,
- BFD_RELOC_NDS32_TLS_DESC_HI20,
- BFD_RELOC_NDS32_TLS_DESC_LO12,
- BFD_RELOC_NDS32_TLS_DESC_20,
- BFD_RELOC_NDS32_TLS_DESC_SDA17S2,
- BFD_RELOC_NDS32_TLS_DESC_ADD,
- BFD_RELOC_NDS32_TLS_DESC_FUNC,
- BFD_RELOC_NDS32_TLS_DESC_CALL,
- BFD_RELOC_NDS32_TLS_DESC_MEM,
- BFD_RELOC_NDS32_REMOVE,
- BFD_RELOC_NDS32_GROUP,
-
-/* For floating load store relaxation. */
- BFD_RELOC_NDS32_LSI,
-
-/* This is a 9-bit reloc */
- BFD_RELOC_V850_9_PCREL,
-
-/* This is a 22-bit reloc */
- BFD_RELOC_V850_22_PCREL,
-
-/* This is a 16 bit offset from the short data area pointer. */
- BFD_RELOC_V850_SDA_16_16_OFFSET,
-
-/* This is a 16 bit offset (of which only 15 bits are used) from the
-short data area pointer. */
- BFD_RELOC_V850_SDA_15_16_OFFSET,
-
-/* This is a 16 bit offset from the zero data area pointer. */
- BFD_RELOC_V850_ZDA_16_16_OFFSET,
-
-/* This is a 16 bit offset (of which only 15 bits are used) from the
-zero data area pointer. */
- BFD_RELOC_V850_ZDA_15_16_OFFSET,
-
-/* This is an 8 bit offset (of which only 6 bits are used) from the
-tiny data area pointer. */
- BFD_RELOC_V850_TDA_6_8_OFFSET,
-
-/* This is an 8bit offset (of which only 7 bits are used) from the tiny
-data area pointer. */
- BFD_RELOC_V850_TDA_7_8_OFFSET,
-
-/* This is a 7 bit offset from the tiny data area pointer. */
- BFD_RELOC_V850_TDA_7_7_OFFSET,
-
-/* This is a 16 bit offset from the tiny data area pointer. */
- BFD_RELOC_V850_TDA_16_16_OFFSET,
-
-/* This is a 5 bit offset (of which only 4 bits are used) from the tiny
-data area pointer. */
- BFD_RELOC_V850_TDA_4_5_OFFSET,
-
-/* This is a 4 bit offset from the tiny data area pointer. */
- BFD_RELOC_V850_TDA_4_4_OFFSET,
-
-/* This is a 16 bit offset from the short data area pointer, with the
-bits placed non-contiguously in the instruction. */
- BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET,
-
-/* This is a 16 bit offset from the zero data area pointer, with the
-bits placed non-contiguously in the instruction. */
- BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET,
-
-/* This is a 6 bit offset from the call table base pointer. */
- BFD_RELOC_V850_CALLT_6_7_OFFSET,
-
-/* This is a 16 bit offset from the call table base pointer. */
- BFD_RELOC_V850_CALLT_16_16_OFFSET,
-
-/* Used for relaxing indirect function calls. */
- BFD_RELOC_V850_LONGCALL,
-
-/* Used for relaxing indirect jumps. */
- BFD_RELOC_V850_LONGJUMP,
-
-/* Used to maintain alignment whilst relaxing. */
- BFD_RELOC_V850_ALIGN,
-
-/* This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu
-instructions. */
- BFD_RELOC_V850_LO16_SPLIT_OFFSET,
-
-/* This is a 16-bit reloc. */
- BFD_RELOC_V850_16_PCREL,
-
-/* This is a 17-bit reloc. */
- BFD_RELOC_V850_17_PCREL,
-
-/* This is a 23-bit reloc. */
- BFD_RELOC_V850_23,
-
-/* This is a 32-bit reloc. */
- BFD_RELOC_V850_32_PCREL,
-
-/* This is a 32-bit reloc. */
- BFD_RELOC_V850_32_ABS,
-
-/* This is a 16-bit reloc. */
- BFD_RELOC_V850_16_SPLIT_OFFSET,
-
-/* This is a 16-bit reloc. */
- BFD_RELOC_V850_16_S1,
-
-/* Low 16 bits. 16 bit shifted by 1. */
- BFD_RELOC_V850_LO16_S1,
-
-/* This is a 16 bit offset from the call table base pointer. */
- BFD_RELOC_V850_CALLT_15_16_OFFSET,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_GOTPCREL,
-
-/* DSO relocations. */
- BFD_RELOC_V850_16_GOT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_GOT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_22_PLT_PCREL,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_PLT_PCREL,
-
-/* DSO relocations. */
- BFD_RELOC_V850_COPY,
-
-/* DSO relocations. */
- BFD_RELOC_V850_GLOB_DAT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_JMP_SLOT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_RELATIVE,
-
-/* DSO relocations. */
- BFD_RELOC_V850_16_GOTOFF,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_GOTOFF,
-
-/* start code. */
- BFD_RELOC_V850_CODE,
-
-/* start data in text. */
- BFD_RELOC_V850_DATA,
-
-/* This is a 8bit DP reloc for the tms320c30, where the most
-significant 8 bits of a 24 bit word are placed into the least
-significant 8 bits of the opcode. */
- BFD_RELOC_TIC30_LDP,
-
-/* This is a 7bit reloc for the tms320c54x, where the least
-significant 7 bits of a 16 bit word are placed into the least
-significant 7 bits of the opcode. */
- BFD_RELOC_TIC54X_PARTLS7,
-
-/* This is a 9bit DP reloc for the tms320c54x, where the most
-significant 9 bits of a 16 bit word are placed into the least
-significant 9 bits of the opcode. */
- BFD_RELOC_TIC54X_PARTMS9,
-
-/* This is an extended address 23-bit reloc for the tms320c54x. */
- BFD_RELOC_TIC54X_23,
-
-/* This is a 16-bit reloc for the tms320c54x, where the least
-significant 16 bits of a 23-bit extended address are placed into
-the opcode. */
- BFD_RELOC_TIC54X_16_OF_23,
-
-/* This is a reloc for the tms320c54x, where the most
-significant 7 bits of a 23-bit extended address are placed into
-the opcode. */
- BFD_RELOC_TIC54X_MS7_OF_23,
-
-/* TMS320C6000 relocations. */
- BFD_RELOC_C6000_PCR_S21,
- BFD_RELOC_C6000_PCR_S12,
- BFD_RELOC_C6000_PCR_S10,
- BFD_RELOC_C6000_PCR_S7,
- BFD_RELOC_C6000_ABS_S16,
- BFD_RELOC_C6000_ABS_L16,
- BFD_RELOC_C6000_ABS_H16,
- BFD_RELOC_C6000_SBR_U15_B,
- BFD_RELOC_C6000_SBR_U15_H,
- BFD_RELOC_C6000_SBR_U15_W,
- BFD_RELOC_C6000_SBR_S16,
- BFD_RELOC_C6000_SBR_L16_B,
- BFD_RELOC_C6000_SBR_L16_H,
- BFD_RELOC_C6000_SBR_L16_W,
- BFD_RELOC_C6000_SBR_H16_B,
- BFD_RELOC_C6000_SBR_H16_H,
- BFD_RELOC_C6000_SBR_H16_W,
- BFD_RELOC_C6000_SBR_GOT_U15_W,
- BFD_RELOC_C6000_SBR_GOT_L16_W,
- BFD_RELOC_C6000_SBR_GOT_H16_W,
- BFD_RELOC_C6000_DSBT_INDEX,
- BFD_RELOC_C6000_PREL31,
- BFD_RELOC_C6000_COPY,
- BFD_RELOC_C6000_JUMP_SLOT,
- BFD_RELOC_C6000_EHTYPE,
- BFD_RELOC_C6000_PCR_H16,
- BFD_RELOC_C6000_PCR_L16,
- BFD_RELOC_C6000_ALIGN,
- BFD_RELOC_C6000_FPHEAD,
- BFD_RELOC_C6000_NOCMP,
-
-/* This is a 48 bit reloc for the FR30 that stores 32 bits. */
- BFD_RELOC_FR30_48,
-
-/* This is a 32 bit reloc for the FR30 that stores 20 bits split up into
-two sections. */
- BFD_RELOC_FR30_20,
-
-/* This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in
-4 bits. */
- BFD_RELOC_FR30_6_IN_4,
-
-/* This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset
-into 8 bits. */
- BFD_RELOC_FR30_8_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 9 bit short offset
-into 8 bits. */
- BFD_RELOC_FR30_9_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 10 bit word offset
-into 8 bits. */
- BFD_RELOC_FR30_10_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
-short offset into 8 bits. */
- BFD_RELOC_FR30_9_PCREL,
-
-/* This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative
-short offset into 11 bits. */
- BFD_RELOC_FR30_12_PCREL,
-
-/* Motorola Mcore relocations. */
- BFD_RELOC_MCORE_PCREL_IMM8BY4,
- BFD_RELOC_MCORE_PCREL_IMM11BY2,
- BFD_RELOC_MCORE_PCREL_IMM4BY2,
- BFD_RELOC_MCORE_PCREL_32,
- BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2,
- BFD_RELOC_MCORE_RVA,
-
-/* Toshiba Media Processor Relocations. */
- BFD_RELOC_MEP_8,
- BFD_RELOC_MEP_16,
- BFD_RELOC_MEP_32,
- BFD_RELOC_MEP_PCREL8A2,
- BFD_RELOC_MEP_PCREL12A2,
- BFD_RELOC_MEP_PCREL17A2,
- BFD_RELOC_MEP_PCREL24A2,
- BFD_RELOC_MEP_PCABS24A2,
- BFD_RELOC_MEP_LOW16,
- BFD_RELOC_MEP_HI16U,
- BFD_RELOC_MEP_HI16S,
- BFD_RELOC_MEP_GPREL,
- BFD_RELOC_MEP_TPREL,
- BFD_RELOC_MEP_TPREL7,
- BFD_RELOC_MEP_TPREL7A2,
- BFD_RELOC_MEP_TPREL7A4,
- BFD_RELOC_MEP_UIMM24,
- BFD_RELOC_MEP_ADDR24A4,
- BFD_RELOC_MEP_GNU_VTINHERIT,
- BFD_RELOC_MEP_GNU_VTENTRY,
-
-
-/* Imagination Technologies Meta relocations. */
- BFD_RELOC_METAG_HIADDR16,
- BFD_RELOC_METAG_LOADDR16,
- BFD_RELOC_METAG_RELBRANCH,
- BFD_RELOC_METAG_GETSETOFF,
- BFD_RELOC_METAG_HIOG,
- BFD_RELOC_METAG_LOOG,
- BFD_RELOC_METAG_REL8,
- BFD_RELOC_METAG_REL16,
- BFD_RELOC_METAG_HI16_GOTOFF,
- BFD_RELOC_METAG_LO16_GOTOFF,
- BFD_RELOC_METAG_GETSET_GOTOFF,
- BFD_RELOC_METAG_GETSET_GOT,
- BFD_RELOC_METAG_HI16_GOTPC,
- BFD_RELOC_METAG_LO16_GOTPC,
- BFD_RELOC_METAG_HI16_PLT,
- BFD_RELOC_METAG_LO16_PLT,
- BFD_RELOC_METAG_RELBRANCH_PLT,
- BFD_RELOC_METAG_GOTOFF,
- BFD_RELOC_METAG_PLT,
- BFD_RELOC_METAG_COPY,
- BFD_RELOC_METAG_JMP_SLOT,
- BFD_RELOC_METAG_RELATIVE,
- BFD_RELOC_METAG_GLOB_DAT,
- BFD_RELOC_METAG_TLS_GD,
- BFD_RELOC_METAG_TLS_LDM,
- BFD_RELOC_METAG_TLS_LDO_HI16,
- BFD_RELOC_METAG_TLS_LDO_LO16,
- BFD_RELOC_METAG_TLS_LDO,
- BFD_RELOC_METAG_TLS_IE,
- BFD_RELOC_METAG_TLS_IENONPIC,
- BFD_RELOC_METAG_TLS_IENONPIC_HI16,
- BFD_RELOC_METAG_TLS_IENONPIC_LO16,
- BFD_RELOC_METAG_TLS_TPOFF,
- BFD_RELOC_METAG_TLS_DTPMOD,
- BFD_RELOC_METAG_TLS_DTPOFF,
- BFD_RELOC_METAG_TLS_LE,
- BFD_RELOC_METAG_TLS_LE_HI16,
- BFD_RELOC_METAG_TLS_LE_LO16,
-
-/* These are relocations for the GETA instruction. */
- BFD_RELOC_MMIX_GETA,
- BFD_RELOC_MMIX_GETA_1,
- BFD_RELOC_MMIX_GETA_2,
- BFD_RELOC_MMIX_GETA_3,
-
-/* These are relocations for a conditional branch instruction. */
- BFD_RELOC_MMIX_CBRANCH,
- BFD_RELOC_MMIX_CBRANCH_J,
- BFD_RELOC_MMIX_CBRANCH_1,
- BFD_RELOC_MMIX_CBRANCH_2,
- BFD_RELOC_MMIX_CBRANCH_3,
-
-/* These are relocations for the PUSHJ instruction. */
- BFD_RELOC_MMIX_PUSHJ,
- BFD_RELOC_MMIX_PUSHJ_1,
- BFD_RELOC_MMIX_PUSHJ_2,
- BFD_RELOC_MMIX_PUSHJ_3,
- BFD_RELOC_MMIX_PUSHJ_STUBBABLE,
-
-/* These are relocations for the JMP instruction. */
- BFD_RELOC_MMIX_JMP,
- BFD_RELOC_MMIX_JMP_1,
- BFD_RELOC_MMIX_JMP_2,
- BFD_RELOC_MMIX_JMP_3,
-
-/* This is a relocation for a relative address as in a GETA instruction or
-a branch. */
- BFD_RELOC_MMIX_ADDR19,
-
-/* This is a relocation for a relative address as in a JMP instruction. */
- BFD_RELOC_MMIX_ADDR27,
-
-/* This is a relocation for an instruction field that may be a general
-register or a value 0..255. */
- BFD_RELOC_MMIX_REG_OR_BYTE,
-
-/* This is a relocation for an instruction field that may be a general
-register. */
- BFD_RELOC_MMIX_REG,
-
-/* This is a relocation for two instruction fields holding a register and
-an offset, the equivalent of the relocation. */
- BFD_RELOC_MMIX_BASE_PLUS_OFFSET,
-
-/* This relocation is an assertion that the expression is not allocated as
-a global register. It does not modify contents. */
- BFD_RELOC_MMIX_LOCAL,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit pc relative
-short offset into 7 bits. */
- BFD_RELOC_AVR_7_PCREL,
-
-/* This is a 16 bit reloc for the AVR that stores 13 bit pc relative
-short offset into 12 bits. */
- BFD_RELOC_AVR_13_PCREL,
-
-/* This is a 16 bit reloc for the AVR that stores 17 bit value (usually
-program memory address) into 16 bits. */
- BFD_RELOC_AVR_16_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
-data memory address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_LO8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of data memory address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HI8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of program memory address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HH8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of 32 bit value) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_MS8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(usually data memory address) into 8 bit immediate value of SUBI insn. */
- BFD_RELOC_AVR_LO8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 8 bit of data memory address) into 8 bit immediate value of
-SUBI insn. */
- BFD_RELOC_AVR_HI8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(most high 8 bit of program memory address) into 8 bit immediate value
-of LDI or SUBI insn. */
- BFD_RELOC_AVR_HH8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value (msb
-of 32 bit value) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_MS8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
-command address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_LO8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value
-(command address) into 8 bit immediate value of LDI insn. If the address
-is beyond the 128k boundary, the linker inserts a jump stub for this reloc
-in the lower 128k. */
- BFD_RELOC_AVR_LO8_LDI_GS,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of command address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HI8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of command address) into 8 bit immediate value of LDI insn. If the address
-is beyond the 128k boundary, the linker inserts a jump stub for this reloc
-below 128k. */
- BFD_RELOC_AVR_HI8_LDI_GS,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of command address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HH8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(usually command address) into 8 bit immediate value of SUBI insn. */
- BFD_RELOC_AVR_LO8_LDI_PM_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 8 bit of 16 bit command address) into 8 bit immediate value
-of SUBI insn. */
- BFD_RELOC_AVR_HI8_LDI_PM_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 6 bit of 22 bit command address) into 8 bit immediate
-value of SUBI insn. */
- BFD_RELOC_AVR_HH8_LDI_PM_NEG,
-
-/* This is a 32 bit reloc for the AVR that stores 23 bit value
-into 22 bits. */
- BFD_RELOC_AVR_CALL,
-
-/* This is a 16 bit reloc for the AVR that stores all needed bits
-for absolute addressing with ldi with overflow check to linktime */
- BFD_RELOC_AVR_LDI,
-
-/* This is a 6 bit reloc for the AVR that stores offset for ldd/std
-instructions */
- BFD_RELOC_AVR_6,
-
-/* This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
-instructions */
- BFD_RELOC_AVR_6_ADIW,
-
-/* This is a 8 bit reloc for the AVR that stores bits 0..7 of a symbol
-in .byte lo8(symbol) */
- BFD_RELOC_AVR_8_LO,
-
-/* This is a 8 bit reloc for the AVR that stores bits 8..15 of a symbol
-in .byte hi8(symbol) */
- BFD_RELOC_AVR_8_HI,
-
-/* This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol
-in .byte hlo8(symbol) */
- BFD_RELOC_AVR_8_HLO,
-
-/* AVR relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-second symbol so the linker can determine whether to adjust the field
-value. */
- BFD_RELOC_AVR_DIFF8,
- BFD_RELOC_AVR_DIFF16,
- BFD_RELOC_AVR_DIFF32,
-
-/* This is a 7 bit reloc for the AVR that stores SRAM address for 16bit
-lds and sts instructions supported only tiny core. */
- BFD_RELOC_AVR_LDS_STS_16,
-
-/* This is a 6 bit reloc for the AVR that stores an I/O register
-number for the IN and OUT instructions */
- BFD_RELOC_AVR_PORT6,
-
-/* This is a 5 bit reloc for the AVR that stores an I/O register
-number for the SBIC, SBIS, SBI and CBI instructions */
- BFD_RELOC_AVR_PORT5,
-
-/* RISC-V relocations. */
- BFD_RELOC_RISCV_HI20,
- BFD_RELOC_RISCV_PCREL_HI20,
- BFD_RELOC_RISCV_PCREL_LO12_I,
- BFD_RELOC_RISCV_PCREL_LO12_S,
- BFD_RELOC_RISCV_LO12_I,
- BFD_RELOC_RISCV_LO12_S,
- BFD_RELOC_RISCV_GPREL12_I,
- BFD_RELOC_RISCV_GPREL12_S,
- BFD_RELOC_RISCV_TPREL_HI20,
- BFD_RELOC_RISCV_TPREL_LO12_I,
- BFD_RELOC_RISCV_TPREL_LO12_S,
- BFD_RELOC_RISCV_TPREL_ADD,
- BFD_RELOC_RISCV_CALL,
- BFD_RELOC_RISCV_CALL_PLT,
- BFD_RELOC_RISCV_ADD8,
- BFD_RELOC_RISCV_ADD16,
- BFD_RELOC_RISCV_ADD32,
- BFD_RELOC_RISCV_ADD64,
- BFD_RELOC_RISCV_SUB8,
- BFD_RELOC_RISCV_SUB16,
- BFD_RELOC_RISCV_SUB32,
- BFD_RELOC_RISCV_SUB64,
- BFD_RELOC_RISCV_GOT_HI20,
- BFD_RELOC_RISCV_TLS_GOT_HI20,
- BFD_RELOC_RISCV_TLS_GD_HI20,
- BFD_RELOC_RISCV_JMP,
- BFD_RELOC_RISCV_TLS_DTPMOD32,
- BFD_RELOC_RISCV_TLS_DTPREL32,
- BFD_RELOC_RISCV_TLS_DTPMOD64,
- BFD_RELOC_RISCV_TLS_DTPREL64,
- BFD_RELOC_RISCV_TLS_TPREL32,
- BFD_RELOC_RISCV_TLS_TPREL64,
- BFD_RELOC_RISCV_ALIGN,
- BFD_RELOC_RISCV_RVC_BRANCH,
- BFD_RELOC_RISCV_RVC_JUMP,
- BFD_RELOC_RISCV_RVC_LUI,
- BFD_RELOC_RISCV_GPREL_I,
- BFD_RELOC_RISCV_GPREL_S,
- BFD_RELOC_RISCV_TPREL_I,
- BFD_RELOC_RISCV_TPREL_S,
- BFD_RELOC_RISCV_RELAX,
- BFD_RELOC_RISCV_CFA,
- BFD_RELOC_RISCV_SUB6,
- BFD_RELOC_RISCV_SET6,
- BFD_RELOC_RISCV_SET8,
- BFD_RELOC_RISCV_SET16,
- BFD_RELOC_RISCV_SET32,
- BFD_RELOC_RISCV_32_PCREL,
-
-/* Renesas RL78 Relocations. */
- BFD_RELOC_RL78_NEG8,
- BFD_RELOC_RL78_NEG16,
- BFD_RELOC_RL78_NEG24,
- BFD_RELOC_RL78_NEG32,
- BFD_RELOC_RL78_16_OP,
- BFD_RELOC_RL78_24_OP,
- BFD_RELOC_RL78_32_OP,
- BFD_RELOC_RL78_8U,
- BFD_RELOC_RL78_16U,
- BFD_RELOC_RL78_24U,
- BFD_RELOC_RL78_DIR3U_PCREL,
- BFD_RELOC_RL78_DIFF,
- BFD_RELOC_RL78_GPRELB,
- BFD_RELOC_RL78_GPRELW,
- BFD_RELOC_RL78_GPRELL,
- BFD_RELOC_RL78_SYM,
- BFD_RELOC_RL78_OP_SUBTRACT,
- BFD_RELOC_RL78_OP_NEG,
- BFD_RELOC_RL78_OP_AND,
- BFD_RELOC_RL78_OP_SHRA,
- BFD_RELOC_RL78_ABS8,
- BFD_RELOC_RL78_ABS16,
- BFD_RELOC_RL78_ABS16_REV,
- BFD_RELOC_RL78_ABS32,
- BFD_RELOC_RL78_ABS32_REV,
- BFD_RELOC_RL78_ABS16U,
- BFD_RELOC_RL78_ABS16UW,
- BFD_RELOC_RL78_ABS16UL,
- BFD_RELOC_RL78_RELAX,
- BFD_RELOC_RL78_HI16,
- BFD_RELOC_RL78_HI8,
- BFD_RELOC_RL78_LO16,
- BFD_RELOC_RL78_CODE,
- BFD_RELOC_RL78_SADDR,
-
-/* Renesas RX Relocations. */
- BFD_RELOC_RX_NEG8,
- BFD_RELOC_RX_NEG16,
- BFD_RELOC_RX_NEG24,
- BFD_RELOC_RX_NEG32,
- BFD_RELOC_RX_16_OP,
- BFD_RELOC_RX_24_OP,
- BFD_RELOC_RX_32_OP,
- BFD_RELOC_RX_8U,
- BFD_RELOC_RX_16U,
- BFD_RELOC_RX_24U,
- BFD_RELOC_RX_DIR3U_PCREL,
- BFD_RELOC_RX_DIFF,
- BFD_RELOC_RX_GPRELB,
- BFD_RELOC_RX_GPRELW,
- BFD_RELOC_RX_GPRELL,
- BFD_RELOC_RX_SYM,
- BFD_RELOC_RX_OP_SUBTRACT,
- BFD_RELOC_RX_OP_NEG,
- BFD_RELOC_RX_ABS8,
- BFD_RELOC_RX_ABS16,
- BFD_RELOC_RX_ABS16_REV,
- BFD_RELOC_RX_ABS32,
- BFD_RELOC_RX_ABS32_REV,
- BFD_RELOC_RX_ABS16U,
- BFD_RELOC_RX_ABS16UW,
- BFD_RELOC_RX_ABS16UL,
- BFD_RELOC_RX_RELAX,
-
-/* Direct 12 bit. */
- BFD_RELOC_390_12,
-
-/* 12 bit GOT offset. */
- BFD_RELOC_390_GOT12,
-
-/* 32 bit PC relative PLT address. */
- BFD_RELOC_390_PLT32,
-
-/* Copy symbol at runtime. */
- BFD_RELOC_390_COPY,
-
-/* Create GOT entry. */
- BFD_RELOC_390_GLOB_DAT,
-
-/* Create PLT entry. */
- BFD_RELOC_390_JMP_SLOT,
-
-/* Adjust by program base. */
- BFD_RELOC_390_RELATIVE,
-
-/* 32 bit PC relative offset to GOT. */
- BFD_RELOC_390_GOTPC,
-
-/* 16 bit GOT offset. */
- BFD_RELOC_390_GOT16,
-
-/* PC relative 12 bit shifted by 1. */
- BFD_RELOC_390_PC12DBL,
-
-/* 12 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT12DBL,
-
-/* PC relative 16 bit shifted by 1. */
- BFD_RELOC_390_PC16DBL,
-
-/* 16 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT16DBL,
-
-/* PC relative 24 bit shifted by 1. */
- BFD_RELOC_390_PC24DBL,
-
-/* 24 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT24DBL,
-
-/* PC relative 32 bit shifted by 1. */
- BFD_RELOC_390_PC32DBL,
-
-/* 32 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT32DBL,
-
-/* 32 bit PC rel. GOT shifted by 1. */
- BFD_RELOC_390_GOTPCDBL,
-
-/* 64 bit GOT offset. */
- BFD_RELOC_390_GOT64,
-
-/* 64 bit PC relative PLT address. */
- BFD_RELOC_390_PLT64,
-
-/* 32 bit rel. offset to GOT entry. */
- BFD_RELOC_390_GOTENT,
-
-/* 64 bit offset to GOT. */
- BFD_RELOC_390_GOTOFF64,
-
-/* 12-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT12,
-
-/* 16-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT16,
-
-/* 32-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT32,
-
-/* 64-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT64,
-
-/* 32-bit rel. offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLTENT,
-
-/* 16-bit rel. offset from the GOT to a PLT entry. */
- BFD_RELOC_390_PLTOFF16,
-
-/* 32-bit rel. offset from the GOT to a PLT entry. */
- BFD_RELOC_390_PLTOFF32,
-
-/* 64-bit rel. offset from the GOT to a PLT entry. */
- BFD_RELOC_390_PLTOFF64,
-
-/* s390 tls relocations. */
- BFD_RELOC_390_TLS_LOAD,
- BFD_RELOC_390_TLS_GDCALL,
- BFD_RELOC_390_TLS_LDCALL,
- BFD_RELOC_390_TLS_GD32,
- BFD_RELOC_390_TLS_GD64,
- BFD_RELOC_390_TLS_GOTIE12,
- BFD_RELOC_390_TLS_GOTIE32,
- BFD_RELOC_390_TLS_GOTIE64,
- BFD_RELOC_390_TLS_LDM32,
- BFD_RELOC_390_TLS_LDM64,
- BFD_RELOC_390_TLS_IE32,
- BFD_RELOC_390_TLS_IE64,
- BFD_RELOC_390_TLS_IEENT,
- BFD_RELOC_390_TLS_LE32,
- BFD_RELOC_390_TLS_LE64,
- BFD_RELOC_390_TLS_LDO32,
- BFD_RELOC_390_TLS_LDO64,
- BFD_RELOC_390_TLS_DTPMOD,
- BFD_RELOC_390_TLS_DTPOFF,
- BFD_RELOC_390_TLS_TPOFF,
-
-/* Long displacement extension. */
- BFD_RELOC_390_20,
- BFD_RELOC_390_GOT20,
- BFD_RELOC_390_GOTPLT20,
- BFD_RELOC_390_TLS_GOTIE20,
-
-/* STT_GNU_IFUNC relocation. */
- BFD_RELOC_390_IRELATIVE,
-
-/* Score relocations
-Low 16 bit for load/store */
- BFD_RELOC_SCORE_GPREL15,
-
-/* This is a 24-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_DUMMY2,
- BFD_RELOC_SCORE_JMP,
-
-/* This is a 19-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_BRANCH,
-
-/* This is a 32-bit reloc for 48-bit instructions. */
- BFD_RELOC_SCORE_IMM30,
-
-/* This is a 32-bit reloc for 48-bit instructions. */
- BFD_RELOC_SCORE_IMM32,
-
-/* This is a 11-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE16_JMP,
-
-/* This is a 8-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE16_BRANCH,
-
-/* This is a 9-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_BCMP,
-
-/* Undocumented Score relocs */
- BFD_RELOC_SCORE_GOT15,
- BFD_RELOC_SCORE_GOT_LO16,
- BFD_RELOC_SCORE_CALL15,
- BFD_RELOC_SCORE_DUMMY_HI16,
-
-/* Scenix IP2K - 9-bit register number / data address */
- BFD_RELOC_IP2K_FR9,
-
-/* Scenix IP2K - 4-bit register/data bank number */
- BFD_RELOC_IP2K_BANK,
-
-/* Scenix IP2K - low 13 bits of instruction word address */
- BFD_RELOC_IP2K_ADDR16CJP,
-
-/* Scenix IP2K - high 3 bits of instruction word address */
- BFD_RELOC_IP2K_PAGE3,
-
-/* Scenix IP2K - ext/low/high 8 bits of data address */
- BFD_RELOC_IP2K_LO8DATA,
- BFD_RELOC_IP2K_HI8DATA,
- BFD_RELOC_IP2K_EX8DATA,
-
-/* Scenix IP2K - low/high 8 bits of instruction word address */
- BFD_RELOC_IP2K_LO8INSN,
- BFD_RELOC_IP2K_HI8INSN,
-
-/* Scenix IP2K - even/odd PC modifier to modify snb pcl.0 */
- BFD_RELOC_IP2K_PC_SKIP,
-
-/* Scenix IP2K - 16 bit word address in text section. */
- BFD_RELOC_IP2K_TEXT,
-
-/* Scenix IP2K - 7-bit sp or dp offset */
- BFD_RELOC_IP2K_FR_OFFSET,
-
-/* Scenix VPE4K coprocessor - data/insn-space addressing */
- BFD_RELOC_VPE4KMATH_DATA,
- BFD_RELOC_VPE4KMATH_INSN,
-
-/* These two relocations are used by the linker to determine which of
-the entries in a C++ virtual function table are actually used. When
-the --gc-sections option is given, the linker will zero out the entries
-that are not used, so that the code for those functions need not be
-included in the output.
-
-VTABLE_INHERIT is a zero-space relocation used to describe to the
-linker the inheritance tree of a C++ virtual function table. The
-relocation's symbol should be the parent class' vtable, and the
-relocation should be located at the child vtable.
-
-VTABLE_ENTRY is a zero-space relocation that describes the use of a
-virtual function table entry. The reloc's symbol should refer to the
-table of the class mentioned in the code. Off of that base, an offset
-describes the entry that is being used. For Rela hosts, this offset
-is stored in the reloc's addend. For Rel hosts, we are forced to put
-this offset in the reloc's section offset. */
- BFD_RELOC_VTABLE_INHERIT,
- BFD_RELOC_VTABLE_ENTRY,
-
-/* Intel IA64 Relocations. */
- BFD_RELOC_IA64_IMM14,
- BFD_RELOC_IA64_IMM22,
- BFD_RELOC_IA64_IMM64,
- BFD_RELOC_IA64_DIR32MSB,
- BFD_RELOC_IA64_DIR32LSB,
- BFD_RELOC_IA64_DIR64MSB,
- BFD_RELOC_IA64_DIR64LSB,
- BFD_RELOC_IA64_GPREL22,
- BFD_RELOC_IA64_GPREL64I,
- BFD_RELOC_IA64_GPREL32MSB,
- BFD_RELOC_IA64_GPREL32LSB,
- BFD_RELOC_IA64_GPREL64MSB,
- BFD_RELOC_IA64_GPREL64LSB,
- BFD_RELOC_IA64_LTOFF22,
- BFD_RELOC_IA64_LTOFF64I,
- BFD_RELOC_IA64_PLTOFF22,
- BFD_RELOC_IA64_PLTOFF64I,
- BFD_RELOC_IA64_PLTOFF64MSB,
- BFD_RELOC_IA64_PLTOFF64LSB,
- BFD_RELOC_IA64_FPTR64I,
- BFD_RELOC_IA64_FPTR32MSB,
- BFD_RELOC_IA64_FPTR32LSB,
- BFD_RELOC_IA64_FPTR64MSB,
- BFD_RELOC_IA64_FPTR64LSB,
- BFD_RELOC_IA64_PCREL21B,
- BFD_RELOC_IA64_PCREL21BI,
- BFD_RELOC_IA64_PCREL21M,
- BFD_RELOC_IA64_PCREL21F,
- BFD_RELOC_IA64_PCREL22,
- BFD_RELOC_IA64_PCREL60B,
- BFD_RELOC_IA64_PCREL64I,
- BFD_RELOC_IA64_PCREL32MSB,
- BFD_RELOC_IA64_PCREL32LSB,
- BFD_RELOC_IA64_PCREL64MSB,
- BFD_RELOC_IA64_PCREL64LSB,
- BFD_RELOC_IA64_LTOFF_FPTR22,
- BFD_RELOC_IA64_LTOFF_FPTR64I,
- BFD_RELOC_IA64_LTOFF_FPTR32MSB,
- BFD_RELOC_IA64_LTOFF_FPTR32LSB,
- BFD_RELOC_IA64_LTOFF_FPTR64MSB,
- BFD_RELOC_IA64_LTOFF_FPTR64LSB,
- BFD_RELOC_IA64_SEGREL32MSB,
- BFD_RELOC_IA64_SEGREL32LSB,
- BFD_RELOC_IA64_SEGREL64MSB,
- BFD_RELOC_IA64_SEGREL64LSB,
- BFD_RELOC_IA64_SECREL32MSB,
- BFD_RELOC_IA64_SECREL32LSB,
- BFD_RELOC_IA64_SECREL64MSB,
- BFD_RELOC_IA64_SECREL64LSB,
- BFD_RELOC_IA64_REL32MSB,
- BFD_RELOC_IA64_REL32LSB,
- BFD_RELOC_IA64_REL64MSB,
- BFD_RELOC_IA64_REL64LSB,
- BFD_RELOC_IA64_LTV32MSB,
- BFD_RELOC_IA64_LTV32LSB,
- BFD_RELOC_IA64_LTV64MSB,
- BFD_RELOC_IA64_LTV64LSB,
- BFD_RELOC_IA64_IPLTMSB,
- BFD_RELOC_IA64_IPLTLSB,
- BFD_RELOC_IA64_COPY,
- BFD_RELOC_IA64_LTOFF22X,
- BFD_RELOC_IA64_LDXMOV,
- BFD_RELOC_IA64_TPREL14,
- BFD_RELOC_IA64_TPREL22,
- BFD_RELOC_IA64_TPREL64I,
- BFD_RELOC_IA64_TPREL64MSB,
- BFD_RELOC_IA64_TPREL64LSB,
- BFD_RELOC_IA64_LTOFF_TPREL22,
- BFD_RELOC_IA64_DTPMOD64MSB,
- BFD_RELOC_IA64_DTPMOD64LSB,
- BFD_RELOC_IA64_LTOFF_DTPMOD22,
- BFD_RELOC_IA64_DTPREL14,
- BFD_RELOC_IA64_DTPREL22,
- BFD_RELOC_IA64_DTPREL64I,
- BFD_RELOC_IA64_DTPREL32MSB,
- BFD_RELOC_IA64_DTPREL32LSB,
- BFD_RELOC_IA64_DTPREL64MSB,
- BFD_RELOC_IA64_DTPREL64LSB,
- BFD_RELOC_IA64_LTOFF_DTPREL22,
-
-/* Motorola 68HC11 reloc.
-This is the 8 bit high part of an absolute address. */
- BFD_RELOC_M68HC11_HI8,
-
-/* Motorola 68HC11 reloc.
-This is the 8 bit low part of an absolute address. */
- BFD_RELOC_M68HC11_LO8,
-
-/* Motorola 68HC11 reloc.
-This is the 3 bit of a value. */
- BFD_RELOC_M68HC11_3B,
-
-/* Motorola 68HC11 reloc.
-This reloc marks the beginning of a jump/call instruction.
-It is used for linker relaxation to correctly identify beginning
-of instruction and change some branches to use PC-relative
-addressing mode. */
- BFD_RELOC_M68HC11_RL_JUMP,
-
-/* Motorola 68HC11 reloc.
-This reloc marks a group of several instructions that gcc generates
-and for which the linker relaxation pass can modify and/or remove
-some of them. */
- BFD_RELOC_M68HC11_RL_GROUP,
-
-/* Motorola 68HC11 reloc.
-This is the 16-bit lower part of an address. It is used for 'call'
-instruction to specify the symbol address without any special
-transformation (due to memory bank window). */
- BFD_RELOC_M68HC11_LO16,
-
-/* Motorola 68HC11 reloc.
-This is a 8-bit reloc that specifies the page number of an address.
-It is used by 'call' instruction to specify the page number of
-the symbol. */
- BFD_RELOC_M68HC11_PAGE,
-
-/* Motorola 68HC11 reloc.
-This is a 24-bit reloc that represents the address with a 16-bit
-value and a 8-bit page number. The symbol address is transformed
-to follow the 16K memory bank of 68HC12 (seen as mapped in the window). */
- BFD_RELOC_M68HC11_24,
-
-/* Motorola 68HC12 reloc.
-This is the 5 bits of a value. */
- BFD_RELOC_M68HC12_5B,
-
-/* Freescale XGATE reloc.
-This reloc marks the beginning of a bra/jal instruction. */
- BFD_RELOC_XGATE_RL_JUMP,
-
-/* Freescale XGATE reloc.
-This reloc marks a group of several instructions that gcc generates
-and for which the linker relaxation pass can modify and/or remove
-some of them. */
- BFD_RELOC_XGATE_RL_GROUP,
-
-/* Freescale XGATE reloc.
-This is the 16-bit lower part of an address. It is used for the '16-bit'
-instructions. */
- BFD_RELOC_XGATE_LO16,
-
-/* Freescale XGATE reloc. */
- BFD_RELOC_XGATE_GPAGE,
-
-/* Freescale XGATE reloc. */
- BFD_RELOC_XGATE_24,
-
-/* Freescale XGATE reloc.
-This is a 9-bit pc-relative reloc. */
- BFD_RELOC_XGATE_PCREL_9,
-
-/* Freescale XGATE reloc.
-This is a 10-bit pc-relative reloc. */
- BFD_RELOC_XGATE_PCREL_10,
-
-/* Freescale XGATE reloc.
-This is the 16-bit lower part of an address. It is used for the '16-bit'
-instructions. */
- BFD_RELOC_XGATE_IMM8_LO,
-
-/* Freescale XGATE reloc.
-This is the 16-bit higher part of an address. It is used for the '16-bit'
-instructions. */
- BFD_RELOC_XGATE_IMM8_HI,
-
-/* Freescale XGATE reloc.
-This is a 3-bit pc-relative reloc. */
- BFD_RELOC_XGATE_IMM3,
-
-/* Freescale XGATE reloc.
-This is a 4-bit pc-relative reloc. */
- BFD_RELOC_XGATE_IMM4,
-
-/* Freescale XGATE reloc.
-This is a 5-bit pc-relative reloc. */
- BFD_RELOC_XGATE_IMM5,
-
-/* Motorola 68HC12 reloc.
-This is the 9 bits of a value. */
- BFD_RELOC_M68HC12_9B,
-
-/* Motorola 68HC12 reloc.
-This is the 16 bits of a value. */
- BFD_RELOC_M68HC12_16B,
-
-/* Motorola 68HC12/XGATE reloc.
-This is a PCREL9 branch. */
- BFD_RELOC_M68HC12_9_PCREL,
-
-/* Motorola 68HC12/XGATE reloc.
-This is a PCREL10 branch. */
- BFD_RELOC_M68HC12_10_PCREL,
-
-/* Motorola 68HC12/XGATE reloc.
-This is the 8 bit low part of an absolute address and immediately precedes
-a matching HI8XG part. */
- BFD_RELOC_M68HC12_LO8XG,
-
-/* Motorola 68HC12/XGATE reloc.
-This is the 8 bit high part of an absolute address and immediately follows
-a matching LO8XG part. */
- BFD_RELOC_M68HC12_HI8XG,
-
-/* Freescale S12Z reloc.
-This is a 15 bit relative address. If the most significant bits are all zero
-then it may be truncated to 8 bits. */
- BFD_RELOC_S12Z_15_PCREL,
-
-/* NS CR16C Relocations. */
- BFD_RELOC_16C_NUM08,
- BFD_RELOC_16C_NUM08_C,
- BFD_RELOC_16C_NUM16,
- BFD_RELOC_16C_NUM16_C,
- BFD_RELOC_16C_NUM32,
- BFD_RELOC_16C_NUM32_C,
- BFD_RELOC_16C_DISP04,
- BFD_RELOC_16C_DISP04_C,
- BFD_RELOC_16C_DISP08,
- BFD_RELOC_16C_DISP08_C,
- BFD_RELOC_16C_DISP16,
- BFD_RELOC_16C_DISP16_C,
- BFD_RELOC_16C_DISP24,
- BFD_RELOC_16C_DISP24_C,
- BFD_RELOC_16C_DISP24a,
- BFD_RELOC_16C_DISP24a_C,
- BFD_RELOC_16C_REG04,
- BFD_RELOC_16C_REG04_C,
- BFD_RELOC_16C_REG04a,
- BFD_RELOC_16C_REG04a_C,
- BFD_RELOC_16C_REG14,
- BFD_RELOC_16C_REG14_C,
- BFD_RELOC_16C_REG16,
- BFD_RELOC_16C_REG16_C,
- BFD_RELOC_16C_REG20,
- BFD_RELOC_16C_REG20_C,
- BFD_RELOC_16C_ABS20,
- BFD_RELOC_16C_ABS20_C,
- BFD_RELOC_16C_ABS24,
- BFD_RELOC_16C_ABS24_C,
- BFD_RELOC_16C_IMM04,
- BFD_RELOC_16C_IMM04_C,
- BFD_RELOC_16C_IMM16,
- BFD_RELOC_16C_IMM16_C,
- BFD_RELOC_16C_IMM20,
- BFD_RELOC_16C_IMM20_C,
- BFD_RELOC_16C_IMM24,
- BFD_RELOC_16C_IMM24_C,
- BFD_RELOC_16C_IMM32,
- BFD_RELOC_16C_IMM32_C,
-
-/* NS CR16 Relocations. */
- BFD_RELOC_CR16_NUM8,
- BFD_RELOC_CR16_NUM16,
- BFD_RELOC_CR16_NUM32,
- BFD_RELOC_CR16_NUM32a,
- BFD_RELOC_CR16_REGREL0,
- BFD_RELOC_CR16_REGREL4,
- BFD_RELOC_CR16_REGREL4a,
- BFD_RELOC_CR16_REGREL14,
- BFD_RELOC_CR16_REGREL14a,
- BFD_RELOC_CR16_REGREL16,
- BFD_RELOC_CR16_REGREL20,
- BFD_RELOC_CR16_REGREL20a,
- BFD_RELOC_CR16_ABS20,
- BFD_RELOC_CR16_ABS24,
- BFD_RELOC_CR16_IMM4,
- BFD_RELOC_CR16_IMM8,
- BFD_RELOC_CR16_IMM16,
- BFD_RELOC_CR16_IMM20,
- BFD_RELOC_CR16_IMM24,
- BFD_RELOC_CR16_IMM32,
- BFD_RELOC_CR16_IMM32a,
- BFD_RELOC_CR16_DISP4,
- BFD_RELOC_CR16_DISP8,
- BFD_RELOC_CR16_DISP16,
- BFD_RELOC_CR16_DISP20,
- BFD_RELOC_CR16_DISP24,
- BFD_RELOC_CR16_DISP24a,
- BFD_RELOC_CR16_SWITCH8,
- BFD_RELOC_CR16_SWITCH16,
- BFD_RELOC_CR16_SWITCH32,
- BFD_RELOC_CR16_GOT_REGREL20,
- BFD_RELOC_CR16_GOTC_REGREL20,
- BFD_RELOC_CR16_GLOB_DAT,
-
-/* NS CRX Relocations. */
- BFD_RELOC_CRX_REL4,
- BFD_RELOC_CRX_REL8,
- BFD_RELOC_CRX_REL8_CMP,
- BFD_RELOC_CRX_REL16,
- BFD_RELOC_CRX_REL24,
- BFD_RELOC_CRX_REL32,
- BFD_RELOC_CRX_REGREL12,
- BFD_RELOC_CRX_REGREL22,
- BFD_RELOC_CRX_REGREL28,
- BFD_RELOC_CRX_REGREL32,
- BFD_RELOC_CRX_ABS16,
- BFD_RELOC_CRX_ABS32,
- BFD_RELOC_CRX_NUM8,
- BFD_RELOC_CRX_NUM16,
- BFD_RELOC_CRX_NUM32,
- BFD_RELOC_CRX_IMM16,
- BFD_RELOC_CRX_IMM32,
- BFD_RELOC_CRX_SWITCH8,
- BFD_RELOC_CRX_SWITCH16,
- BFD_RELOC_CRX_SWITCH32,
-
-/* These relocs are only used within the CRIS assembler. They are not
-(at present) written to any object files. */
- BFD_RELOC_CRIS_BDISP8,
- BFD_RELOC_CRIS_UNSIGNED_5,
- BFD_RELOC_CRIS_SIGNED_6,
- BFD_RELOC_CRIS_UNSIGNED_6,
- BFD_RELOC_CRIS_SIGNED_8,
- BFD_RELOC_CRIS_UNSIGNED_8,
- BFD_RELOC_CRIS_SIGNED_16,
- BFD_RELOC_CRIS_UNSIGNED_16,
- BFD_RELOC_CRIS_LAPCQ_OFFSET,
- BFD_RELOC_CRIS_UNSIGNED_4,
-
-/* Relocs used in ELF shared libraries for CRIS. */
- BFD_RELOC_CRIS_COPY,
- BFD_RELOC_CRIS_GLOB_DAT,
- BFD_RELOC_CRIS_JUMP_SLOT,
- BFD_RELOC_CRIS_RELATIVE,
-
-/* 32-bit offset to symbol-entry within GOT. */
- BFD_RELOC_CRIS_32_GOT,
-
-/* 16-bit offset to symbol-entry within GOT. */
- BFD_RELOC_CRIS_16_GOT,
-
-/* 32-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_CRIS_32_GOTPLT,
-
-/* 16-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_CRIS_16_GOTPLT,
-
-/* 32-bit offset to symbol, relative to GOT. */
- BFD_RELOC_CRIS_32_GOTREL,
-
-/* 32-bit offset to symbol with PLT entry, relative to GOT. */
- BFD_RELOC_CRIS_32_PLT_GOTREL,
-
-/* 32-bit offset to symbol with PLT entry, relative to this relocation. */
- BFD_RELOC_CRIS_32_PLT_PCREL,
-
-/* Relocs used in TLS code for CRIS. */
- BFD_RELOC_CRIS_32_GOT_GD,
- BFD_RELOC_CRIS_16_GOT_GD,
- BFD_RELOC_CRIS_32_GD,
- BFD_RELOC_CRIS_DTP,
- BFD_RELOC_CRIS_32_DTPREL,
- BFD_RELOC_CRIS_16_DTPREL,
- BFD_RELOC_CRIS_32_GOT_TPREL,
- BFD_RELOC_CRIS_16_GOT_TPREL,
- BFD_RELOC_CRIS_32_TPREL,
- BFD_RELOC_CRIS_16_TPREL,
- BFD_RELOC_CRIS_DTPMOD,
- BFD_RELOC_CRIS_32_IE,
-
-/* OpenRISC 1000 Relocations. */
- BFD_RELOC_OR1K_REL_26,
- BFD_RELOC_OR1K_SLO16,
- BFD_RELOC_OR1K_PCREL_PG21,
- BFD_RELOC_OR1K_LO13,
- BFD_RELOC_OR1K_SLO13,
- BFD_RELOC_OR1K_GOTPC_HI16,
- BFD_RELOC_OR1K_GOTPC_LO16,
- BFD_RELOC_OR1K_GOT16,
- BFD_RELOC_OR1K_GOT_PG21,
- BFD_RELOC_OR1K_GOT_LO13,
- BFD_RELOC_OR1K_PLT26,
- BFD_RELOC_OR1K_PLTA26,
- BFD_RELOC_OR1K_GOTOFF_SLO16,
- BFD_RELOC_OR1K_COPY,
- BFD_RELOC_OR1K_GLOB_DAT,
- BFD_RELOC_OR1K_JMP_SLOT,
- BFD_RELOC_OR1K_RELATIVE,
- BFD_RELOC_OR1K_TLS_GD_HI16,
- BFD_RELOC_OR1K_TLS_GD_LO16,
- BFD_RELOC_OR1K_TLS_GD_PG21,
- BFD_RELOC_OR1K_TLS_GD_LO13,
- BFD_RELOC_OR1K_TLS_LDM_HI16,
- BFD_RELOC_OR1K_TLS_LDM_LO16,
- BFD_RELOC_OR1K_TLS_LDM_PG21,
- BFD_RELOC_OR1K_TLS_LDM_LO13,
- BFD_RELOC_OR1K_TLS_LDO_HI16,
- BFD_RELOC_OR1K_TLS_LDO_LO16,
- BFD_RELOC_OR1K_TLS_IE_HI16,
- BFD_RELOC_OR1K_TLS_IE_AHI16,
- BFD_RELOC_OR1K_TLS_IE_LO16,
- BFD_RELOC_OR1K_TLS_IE_PG21,
- BFD_RELOC_OR1K_TLS_IE_LO13,
- BFD_RELOC_OR1K_TLS_LE_HI16,
- BFD_RELOC_OR1K_TLS_LE_AHI16,
- BFD_RELOC_OR1K_TLS_LE_LO16,
- BFD_RELOC_OR1K_TLS_LE_SLO16,
- BFD_RELOC_OR1K_TLS_TPOFF,
- BFD_RELOC_OR1K_TLS_DTPOFF,
- BFD_RELOC_OR1K_TLS_DTPMOD,
-
-/* H8 elf Relocations. */
- BFD_RELOC_H8_DIR16A8,
- BFD_RELOC_H8_DIR16R8,
- BFD_RELOC_H8_DIR24A8,
- BFD_RELOC_H8_DIR24R8,
- BFD_RELOC_H8_DIR32A16,
- BFD_RELOC_H8_DISP32A16,
-
-/* Sony Xstormy16 Relocations. */
- BFD_RELOC_XSTORMY16_REL_12,
- BFD_RELOC_XSTORMY16_12,
- BFD_RELOC_XSTORMY16_24,
- BFD_RELOC_XSTORMY16_FPTR16,
-
-/* Self-describing complex relocations. */
- BFD_RELOC_RELC,
-
-
-/* Infineon Relocations. */
- BFD_RELOC_XC16X_PAG,
- BFD_RELOC_XC16X_POF,
- BFD_RELOC_XC16X_SEG,
- BFD_RELOC_XC16X_SOF,
-
-/* Relocations used by VAX ELF. */
- BFD_RELOC_VAX_GLOB_DAT,
- BFD_RELOC_VAX_JMP_SLOT,
- BFD_RELOC_VAX_RELATIVE,
-
-/* Morpho MT - 16 bit immediate relocation. */
- BFD_RELOC_MT_PC16,
-
-/* Morpho MT - Hi 16 bits of an address. */
- BFD_RELOC_MT_HI16,
-
-/* Morpho MT - Low 16 bits of an address. */
- BFD_RELOC_MT_LO16,
-
-/* Morpho MT - Used to tell the linker which vtable entries are used. */
- BFD_RELOC_MT_GNU_VTINHERIT,
-
-/* Morpho MT - Used to tell the linker which vtable entries are used. */
- BFD_RELOC_MT_GNU_VTENTRY,
-
-/* Morpho MT - 8 bit immediate relocation. */
- BFD_RELOC_MT_PCINSN8,
-
-/* msp430 specific relocation codes */
- BFD_RELOC_MSP430_10_PCREL,
- BFD_RELOC_MSP430_16_PCREL,
- BFD_RELOC_MSP430_16,
- BFD_RELOC_MSP430_16_PCREL_BYTE,
- BFD_RELOC_MSP430_16_BYTE,
- BFD_RELOC_MSP430_2X_PCREL,
- BFD_RELOC_MSP430_RL_PCREL,
- BFD_RELOC_MSP430_ABS8,
- BFD_RELOC_MSP430X_PCR20_EXT_SRC,
- BFD_RELOC_MSP430X_PCR20_EXT_DST,
- BFD_RELOC_MSP430X_PCR20_EXT_ODST,
- BFD_RELOC_MSP430X_ABS20_EXT_SRC,
- BFD_RELOC_MSP430X_ABS20_EXT_DST,
- BFD_RELOC_MSP430X_ABS20_EXT_ODST,
- BFD_RELOC_MSP430X_ABS20_ADR_SRC,
- BFD_RELOC_MSP430X_ABS20_ADR_DST,
- BFD_RELOC_MSP430X_PCR16,
- BFD_RELOC_MSP430X_PCR20_CALL,
- BFD_RELOC_MSP430X_ABS16,
- BFD_RELOC_MSP430_ABS_HI16,
- BFD_RELOC_MSP430_PREL31,
- BFD_RELOC_MSP430_SYM_DIFF,
-
-/* Relocations used by the Altera Nios II core. */
- BFD_RELOC_NIOS2_S16,
- BFD_RELOC_NIOS2_U16,
- BFD_RELOC_NIOS2_CALL26,
- BFD_RELOC_NIOS2_IMM5,
- BFD_RELOC_NIOS2_CACHE_OPX,
- BFD_RELOC_NIOS2_IMM6,
- BFD_RELOC_NIOS2_IMM8,
- BFD_RELOC_NIOS2_HI16,
- BFD_RELOC_NIOS2_LO16,
- BFD_RELOC_NIOS2_HIADJ16,
- BFD_RELOC_NIOS2_GPREL,
- BFD_RELOC_NIOS2_UJMP,
- BFD_RELOC_NIOS2_CJMP,
- BFD_RELOC_NIOS2_CALLR,
- BFD_RELOC_NIOS2_ALIGN,
- BFD_RELOC_NIOS2_GOT16,
- BFD_RELOC_NIOS2_CALL16,
- BFD_RELOC_NIOS2_GOTOFF_LO,
- BFD_RELOC_NIOS2_GOTOFF_HA,
- BFD_RELOC_NIOS2_PCREL_LO,
- BFD_RELOC_NIOS2_PCREL_HA,
- BFD_RELOC_NIOS2_TLS_GD16,
- BFD_RELOC_NIOS2_TLS_LDM16,
- BFD_RELOC_NIOS2_TLS_LDO16,
- BFD_RELOC_NIOS2_TLS_IE16,
- BFD_RELOC_NIOS2_TLS_LE16,
- BFD_RELOC_NIOS2_TLS_DTPMOD,
- BFD_RELOC_NIOS2_TLS_DTPREL,
- BFD_RELOC_NIOS2_TLS_TPREL,
- BFD_RELOC_NIOS2_COPY,
- BFD_RELOC_NIOS2_GLOB_DAT,
- BFD_RELOC_NIOS2_JUMP_SLOT,
- BFD_RELOC_NIOS2_RELATIVE,
- BFD_RELOC_NIOS2_GOTOFF,
- BFD_RELOC_NIOS2_CALL26_NOAT,
- BFD_RELOC_NIOS2_GOT_LO,
- BFD_RELOC_NIOS2_GOT_HA,
- BFD_RELOC_NIOS2_CALL_LO,
- BFD_RELOC_NIOS2_CALL_HA,
- BFD_RELOC_NIOS2_R2_S12,
- BFD_RELOC_NIOS2_R2_I10_1_PCREL,
- BFD_RELOC_NIOS2_R2_T1I7_1_PCREL,
- BFD_RELOC_NIOS2_R2_T1I7_2,
- BFD_RELOC_NIOS2_R2_T2I4,
- BFD_RELOC_NIOS2_R2_T2I4_1,
- BFD_RELOC_NIOS2_R2_T2I4_2,
- BFD_RELOC_NIOS2_R2_X1I7_2,
- BFD_RELOC_NIOS2_R2_X2L5,
- BFD_RELOC_NIOS2_R2_F1I5_2,
- BFD_RELOC_NIOS2_R2_L5I4X1,
- BFD_RELOC_NIOS2_R2_T1X1I6,
- BFD_RELOC_NIOS2_R2_T1X1I6_2,
-
-/* PRU LDI 16-bit unsigned data-memory relocation. */
- BFD_RELOC_PRU_U16,
-
-/* PRU LDI 16-bit unsigned instruction-memory relocation. */
- BFD_RELOC_PRU_U16_PMEMIMM,
-
-/* PRU relocation for two consecutive LDI load instructions that load a
-32 bit value into a register. If the higher bits are all zero, then
-the second instruction may be relaxed. */
- BFD_RELOC_PRU_LDI32,
-
-/* PRU QBBx 10-bit signed PC-relative relocation. */
- BFD_RELOC_PRU_S10_PCREL,
-
-/* PRU 8-bit unsigned relocation used for the LOOP instruction. */
- BFD_RELOC_PRU_U8_PCREL,
-
-/* PRU Program Memory relocations. Used to convert from byte addressing to
-32-bit word addressing. */
- BFD_RELOC_PRU_32_PMEM,
- BFD_RELOC_PRU_16_PMEM,
-
-/* PRU relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-second symbol so the linker can determine whether to adjust the field
-value. The PMEM variants encode the word difference, instead of byte
-difference between symbols. */
- BFD_RELOC_PRU_GNU_DIFF8,
- BFD_RELOC_PRU_GNU_DIFF16,
- BFD_RELOC_PRU_GNU_DIFF32,
- BFD_RELOC_PRU_GNU_DIFF16_PMEM,
- BFD_RELOC_PRU_GNU_DIFF32_PMEM,
-
-/* IQ2000 Relocations. */
- BFD_RELOC_IQ2000_OFFSET_16,
- BFD_RELOC_IQ2000_OFFSET_21,
- BFD_RELOC_IQ2000_UHI16,
-
-/* Special Xtensa relocation used only by PLT entries in ELF shared
-objects to indicate that the runtime linker should set the value
-to one of its own internal functions or data structures. */
- BFD_RELOC_XTENSA_RTLD,
-
-/* Xtensa relocations for ELF shared objects. */
- BFD_RELOC_XTENSA_GLOB_DAT,
- BFD_RELOC_XTENSA_JMP_SLOT,
- BFD_RELOC_XTENSA_RELATIVE,
-
-/* Xtensa relocation used in ELF object files for symbols that may require
-PLT entries. Otherwise, this is just a generic 32-bit relocation. */
- BFD_RELOC_XTENSA_PLT,
-
-/* Xtensa relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-first symbol so the linker can determine whether to adjust the field
-value. */
- BFD_RELOC_XTENSA_DIFF8,
- BFD_RELOC_XTENSA_DIFF16,
- BFD_RELOC_XTENSA_DIFF32,
-
-/* Generic Xtensa relocations for instruction operands. Only the slot
-number is encoded in the relocation. The relocation applies to the
-last PC-relative immediate operand, or if there are no PC-relative
-immediates, to the last immediate operand. */
- BFD_RELOC_XTENSA_SLOT0_OP,
- BFD_RELOC_XTENSA_SLOT1_OP,
- BFD_RELOC_XTENSA_SLOT2_OP,
- BFD_RELOC_XTENSA_SLOT3_OP,
- BFD_RELOC_XTENSA_SLOT4_OP,
- BFD_RELOC_XTENSA_SLOT5_OP,
- BFD_RELOC_XTENSA_SLOT6_OP,
- BFD_RELOC_XTENSA_SLOT7_OP,
- BFD_RELOC_XTENSA_SLOT8_OP,
- BFD_RELOC_XTENSA_SLOT9_OP,
- BFD_RELOC_XTENSA_SLOT10_OP,
- BFD_RELOC_XTENSA_SLOT11_OP,
- BFD_RELOC_XTENSA_SLOT12_OP,
- BFD_RELOC_XTENSA_SLOT13_OP,
- BFD_RELOC_XTENSA_SLOT14_OP,
-
-/* Alternate Xtensa relocations. Only the slot is encoded in the
-relocation. The meaning of these relocations is opcode-specific. */
- BFD_RELOC_XTENSA_SLOT0_ALT,
- BFD_RELOC_XTENSA_SLOT1_ALT,
- BFD_RELOC_XTENSA_SLOT2_ALT,
- BFD_RELOC_XTENSA_SLOT3_ALT,
- BFD_RELOC_XTENSA_SLOT4_ALT,
- BFD_RELOC_XTENSA_SLOT5_ALT,
- BFD_RELOC_XTENSA_SLOT6_ALT,
- BFD_RELOC_XTENSA_SLOT7_ALT,
- BFD_RELOC_XTENSA_SLOT8_ALT,
- BFD_RELOC_XTENSA_SLOT9_ALT,
- BFD_RELOC_XTENSA_SLOT10_ALT,
- BFD_RELOC_XTENSA_SLOT11_ALT,
- BFD_RELOC_XTENSA_SLOT12_ALT,
- BFD_RELOC_XTENSA_SLOT13_ALT,
- BFD_RELOC_XTENSA_SLOT14_ALT,
-
-/* Xtensa relocations for backward compatibility. These have all been
-replaced by BFD_RELOC_XTENSA_SLOT0_OP. */
- BFD_RELOC_XTENSA_OP0,
- BFD_RELOC_XTENSA_OP1,
- BFD_RELOC_XTENSA_OP2,
-
-/* Xtensa relocation to mark that the assembler expanded the
-instructions from an original target. The expansion size is
-encoded in the reloc size. */
- BFD_RELOC_XTENSA_ASM_EXPAND,
-
-/* Xtensa relocation to mark that the linker should simplify
-assembler-expanded instructions. This is commonly used
-internally by the linker after analysis of a
-BFD_RELOC_XTENSA_ASM_EXPAND. */
- BFD_RELOC_XTENSA_ASM_SIMPLIFY,
-
-/* Xtensa TLS relocations. */
- BFD_RELOC_XTENSA_TLSDESC_FN,
- BFD_RELOC_XTENSA_TLSDESC_ARG,
- BFD_RELOC_XTENSA_TLS_DTPOFF,
- BFD_RELOC_XTENSA_TLS_TPOFF,
- BFD_RELOC_XTENSA_TLS_FUNC,
- BFD_RELOC_XTENSA_TLS_ARG,
- BFD_RELOC_XTENSA_TLS_CALL,
-
-/* 8 bit signed offset in (ix+d) or (iy+d). */
- BFD_RELOC_Z80_DISP8,
-
-/* DJNZ offset. */
- BFD_RELOC_Z8K_DISP7,
-
-/* CALR offset. */
- BFD_RELOC_Z8K_CALLR,
-
-/* 4 bit value. */
- BFD_RELOC_Z8K_IMM4L,
-
-/* Lattice Mico32 relocations. */
- BFD_RELOC_LM32_CALL,
- BFD_RELOC_LM32_BRANCH,
- BFD_RELOC_LM32_16_GOT,
- BFD_RELOC_LM32_GOTOFF_HI16,
- BFD_RELOC_LM32_GOTOFF_LO16,
- BFD_RELOC_LM32_COPY,
- BFD_RELOC_LM32_GLOB_DAT,
- BFD_RELOC_LM32_JMP_SLOT,
- BFD_RELOC_LM32_RELATIVE,
-
-/* Difference between two section addreses. Must be followed by a
-BFD_RELOC_MACH_O_PAIR. */
- BFD_RELOC_MACH_O_SECTDIFF,
-
-/* Like BFD_RELOC_MACH_O_SECTDIFF but with a local symbol. */
- BFD_RELOC_MACH_O_LOCAL_SECTDIFF,
-
-/* Pair of relocation. Contains the first symbol. */
- BFD_RELOC_MACH_O_PAIR,
-
-/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */
- BFD_RELOC_MACH_O_SUBTRACTOR32,
-
-/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */
- BFD_RELOC_MACH_O_SUBTRACTOR64,
-
-/* PCREL relocations. They are marked as branch to create PLT entry if
-required. */
- BFD_RELOC_MACH_O_X86_64_BRANCH32,
- BFD_RELOC_MACH_O_X86_64_BRANCH8,
-
-/* Used when referencing a GOT entry. */
- BFD_RELOC_MACH_O_X86_64_GOT,
-
-/* Used when loading a GOT entry with movq. It is specially marked so that
-the linker could optimize the movq to a leaq if possible. */
- BFD_RELOC_MACH_O_X86_64_GOT_LOAD,
-
-/* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */
- BFD_RELOC_MACH_O_X86_64_PCREL32_1,
-
-/* Same as BFD_RELOC_32_PCREL but with an implicit -2 addend. */
- BFD_RELOC_MACH_O_X86_64_PCREL32_2,
-
-/* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */
- BFD_RELOC_MACH_O_X86_64_PCREL32_4,
-
-/* Used when referencing a TLV entry. */
- BFD_RELOC_MACH_O_X86_64_TLV,
-
-/* Addend for PAGE or PAGEOFF. */
- BFD_RELOC_MACH_O_ARM64_ADDEND,
-
-/* Relative offset to page of GOT slot. */
- BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21,
-
-/* Relative offset within page of GOT slot. */
- BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12,
-
-/* Address of a GOT entry. */
- BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT,
-
-/* This is a 32 bit reloc for the microblaze that stores the
-low 16 bits of a value */
- BFD_RELOC_MICROBLAZE_32_LO,
-
-/* This is a 32 bit pc-relative reloc for the microblaze that
-stores the low 16 bits of a value */
- BFD_RELOC_MICROBLAZE_32_LO_PCREL,
-
-/* This is a 32 bit reloc for the microblaze that stores a
-value relative to the read-only small data area anchor */
- BFD_RELOC_MICROBLAZE_32_ROSDA,
-
-/* This is a 32 bit reloc for the microblaze that stores a
-value relative to the read-write small data area anchor */
- BFD_RELOC_MICROBLAZE_32_RWSDA,
-
-/* This is a 32 bit reloc for the microblaze to handle
-expressions of the form "Symbol Op Symbol" */
- BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). No relocation is
-done here - only used for relaxing */
- BFD_RELOC_MICROBLAZE_64_NONE,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-PC-relative GOT offset */
- BFD_RELOC_MICROBLAZE_64_GOTPC,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-GOT offset */
- BFD_RELOC_MICROBLAZE_64_GOT,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-PC-relative offset into PLT */
- BFD_RELOC_MICROBLAZE_64_PLT,
-
-/* This is a 64 bit reloc that stores the 32 bit GOT relative
-value in two words (with an imm instruction). The relocation is
-relative offset from _GLOBAL_OFFSET_TABLE_ */
- BFD_RELOC_MICROBLAZE_64_GOTOFF,
-
-/* This is a 32 bit reloc that stores the 32 bit GOT relative
-value in a word. The relocation is relative offset from */
- BFD_RELOC_MICROBLAZE_32_GOTOFF,
-
-/* This is used to tell the dynamic linker to copy the value out of
-the dynamic object into the runtime process image. */
- BFD_RELOC_MICROBLAZE_COPY,
-
-/* Unused Reloc */
- BFD_RELOC_MICROBLAZE_64_TLS,
-
-/* This is a 64 bit reloc that stores the 32 bit GOT relative value
-of the GOT TLS GD info entry in two words (with an imm instruction). The
-relocation is GOT offset. */
- BFD_RELOC_MICROBLAZE_64_TLSGD,
-
-/* This is a 64 bit reloc that stores the 32 bit GOT relative value
-of the GOT TLS LD info entry in two words (with an imm instruction). The
-relocation is GOT offset. */
- BFD_RELOC_MICROBLAZE_64_TLSLD,
-
-/* This is a 32 bit reloc that stores the Module ID to GOT(n). */
- BFD_RELOC_MICROBLAZE_32_TLSDTPMOD,
-
-/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */
- BFD_RELOC_MICROBLAZE_32_TLSDTPREL,
-
-/* This is a 32 bit reloc for storing TLS offset to two words (uses imm
-instruction) */
- BFD_RELOC_MICROBLAZE_64_TLSDTPREL,
-
-/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
-to two words (uses imm instruction). */
- BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL,
-
-/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
-to two words (uses imm instruction). */
- BFD_RELOC_MICROBLAZE_64_TLSTPREL,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-PC-relative offset from start of TEXT. */
- BFD_RELOC_MICROBLAZE_64_TEXTPCREL,
-
-/* This is a 64 bit reloc that stores the 32 bit offset
-value in two words (with an imm instruction). The relocation is
-relative offset from start of TEXT. */
- BFD_RELOC_MICROBLAZE_64_TEXTREL,
-
-/* AArch64 pseudo relocation code to mark the start of the AArch64
-relocation enumerators. N.B. the order of the enumerators is
-important as several tables in the AArch64 bfd backend are indexed
-by these enumerators; make sure they are all synced. */
- BFD_RELOC_AARCH64_RELOC_START,
-
-/* Deprecated AArch64 null relocation code. */
- BFD_RELOC_AARCH64_NULL,
-
-/* AArch64 null relocation code. */
- BFD_RELOC_AARCH64_NONE,
-
-/* Basic absolute relocations of N bits. These are equivalent to
-BFD_RELOC_N and they were added to assist the indexing of the howto
-table. */
- BFD_RELOC_AARCH64_64,
- BFD_RELOC_AARCH64_32,
- BFD_RELOC_AARCH64_16,
-
-/* PC-relative relocations. These are equivalent to BFD_RELOC_N_PCREL
-and they were added to assist the indexing of the howto table. */
- BFD_RELOC_AARCH64_64_PCREL,
- BFD_RELOC_AARCH64_32_PCREL,
- BFD_RELOC_AARCH64_16_PCREL,
-
-/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15
-of an unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G0,
-
-/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of
-an address/value. No overflow checking. */
- BFD_RELOC_AARCH64_MOVW_G0_NC,
-
-/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31
-of an unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G1,
-
-/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31
-of an address/value. No overflow checking. */
- BFD_RELOC_AARCH64_MOVW_G1_NC,
-
-/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47
-of an unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G2,
-
-/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47
-of an address/value. No overflow checking. */
- BFD_RELOC_AARCH64_MOVW_G2_NC,
-
-/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64
-of a signed or unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G3,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_G0_S,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 16 to 31
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_G1_S,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 32 to 47
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_G2_S,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_PREL_G0,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
-
-/* AArch64 MOVK instruction with most significant bits 16 to 31
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G1,
-
-/* AArch64 MOVK instruction with most significant bits 16 to 31
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
-
-/* AArch64 MOVK instruction with most significant bits 32 to 47
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G2,
-
-/* AArch64 MOVK instruction with most significant bits 32 to 47
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
-
-/* AArch64 MOVK instruction with most significant bits 47 to 63
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G3,
-
-/* AArch64 Load Literal instruction, holding a 19 bit pc-relative word
-offset. The lowest two bits must be zero and are not stored in the
-instruction, giving a 21 bit signed byte offset. */
- BFD_RELOC_AARCH64_LD_LO19_PCREL,
-
-/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */
- BFD_RELOC_AARCH64_ADR_LO21_PCREL,
-
-/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
-offset, giving a 4KB aligned page base address. */
- BFD_RELOC_AARCH64_ADR_HI21_PCREL,
-
-/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
-offset, giving a 4KB aligned page base address, but with no overflow
-checking. */
- BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL,
-
-/* AArch64 ADD immediate instruction, holding bits 0 to 11 of the address.
-Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_ADD_LO12,
-
-/* AArch64 8-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST8_LO12,
-
-/* AArch64 14 bit pc-relative test bit and branch.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 16 bit signed byte offset. */
- BFD_RELOC_AARCH64_TSTBR14,
-
-/* AArch64 19 bit pc-relative conditional branch and compare & branch.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 21 bit signed byte offset. */
- BFD_RELOC_AARCH64_BRANCH19,
-
-/* AArch64 26 bit pc-relative unconditional branch.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 28 bit signed byte offset. */
- BFD_RELOC_AARCH64_JUMP26,
-
-/* AArch64 26 bit pc-relative unconditional branch and link.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 28 bit signed byte offset. */
- BFD_RELOC_AARCH64_CALL26,
-
-/* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST16_LO12,
-
-/* AArch64 32-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST32_LO12,
-
-/* AArch64 64-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST64_LO12,
-
-/* AArch64 128-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST128_LO12,
-
-/* AArch64 Load Literal instruction, holding a 19 bit PC relative word
-offset of the global offset table entry for a symbol. The lowest two
-bits must be zero and are not stored in the instruction, giving a 21
-bit signed byte offset. This relocation type requires signed overflow
-checking. */
- BFD_RELOC_AARCH64_GOT_LD_PREL19,
-
-/* Get to the page base of the global offset table entry for a symbol as
-part of an ADRP instruction using a 21 bit PC relative value.Used in
-conjunction with BFD_RELOC_AARCH64_LD64_GOT_LO12_NC. */
- BFD_RELOC_AARCH64_ADR_GOT_PAGE,
-
-/* Unsigned 12 bit byte offset for 64 bit load/store from the page of
-the GOT entry for this symbol. Used in conjunction with
-BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_LD64_GOT_LO12_NC,
-
-/* Unsigned 12 bit byte offset for 32 bit load/store from the page of
-the GOT entry for this symbol. Used in conjunction with
-BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in ILP32 ABI only. */
- BFD_RELOC_AARCH64_LD32_GOT_LO12_NC,
-
-/* Unsigned 16 bit byte offset for 64 bit load/store from the GOT entry
-for this symbol. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
-
-/* Unsigned 16 bit byte higher offset for 64 bit load/store from the GOT entry
-for this symbol. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_MOVW_GOTOFF_G1,
-
-/* Unsigned 15 bit byte offset for 64 bit load/store from the page of
-the GOT entry for this symbol. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_LD64_GOTOFF_LO15,
-
-/* Scaled 14 bit byte offset to the page base of the global offset table. */
- BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14,
-
-/* Scaled 15 bit byte offset to the page base of the global offset table. */
- BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15,
-
-/* Get to the page base of the global offset table entry for a symbols
-tls_index structure as part of an adrp instruction using a 21 bit PC
-relative value. Used in conjunction with
-BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */
- BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21,
-
-/* AArch64 TLS General Dynamic */
- BFD_RELOC_AARCH64_TLSGD_ADR_PREL21,
-
-/* Unsigned 12 bit byte offset to global offset table entry for a symbols
-tls_index structure. Used in conjunction with
-BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21. */
- BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC,
-
-/* AArch64 TLS General Dynamic relocation. */
- BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC,
-
-/* AArch64 TLS General Dynamic relocation. */
- BFD_RELOC_AARCH64_TLSGD_MOVW_G1,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1,
-
-/* bit[23:12] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
-
-/* Unsigned 12 bit byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12,
-
-/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */
- BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC,
-
-/* Unsigned 12 bit byte offset to global offset table entry for a symbols
-tls_index structure. Used in conjunction with
-BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21. */
- BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC,
-
-/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP
-instruction. */
- BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21,
-
-/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */
- BFD_RELOC_AARCH64_TLSLD_ADR_PREL21,
-
-/* bit[11:1] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
-
-/* bit[11:2] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
-
-/* bit[11:3] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
-
-/* bit[11:0] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
-
-/* bit[15:0] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
-
-/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
-
-/* bit[31:16] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
-
-/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
-
-/* bit[47:32] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC,
-
-/* bit[11:1] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
-
-/* bit[11:2] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
-
-/* bit[11:3] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
-
-/* bit[11:0] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LD_PREL19,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LD64_LO12,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADD_LO12,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_OFF_G1,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LDR,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADD,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_CALL,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_COPY,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_GLOB_DAT,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_JUMP_SLOT,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_RELATIVE,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLS_DTPMOD,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLS_DTPREL,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLS_TPREL,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLSDESC,
-
-/* AArch64 support for STT_GNU_IFUNC. */
- BFD_RELOC_AARCH64_IRELATIVE,
-
-/* AArch64 pseudo relocation code to mark the end of the AArch64
-relocation enumerators that have direct mapping to ELF reloc codes.
-There are a few more enumerators after this one; those are mainly
-used by the AArch64 assembler for the internal fixup or to select
-one of the above enumerators. */
- BFD_RELOC_AARCH64_RELOC_END,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP,
-
-/* AArch64 unspecified load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST_LO12,
-
-/* AArch64 pseudo relocation code for TLS local dynamic mode. It's to be
-used internally by the AArch64 assembler and not (currently) written to
-any object files. */
- BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC,
-
-/* AArch64 pseudo relocation code for TLS local exec mode. It's to be
-used internally by the AArch64 assembler and not (currently) written to
-any object files. */
- BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_LD_GOT_LO12_NC,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC,
-
-/* Tilera TILEPro Relocations. */
- BFD_RELOC_TILEPRO_COPY,
- BFD_RELOC_TILEPRO_GLOB_DAT,
- BFD_RELOC_TILEPRO_JMP_SLOT,
- BFD_RELOC_TILEPRO_RELATIVE,
- BFD_RELOC_TILEPRO_BROFF_X1,
- BFD_RELOC_TILEPRO_JOFFLONG_X1,
- BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT,
- BFD_RELOC_TILEPRO_IMM8_X0,
- BFD_RELOC_TILEPRO_IMM8_Y0,
- BFD_RELOC_TILEPRO_IMM8_X1,
- BFD_RELOC_TILEPRO_IMM8_Y1,
- BFD_RELOC_TILEPRO_DEST_IMM8_X1,
- BFD_RELOC_TILEPRO_MT_IMM15_X1,
- BFD_RELOC_TILEPRO_MF_IMM15_X1,
- BFD_RELOC_TILEPRO_IMM16_X0,
- BFD_RELOC_TILEPRO_IMM16_X1,
- BFD_RELOC_TILEPRO_IMM16_X0_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_HA,
- BFD_RELOC_TILEPRO_IMM16_X0_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA,
- BFD_RELOC_TILEPRO_MMSTART_X0,
- BFD_RELOC_TILEPRO_MMEND_X0,
- BFD_RELOC_TILEPRO_MMSTART_X1,
- BFD_RELOC_TILEPRO_MMEND_X1,
- BFD_RELOC_TILEPRO_SHAMT_X0,
- BFD_RELOC_TILEPRO_SHAMT_X1,
- BFD_RELOC_TILEPRO_SHAMT_Y0,
- BFD_RELOC_TILEPRO_SHAMT_Y1,
- BFD_RELOC_TILEPRO_TLS_GD_CALL,
- BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_TLS_IE_LOAD,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA,
- BFD_RELOC_TILEPRO_TLS_DTPMOD32,
- BFD_RELOC_TILEPRO_TLS_DTPOFF32,
- BFD_RELOC_TILEPRO_TLS_TPOFF32,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
-
-/* Tilera TILE-Gx Relocations. */
- BFD_RELOC_TILEGX_HW0,
- BFD_RELOC_TILEGX_HW1,
- BFD_RELOC_TILEGX_HW2,
- BFD_RELOC_TILEGX_HW3,
- BFD_RELOC_TILEGX_HW0_LAST,
- BFD_RELOC_TILEGX_HW1_LAST,
- BFD_RELOC_TILEGX_HW2_LAST,
- BFD_RELOC_TILEGX_COPY,
- BFD_RELOC_TILEGX_GLOB_DAT,
- BFD_RELOC_TILEGX_JMP_SLOT,
- BFD_RELOC_TILEGX_RELATIVE,
- BFD_RELOC_TILEGX_BROFF_X1,
- BFD_RELOC_TILEGX_JUMPOFF_X1,
- BFD_RELOC_TILEGX_JUMPOFF_X1_PLT,
- BFD_RELOC_TILEGX_IMM8_X0,
- BFD_RELOC_TILEGX_IMM8_Y0,
- BFD_RELOC_TILEGX_IMM8_X1,
- BFD_RELOC_TILEGX_IMM8_Y1,
- BFD_RELOC_TILEGX_DEST_IMM8_X1,
- BFD_RELOC_TILEGX_MT_IMM14_X1,
- BFD_RELOC_TILEGX_MF_IMM14_X1,
- BFD_RELOC_TILEGX_MMSTART_X0,
- BFD_RELOC_TILEGX_MMEND_X0,
- BFD_RELOC_TILEGX_SHAMT_X0,
- BFD_RELOC_TILEGX_SHAMT_X1,
- BFD_RELOC_TILEGX_SHAMT_Y0,
- BFD_RELOC_TILEGX_SHAMT_Y1,
- BFD_RELOC_TILEGX_IMM16_X0_HW0,
- BFD_RELOC_TILEGX_IMM16_X1_HW0,
- BFD_RELOC_TILEGX_IMM16_X0_HW1,
- BFD_RELOC_TILEGX_IMM16_X1_HW1,
- BFD_RELOC_TILEGX_IMM16_X0_HW2,
- BFD_RELOC_TILEGX_IMM16_X1_HW2,
- BFD_RELOC_TILEGX_IMM16_X0_HW3,
- BFD_RELOC_TILEGX_IMM16_X1_HW3,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE,
- BFD_RELOC_TILEGX_TLS_DTPMOD64,
- BFD_RELOC_TILEGX_TLS_DTPOFF64,
- BFD_RELOC_TILEGX_TLS_TPOFF64,
- BFD_RELOC_TILEGX_TLS_DTPMOD32,
- BFD_RELOC_TILEGX_TLS_DTPOFF32,
- BFD_RELOC_TILEGX_TLS_TPOFF32,
- BFD_RELOC_TILEGX_TLS_GD_CALL,
- BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
- BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
- BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
- BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD,
- BFD_RELOC_TILEGX_TLS_IE_LOAD,
- BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
- BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
- BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD,
- BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD,
-
-/* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */
- BFD_RELOC_EPIPHANY_SIMM8,
-
-/* Adapteva EPIPHANY - 24 bit signed pc-relative displacement */
- BFD_RELOC_EPIPHANY_SIMM24,
-
-/* Adapteva EPIPHANY - 16 most-significant bits of absolute address */
- BFD_RELOC_EPIPHANY_HIGH,
-
-/* Adapteva EPIPHANY - 16 least-significant bits of absolute address */
- BFD_RELOC_EPIPHANY_LOW,
-
-/* Adapteva EPIPHANY - 11 bit signed number - add/sub immediate */
- BFD_RELOC_EPIPHANY_SIMM11,
-
-/* Adapteva EPIPHANY - 11 bit sign-magnitude number (ld/st displacement) */
- BFD_RELOC_EPIPHANY_IMM11,
-
-/* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */
- BFD_RELOC_EPIPHANY_IMM8,
-
-/* Visium Relocations. */
- BFD_RELOC_VISIUM_HI16,
- BFD_RELOC_VISIUM_LO16,
- BFD_RELOC_VISIUM_IM16,
- BFD_RELOC_VISIUM_REL16,
- BFD_RELOC_VISIUM_HI16_PCREL,
- BFD_RELOC_VISIUM_LO16_PCREL,
- BFD_RELOC_VISIUM_IM16_PCREL,
-
-/* WebAssembly relocations. */
- BFD_RELOC_WASM32_LEB128,
- BFD_RELOC_WASM32_LEB128_GOT,
- BFD_RELOC_WASM32_LEB128_GOT_CODE,
- BFD_RELOC_WASM32_LEB128_PLT,
- BFD_RELOC_WASM32_PLT_INDEX,
- BFD_RELOC_WASM32_ABS32_CODE,
- BFD_RELOC_WASM32_COPY,
- BFD_RELOC_WASM32_CODE_POINTER,
- BFD_RELOC_WASM32_INDEX,
- BFD_RELOC_WASM32_PLT_SIG,
-
-/* C-SKY relocations. */
- BFD_RELOC_CKCORE_NONE,
- BFD_RELOC_CKCORE_ADDR32,
- BFD_RELOC_CKCORE_PCREL_IMM8BY4,
- BFD_RELOC_CKCORE_PCREL_IMM11BY2,
- BFD_RELOC_CKCORE_PCREL_IMM4BY2,
- BFD_RELOC_CKCORE_PCREL32,
- BFD_RELOC_CKCORE_PCREL_JSR_IMM11BY2,
- BFD_RELOC_CKCORE_GNU_VTINHERIT,
- BFD_RELOC_CKCORE_GNU_VTENTRY,
- BFD_RELOC_CKCORE_RELATIVE,
- BFD_RELOC_CKCORE_COPY,
- BFD_RELOC_CKCORE_GLOB_DAT,
- BFD_RELOC_CKCORE_JUMP_SLOT,
- BFD_RELOC_CKCORE_GOTOFF,
- BFD_RELOC_CKCORE_GOTPC,
- BFD_RELOC_CKCORE_GOT32,
- BFD_RELOC_CKCORE_PLT32,
- BFD_RELOC_CKCORE_ADDRGOT,
- BFD_RELOC_CKCORE_ADDRPLT,
- BFD_RELOC_CKCORE_PCREL_IMM26BY2,
- BFD_RELOC_CKCORE_PCREL_IMM16BY2,
- BFD_RELOC_CKCORE_PCREL_IMM16BY4,
- BFD_RELOC_CKCORE_PCREL_IMM10BY2,
- BFD_RELOC_CKCORE_PCREL_IMM10BY4,
- BFD_RELOC_CKCORE_ADDR_HI16,
- BFD_RELOC_CKCORE_ADDR_LO16,
- BFD_RELOC_CKCORE_GOTPC_HI16,
- BFD_RELOC_CKCORE_GOTPC_LO16,
- BFD_RELOC_CKCORE_GOTOFF_HI16,
- BFD_RELOC_CKCORE_GOTOFF_LO16,
- BFD_RELOC_CKCORE_GOT12,
- BFD_RELOC_CKCORE_GOT_HI16,
- BFD_RELOC_CKCORE_GOT_LO16,
- BFD_RELOC_CKCORE_PLT12,
- BFD_RELOC_CKCORE_PLT_HI16,
- BFD_RELOC_CKCORE_PLT_LO16,
- BFD_RELOC_CKCORE_ADDRGOT_HI16,
- BFD_RELOC_CKCORE_ADDRGOT_LO16,
- BFD_RELOC_CKCORE_ADDRPLT_HI16,
- BFD_RELOC_CKCORE_ADDRPLT_LO16,
- BFD_RELOC_CKCORE_PCREL_JSR_IMM26BY2,
- BFD_RELOC_CKCORE_TOFFSET_LO16,
- BFD_RELOC_CKCORE_DOFFSET_LO16,
- BFD_RELOC_CKCORE_PCREL_IMM18BY2,
- BFD_RELOC_CKCORE_DOFFSET_IMM18,
- BFD_RELOC_CKCORE_DOFFSET_IMM18BY2,
- BFD_RELOC_CKCORE_DOFFSET_IMM18BY4,
- BFD_RELOC_CKCORE_GOTOFF_IMM18,
- BFD_RELOC_CKCORE_GOT_IMM18BY4,
- BFD_RELOC_CKCORE_PLT_IMM18BY4,
- BFD_RELOC_CKCORE_PCREL_IMM7BY4,
- BFD_RELOC_CKCORE_TLS_LE32,
- BFD_RELOC_CKCORE_TLS_IE32,
- BFD_RELOC_CKCORE_TLS_GD32,
- BFD_RELOC_CKCORE_TLS_LDM32,
- BFD_RELOC_CKCORE_TLS_LDO32,
- BFD_RELOC_CKCORE_TLS_DTPMOD32,
- BFD_RELOC_CKCORE_TLS_DTPOFF32,
- BFD_RELOC_CKCORE_TLS_TPOFF32,
- BFD_RELOC_CKCORE_PCREL_FLRW_IMM8BY4,
- BFD_RELOC_CKCORE_NOJSRI,
- BFD_RELOC_CKCORE_CALLGRAPH,
- BFD_RELOC_CKCORE_IRELATIVE,
- BFD_RELOC_CKCORE_PCREL_BLOOP_IMM4BY4,
- BFD_RELOC_CKCORE_PCREL_BLOOP_IMM12BY4,
-
-/* S12Z relocations. */
- BFD_RELOC_S12Z_OPR,
- BFD_RELOC_UNUSED };
-
-typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
-reloc_howto_type *bfd_reloc_type_lookup
- (bfd *abfd, bfd_reloc_code_real_type code);
-reloc_howto_type *bfd_reloc_name_lookup
- (bfd *abfd, const char *reloc_name);
-
-const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
-
-/* Extracted from syms.c. */
-
-typedef struct bfd_symbol
-{
- /* A pointer to the BFD which owns the symbol. This information
- is necessary so that a back end can work out what additional
- information (invisible to the application writer) is carried
- with the symbol.
-
- This field is *almost* redundant, since you can use section->owner
- instead, except that some symbols point to the global sections
- bfd_{abs,com,und}_section. This could be fixed by making
- these globals be per-bfd (or per-target-flavor). FIXME. */
- struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
-
- /* The text of the symbol. The name is left alone, and not copied; the
- application may not alter it. */
- const char *name;
-
- /* The value of the symbol. This really should be a union of a
- numeric value with a pointer, since some flags indicate that
- a pointer to another symbol is stored here. */
- symvalue value;
-
- /* Attributes of a symbol. */
-#define BSF_NO_FLAGS 0
-
- /* The symbol has local scope; <> in <>. The value
- is the offset into the section of the data. */
-#define BSF_LOCAL (1 << 0)
-
- /* The symbol has global scope; initialized data in <>. The
- value is the offset into the section of the data. */
-#define BSF_GLOBAL (1 << 1)
-
- /* The symbol has global scope and is exported. The value is
- the offset into the section of the data. */
-#define BSF_EXPORT BSF_GLOBAL /* No real difference. */
-
- /* A normal C symbol would be one of:
- <>, <> or <>. */
-
- /* The symbol is a debugging record. The value has an arbitrary
- meaning, unless BSF_DEBUGGING_RELOC is also set. */
-#define BSF_DEBUGGING (1 << 2)
-
- /* The symbol denotes a function entry point. Used in ELF,
- perhaps others someday. */
-#define BSF_FUNCTION (1 << 3)
-
- /* Used by the linker. */
-#define BSF_KEEP (1 << 5)
-
- /* An ELF common symbol. */
-#define BSF_ELF_COMMON (1 << 6)
-
- /* A weak global symbol, overridable without warnings by
- a regular global symbol of the same name. */
-#define BSF_WEAK (1 << 7)
-
- /* This symbol was created to point to a section, e.g. ELF's
- STT_SECTION symbols. */
-#define BSF_SECTION_SYM (1 << 8)
-
- /* The symbol used to be a common symbol, but now it is
- allocated. */
-#define BSF_OLD_COMMON (1 << 9)
-
- /* In some files the type of a symbol sometimes alters its
- location in an output file - ie in coff a <> symbol
- which is also <> symbol appears where it was
- declared and not at the end of a section. This bit is set
- by the target BFD part to convey this information. */
-#define BSF_NOT_AT_END (1 << 10)
-
- /* Signal that the symbol is the label of constructor section. */
-#define BSF_CONSTRUCTOR (1 << 11)
-
- /* Signal that the symbol is a warning symbol. The name is a
- warning. The name of the next symbol is the one to warn about;
- if a reference is made to a symbol with the same name as the next
- symbol, a warning is issued by the linker. */
-#define BSF_WARNING (1 << 12)
-
- /* Signal that the symbol is indirect. This symbol is an indirect
- pointer to the symbol with the same name as the next symbol. */
-#define BSF_INDIRECT (1 << 13)
-
- /* BSF_FILE marks symbols that contain a file name. This is used
- for ELF STT_FILE symbols. */
-#define BSF_FILE (1 << 14)
-
- /* Symbol is from dynamic linking information. */
-#define BSF_DYNAMIC (1 << 15)
-
- /* The symbol denotes a data object. Used in ELF, and perhaps
- others someday. */
-#define BSF_OBJECT (1 << 16)
-
- /* This symbol is a debugging symbol. The value is the offset
- into the section of the data. BSF_DEBUGGING should be set
- as well. */
-#define BSF_DEBUGGING_RELOC (1 << 17)
-
- /* This symbol is thread local. Used in ELF. */
-#define BSF_THREAD_LOCAL (1 << 18)
-
- /* This symbol represents a complex relocation expression,
- with the expression tree serialized in the symbol name. */
-#define BSF_RELC (1 << 19)
-
- /* This symbol represents a signed complex relocation expression,
- with the expression tree serialized in the symbol name. */
-#define BSF_SRELC (1 << 20)
-
- /* This symbol was created by bfd_get_synthetic_symtab. */
-#define BSF_SYNTHETIC (1 << 21)
-
- /* This symbol is an indirect code object. Unrelated to BSF_INDIRECT.
- The dynamic linker will compute the value of this symbol by
- calling the function that it points to. BSF_FUNCTION must
- also be also set. */
-#define BSF_GNU_INDIRECT_FUNCTION (1 << 22)
- /* This symbol is a globally unique data object. The dynamic linker
- will make sure that in the entire process there is just one symbol
- with this name and type in use. BSF_OBJECT must also be set. */
-#define BSF_GNU_UNIQUE (1 << 23)
-
- flagword flags;
-
- /* A pointer to the section to which this symbol is
- relative. This will always be non NULL, there are special
- sections for undefined and absolute symbols. */
- struct bfd_section *section;
-
- /* Back end special data. */
- union
- {
- void *p;
- bfd_vma i;
- }
- udata;
-}
-asymbol;
-
-#define bfd_get_symtab_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
-
-bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
-
-bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
-
-#define bfd_is_local_label_name(abfd, name) \
- BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
-
-bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
-
-#define bfd_is_target_special_symbol(abfd, sym) \
- BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
-
-#define bfd_canonicalize_symtab(abfd, location) \
- BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
-
-bfd_boolean bfd_set_symtab
- (bfd *abfd, asymbol **location, unsigned int count);
-
-void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
-
-#define bfd_make_empty_symbol(abfd) \
- BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
-
-asymbol *_bfd_generic_make_empty_symbol (bfd *);
-
-#define bfd_make_debug_symbol(abfd,ptr,size) \
- BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
-
-int bfd_decode_symclass (asymbol *symbol);
-
-bfd_boolean bfd_is_undefined_symclass (int symclass);
-
-void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
-
-bfd_boolean bfd_copy_private_symbol_data
- (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
-
-#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
- BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
- (ibfd, isymbol, obfd, osymbol))
-
-/* Extracted from bfd.c. */
-
-enum bfd_direction
- {
- no_direction = 0,
- read_direction = 1,
- write_direction = 2,
- both_direction = 3
- };
-
-enum bfd_plugin_format
- {
- bfd_plugin_unknown = 0,
- bfd_plugin_yes = 1,
- bfd_plugin_no = 2
- };
-
-struct bfd_build_id
- {
- bfd_size_type size;
- bfd_byte data[1];
- };
-
-struct bfd
-{
- /* The filename the application opened the BFD with. */
- const char *filename;
-
- /* A pointer to the target jump table. */
- const struct bfd_target *xvec;
-
- /* The IOSTREAM, and corresponding IO vector that provide access
- to the file backing the BFD. */
- void *iostream;
- const struct bfd_iovec *iovec;
-
- /* The caching routines use these to maintain a
- least-recently-used list of BFDs. */
- struct bfd *lru_prev, *lru_next;
-
- /* Track current file position (or current buffer offset for
- in-memory BFDs). When a file is closed by the caching routines,
- BFD retains state information on the file here. */
- ufile_ptr where;
-
- /* File modified time, if mtime_set is TRUE. */
- long mtime;
-
- /* A unique identifier of the BFD */
- unsigned int id;
-
- /* The format which belongs to the BFD. (object, core, etc.) */
- ENUM_BITFIELD (bfd_format) format : 3;
-
- /* The direction with which the BFD was opened. */
- ENUM_BITFIELD (bfd_direction) direction : 2;
-
- /* Format_specific flags. */
- flagword flags : 20;
-
- /* Values that may appear in the flags field of a BFD. These also
- appear in the object_flags field of the bfd_target structure, where
- they indicate the set of flags used by that backend (not all flags
- are meaningful for all object file formats) (FIXME: at the moment,
- the object_flags values have mostly just been copied from backend
- to another, and are not necessarily correct). */
-
-#define BFD_NO_FLAGS 0x0
-
- /* BFD contains relocation entries. */
-#define HAS_RELOC 0x1
-
- /* BFD is directly executable. */
-#define EXEC_P 0x2
-
- /* BFD has line number information (basically used for F_LNNO in a
- COFF header). */
-#define HAS_LINENO 0x4
-
- /* BFD has debugging information. */
-#define HAS_DEBUG 0x08
-
- /* BFD has symbols. */
-#define HAS_SYMS 0x10
-
- /* BFD has local symbols (basically used for F_LSYMS in a COFF
- header). */
-#define HAS_LOCALS 0x20
-
- /* BFD is a dynamic object. */
-#define DYNAMIC 0x40
-
- /* Text section is write protected (if D_PAGED is not set, this is
- like an a.out NMAGIC file) (the linker sets this by default, but
- clears it for -r or -N). */
-#define WP_TEXT 0x80
-
- /* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the
- linker sets this by default, but clears it for -r or -n or -N). */
-#define D_PAGED 0x100
-
- /* BFD is relaxable (this means that bfd_relax_section may be able to
- do something) (sometimes bfd_relax_section can do something even if
- this is not set). */
-#define BFD_IS_RELAXABLE 0x200
-
- /* This may be set before writing out a BFD to request using a
- traditional format. For example, this is used to request that when
- writing out an a.out object the symbols not be hashed to eliminate
- duplicates. */
-#define BFD_TRADITIONAL_FORMAT 0x400
-
- /* This flag indicates that the BFD contents are actually cached
- in memory. If this is set, iostream points to a bfd_in_memory
- struct. */
-#define BFD_IN_MEMORY 0x800
-
- /* This BFD has been created by the linker and doesn't correspond
- to any input file. */
-#define BFD_LINKER_CREATED 0x1000
-
- /* This may be set before writing out a BFD to request that it
- be written using values for UIDs, GIDs, timestamps, etc. that
- will be consistent from run to run. */
-#define BFD_DETERMINISTIC_OUTPUT 0x2000
-
- /* Compress sections in this BFD. */
-#define BFD_COMPRESS 0x4000
-
- /* Decompress sections in this BFD. */
-#define BFD_DECOMPRESS 0x8000
-
- /* BFD is a dummy, for plugins. */
-#define BFD_PLUGIN 0x10000
-
- /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */
-#define BFD_COMPRESS_GABI 0x20000
-
- /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this
- BFD. */
-#define BFD_CONVERT_ELF_COMMON 0x40000
-
- /* Use the ELF STT_COMMON type in this BFD. */
-#define BFD_USE_ELF_STT_COMMON 0x80000
-
- /* Flags bits to be saved in bfd_preserve_save. */
-#define BFD_FLAGS_SAVED \
- (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
- | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \
- | BFD_USE_ELF_STT_COMMON)
-
- /* Flags bits which are for BFD use only. */
-#define BFD_FLAGS_FOR_BFD_USE_MASK \
- (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
- | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \
- | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON)
-
- /* Is the file descriptor being cached? That is, can it be closed as
- needed, and re-opened when accessed later? */
- unsigned int cacheable : 1;
-
- /* Marks whether there was a default target specified when the
- BFD was opened. This is used to select which matching algorithm
- to use to choose the back end. */
- unsigned int target_defaulted : 1;
-
- /* ... and here: (``once'' means at least once). */
- unsigned int opened_once : 1;
-
- /* Set if we have a locally maintained mtime value, rather than
- getting it from the file each time. */
- unsigned int mtime_set : 1;
-
- /* Flag set if symbols from this BFD should not be exported. */
- unsigned int no_export : 1;
-
- /* Remember when output has begun, to stop strange things
- from happening. */
- unsigned int output_has_begun : 1;
-
- /* Have archive map. */
- unsigned int has_armap : 1;
-
- /* Set if this is a thin archive. */
- unsigned int is_thin_archive : 1;
-
- /* Set if only required symbols should be added in the link hash table for
- this object. Used by VMS linkers. */
- unsigned int selective_search : 1;
-
- /* Set if this is the linker output BFD. */
- unsigned int is_linker_output : 1;
-
- /* Set if this is the linker input BFD. */
- unsigned int is_linker_input : 1;
-
- /* If this is an input for a compiler plug-in library. */
- ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2;
-
- /* Set if this is a plugin output file. */
- unsigned int lto_output : 1;
-
- /* Set to dummy BFD created when claimed by a compiler plug-in
- library. */
- bfd *plugin_dummy_bfd;
-
- /* Currently my_archive is tested before adding origin to
- anything. I believe that this can become always an add of
- origin, with origin set to 0 for non archive files. */
- ufile_ptr origin;
-
- /* The origin in the archive of the proxy entry. This will
- normally be the same as origin, except for thin archives,
- when it will contain the current offset of the proxy in the
- thin archive rather than the offset of the bfd in its actual
- container. */
- ufile_ptr proxy_origin;
-
- /* A hash table for section names. */
- struct bfd_hash_table section_htab;
-
- /* Pointer to linked list of sections. */
- struct bfd_section *sections;
-
- /* The last section on the section list. */
- struct bfd_section *section_last;
-
- /* The number of sections. */
- unsigned int section_count;
-
- /* A field used by _bfd_generic_link_add_archive_symbols. This will
- be used only for archive elements. */
- int archive_pass;
-
- /* Stuff only useful for object files:
- The start address. */
- bfd_vma start_address;
-
- /* Symbol table for output BFD (with symcount entries).
- Also used by the linker to cache input BFD symbols. */
- struct bfd_symbol **outsymbols;
-
- /* Used for input and output. */
- unsigned int symcount;
-
- /* Used for slurped dynamic symbol tables. */
- unsigned int dynsymcount;
-
- /* Pointer to structure which contains architecture information. */
- const struct bfd_arch_info *arch_info;
-
- /* Stuff only useful for archives. */
- void *arelt_data;
- struct bfd *my_archive; /* The containing archive BFD. */
- struct bfd *archive_next; /* The next BFD in the archive. */
- struct bfd *archive_head; /* The first BFD in the archive. */
- struct bfd *nested_archives; /* List of nested archive in a flattened
- thin archive. */
-
- union {
- /* For input BFDs, a chain of BFDs involved in a link. */
- struct bfd *next;
- /* For output BFD, the linker hash table. */
- struct bfd_link_hash_table *hash;
- } link;
-
- /* Used by the back end to hold private data. */
- union
- {
- struct aout_data_struct *aout_data;
- struct artdata *aout_ar_data;
- struct coff_tdata *coff_obj_data;
- struct pe_tdata *pe_obj_data;
- struct xcoff_tdata *xcoff_obj_data;
- struct ecoff_tdata *ecoff_obj_data;
- struct srec_data_struct *srec_data;
- struct verilog_data_struct *verilog_data;
- struct ihex_data_struct *ihex_data;
- struct tekhex_data_struct *tekhex_data;
- struct elf_obj_tdata *elf_obj_data;
- struct mmo_data_struct *mmo_data;
- struct sun_core_struct *sun_core_data;
- struct sco5_core_struct *sco5_core_data;
- struct trad_core_struct *trad_core_data;
- struct som_data_struct *som_data;
- struct hpux_core_struct *hpux_core_data;
- struct hppabsd_core_struct *hppabsd_core_data;
- struct sgi_core_struct *sgi_core_data;
- struct lynx_core_struct *lynx_core_data;
- struct osf_core_struct *osf_core_data;
- struct cisco_core_struct *cisco_core_data;
- struct versados_data_struct *versados_data;
- struct netbsd_core_struct *netbsd_core_data;
- struct mach_o_data_struct *mach_o_data;
- struct mach_o_fat_data_struct *mach_o_fat_data;
- struct plugin_data_struct *plugin_data;
- struct bfd_pef_data_struct *pef_data;
- struct bfd_pef_xlib_data_struct *pef_xlib_data;
- struct bfd_sym_data_struct *sym_data;
- void *any;
- }
- tdata;
-
- /* Used by the application to hold private data. */
- void *usrdata;
-
- /* Where all the allocated stuff under this BFD goes. This is a
- struct objalloc *, but we use void * to avoid requiring the inclusion
- of objalloc.h. */
- void *memory;
-
- /* For input BFDs, the build ID, if the object has one. */
- const struct bfd_build_id *build_id;
-};
-
-/* See note beside bfd_set_section_userdata. */
-static inline bfd_boolean
-bfd_set_cacheable (bfd * abfd, bfd_boolean val)
-{
- abfd->cacheable = val;
- return TRUE;
-}
-
-
-typedef enum bfd_error
-{
- bfd_error_no_error = 0,
- bfd_error_system_call,
- bfd_error_invalid_target,
- bfd_error_wrong_format,
- bfd_error_wrong_object_format,
- bfd_error_invalid_operation,
- bfd_error_no_memory,
- bfd_error_no_symbols,
- bfd_error_no_armap,
- bfd_error_no_more_archived_files,
- bfd_error_malformed_archive,
- bfd_error_missing_dso,
- bfd_error_file_not_recognized,
- bfd_error_file_ambiguously_recognized,
- bfd_error_no_contents,
- bfd_error_nonrepresentable_section,
- bfd_error_no_debug_section,
- bfd_error_bad_value,
- bfd_error_file_truncated,
- bfd_error_file_too_big,
- bfd_error_on_input,
- bfd_error_invalid_error_code
-}
-bfd_error_type;
-
-bfd_error_type bfd_get_error (void);
-
-void bfd_set_error (bfd_error_type error_tag);
-
-void bfd_set_input_error (bfd *input, bfd_error_type error_tag);
-
-const char *bfd_errmsg (bfd_error_type error_tag);
-
-void bfd_perror (const char *message);
-
-
-typedef void (*bfd_error_handler_type) (const char *, va_list);
-
-void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1;
-
-bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
-
-void bfd_set_error_program_name (const char *);
-
-
-typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg,
- const char *bfd_version,
- const char *bfd_file,
- int bfd_line);
-
-bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type);
-
-long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
-
-long bfd_canonicalize_reloc
- (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
-
-void bfd_set_reloc
- (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
-
-#define bfd_set_reloc(abfd, asect, location, count) \
- BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count))
-bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
-
-int bfd_get_arch_size (bfd *abfd);
-
-int bfd_get_sign_extend_vma (bfd *abfd);
-
-bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
-
-unsigned int bfd_get_gp_size (bfd *abfd);
-
-void bfd_set_gp_size (bfd *abfd, unsigned int i);
-
-bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
-
-bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
-
-#define bfd_copy_private_header_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_copy_private_header_data, \
- (ibfd, obfd))
-bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
-
-#define bfd_copy_private_bfd_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
- (ibfd, obfd))
-bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
-
-#define bfd_set_private_flags(abfd, flags) \
- BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
-#define bfd_sizeof_headers(abfd, info) \
- BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info))
-
-#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
- BFD_SEND (abfd, _bfd_find_nearest_line, \
- (abfd, syms, sec, off, file, func, line, NULL))
-
-#define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \
- line, disc) \
- BFD_SEND (abfd, _bfd_find_nearest_line, \
- (abfd, syms, sec, off, file, func, line, disc))
-
-#define bfd_find_line(abfd, syms, sym, file, line) \
- BFD_SEND (abfd, _bfd_find_line, \
- (abfd, syms, sym, file, line))
-
-#define bfd_find_inliner_info(abfd, file, func, line) \
- BFD_SEND (abfd, _bfd_find_inliner_info, \
- (abfd, file, func, line))
-
-#define bfd_debug_info_start(abfd) \
- BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
-
-#define bfd_debug_info_end(abfd) \
- BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
-
-#define bfd_debug_info_accumulate(abfd, section) \
- BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
-
-#define bfd_stat_arch_elt(abfd, stat) \
- BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
-
-#define bfd_update_armap_timestamp(abfd) \
- BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
-
-#define bfd_set_arch_mach(abfd, arch, mach)\
- BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
-
-#define bfd_relax_section(abfd, section, link_info, again) \
- BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
-
-#define bfd_gc_sections(abfd, link_info) \
- BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
-
-#define bfd_lookup_section_flags(link_info, flag_info, section) \
- BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info, section))
-
-#define bfd_merge_sections(abfd, link_info) \
- BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
-
-#define bfd_is_group_section(abfd, sec) \
- BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
-
-#define bfd_discard_group(abfd, sec) \
- BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
-
-#define bfd_link_hash_table_create(abfd) \
- BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
-
-#define bfd_link_add_symbols(abfd, info) \
- BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
-
-#define bfd_link_just_syms(abfd, sec, info) \
- BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
-
-#define bfd_final_link(abfd, info) \
- BFD_SEND (abfd, _bfd_final_link, (abfd, info))
-
-#define bfd_free_cached_info(abfd) \
- BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
-
-#define bfd_get_dynamic_symtab_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
-
-#define bfd_print_private_bfd_data(abfd, file)\
- BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
-
-#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
- BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
-
-#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
- BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
- dyncount, dynsyms, ret))
-
-#define bfd_get_dynamic_reloc_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
-
-#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
- BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
-
-extern bfd_byte *bfd_get_relocated_section_contents
- (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
- bfd_boolean, asymbol **);
-
-bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
-
-bfd_vma bfd_emul_get_maxpagesize (const char *);
-
-void bfd_emul_set_maxpagesize (const char *, bfd_vma);
-
-bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean);
-
-void bfd_emul_set_commonpagesize (const char *, bfd_vma);
-
-char *bfd_demangle (bfd *, const char *, int);
-
-void bfd_update_compression_header
- (bfd *abfd, bfd_byte *contents, asection *sec);
-
-bfd_boolean bfd_check_compression_header
- (bfd *abfd, bfd_byte *contents, asection *sec,
- bfd_size_type *uncompressed_size,
- unsigned int *uncompressed_alignment_power);
-
-int bfd_get_compression_header_size (bfd *abfd, asection *sec);
-
-bfd_size_type bfd_convert_section_size
- (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size);
-
-bfd_boolean bfd_convert_section_contents
- (bfd *ibfd, asection *isec, bfd *obfd,
- bfd_byte **ptr, bfd_size_type *ptr_size);
-
-/* Extracted from archive.c. */
-symindex bfd_get_next_mapent
- (bfd *abfd, symindex previous, carsym **sym);
-
-bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
-
-bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
-
-/* Extracted from corefile.c. */
-const char *bfd_core_file_failing_command (bfd *abfd);
-
-int bfd_core_file_failing_signal (bfd *abfd);
-
-int bfd_core_file_pid (bfd *abfd);
-
-bfd_boolean core_file_matches_executable_p
- (bfd *core_bfd, bfd *exec_bfd);
-
-bfd_boolean generic_core_file_matches_executable_p
- (bfd *core_bfd, bfd *exec_bfd);
-
-/* Extracted from targets.c. */
-#define BFD_SEND(bfd, message, arglist) \
- ((*((bfd)->xvec->message)) arglist)
-
-#ifdef DEBUG_BFD_SEND
-#undef BFD_SEND
-#define BFD_SEND(bfd, message, arglist) \
- (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
- ((*((bfd)->xvec->message)) arglist) : \
- (bfd_assert (__FILE__,__LINE__), NULL))
-#endif
-#define BFD_SEND_FMT(bfd, message, arglist) \
- (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
-
-#ifdef DEBUG_BFD_SEND
-#undef BFD_SEND_FMT
-#define BFD_SEND_FMT(bfd, message, arglist) \
- (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
- (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
- (bfd_assert (__FILE__,__LINE__), NULL))
-#endif
-
-enum bfd_flavour
-{
- /* N.B. Update bfd_flavour_name if you change this. */
- bfd_target_unknown_flavour,
- bfd_target_aout_flavour,
- bfd_target_coff_flavour,
- bfd_target_ecoff_flavour,
- bfd_target_xcoff_flavour,
- bfd_target_elf_flavour,
- bfd_target_tekhex_flavour,
- bfd_target_srec_flavour,
- bfd_target_verilog_flavour,
- bfd_target_ihex_flavour,
- bfd_target_som_flavour,
- bfd_target_os9k_flavour,
- bfd_target_versados_flavour,
- bfd_target_msdos_flavour,
- bfd_target_ovax_flavour,
- bfd_target_evax_flavour,
- bfd_target_mmo_flavour,
- bfd_target_mach_o_flavour,
- bfd_target_pef_flavour,
- bfd_target_pef_xlib_flavour,
- bfd_target_sym_flavour
-};
-
-enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
-
-/* Forward declaration. */
-typedef struct bfd_link_info _bfd_link_info;
-
-/* Forward declaration. */
-typedef struct flag_info flag_info;
-
-typedef struct bfd_target
-{
- /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */
- char *name;
-
- /* The "flavour" of a back end is a general indication about
- the contents of a file. */
- enum bfd_flavour flavour;
-
- /* The order of bytes within the data area of a file. */
- enum bfd_endian byteorder;
-
- /* The order of bytes within the header parts of a file. */
- enum bfd_endian header_byteorder;
-
- /* A mask of all the flags which an executable may have set -
- from the set <>, <>, ...<>. */
- flagword object_flags;
-
- /* A mask of all the flags which a section may have set - from
- the set <>, <>, ...<>. */
- flagword section_flags;
-
- /* The character normally found at the front of a symbol.
- (if any), perhaps `_'. */
- char symbol_leading_char;
-
- /* The pad character for file names within an archive header. */
- char ar_pad_char;
-
- /* The maximum number of characters in an archive header. */
- unsigned char ar_max_namelen;
-
- /* How well this target matches, used to select between various
- possible targets when more than one target matches. */
- unsigned char match_priority;
-
- /* Entries for byte swapping for data. These are different from the
- other entry points, since they don't take a BFD as the first argument.
- Certain other handlers could do the same. */
- bfd_uint64_t (*bfd_getx64) (const void *);
- bfd_int64_t (*bfd_getx_signed_64) (const void *);
- void (*bfd_putx64) (bfd_uint64_t, void *);
- bfd_vma (*bfd_getx32) (const void *);
- bfd_signed_vma (*bfd_getx_signed_32) (const void *);
- void (*bfd_putx32) (bfd_vma, void *);
- bfd_vma (*bfd_getx16) (const void *);
- bfd_signed_vma (*bfd_getx_signed_16) (const void *);
- void (*bfd_putx16) (bfd_vma, void *);
-
- /* Byte swapping for the headers. */
- bfd_uint64_t (*bfd_h_getx64) (const void *);
- bfd_int64_t (*bfd_h_getx_signed_64) (const void *);
- void (*bfd_h_putx64) (bfd_uint64_t, void *);
- bfd_vma (*bfd_h_getx32) (const void *);
- bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
- void (*bfd_h_putx32) (bfd_vma, void *);
- bfd_vma (*bfd_h_getx16) (const void *);
- bfd_signed_vma (*bfd_h_getx_signed_16) (const void *);
- void (*bfd_h_putx16) (bfd_vma, void *);
-
- /* Format dependent routines: these are vectors of entry points
- within the target vector structure, one for each format to check. */
-
- /* Check the format of a file being read. Return a <> or zero. */
- const struct bfd_target *
- (*_bfd_check_format[bfd_type_end]) (bfd *);
-
- /* Set the format of a file being written. */
- bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
-
- /* Write cached information into a file being written, at <>. */
- bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
-
-
- /* Generic entry points. */
-#define BFD_JUMP_TABLE_GENERIC(NAME) \
- NAME##_close_and_cleanup, \
- NAME##_bfd_free_cached_info, \
- NAME##_new_section_hook, \
- NAME##_get_section_contents, \
- NAME##_get_section_contents_in_window
-
- /* Called when the BFD is being closed to do any necessary cleanup. */
- bfd_boolean (*_close_and_cleanup) (bfd *);
- /* Ask the BFD to free all cached information. */
- bfd_boolean (*_bfd_free_cached_info) (bfd *);
- /* Called when a new section is created. */
- bfd_boolean (*_new_section_hook) (bfd *, sec_ptr);
- /* Read the contents of a section. */
- bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr,
- bfd_size_type);
- bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr,
- bfd_window *, file_ptr,
- bfd_size_type);
-
- /* Entry points to copy private data. */
-#define BFD_JUMP_TABLE_COPY(NAME) \
- NAME##_bfd_copy_private_bfd_data, \
- NAME##_bfd_merge_private_bfd_data, \
- _bfd_generic_init_private_section_data, \
- NAME##_bfd_copy_private_section_data, \
- NAME##_bfd_copy_private_symbol_data, \
- NAME##_bfd_copy_private_header_data, \
- NAME##_bfd_set_private_flags, \
- NAME##_bfd_print_private_bfd_data
-
- /* Called to copy BFD general private data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
- /* Called to merge BFD general private data from one object file
- to a common output file when linking. */
- bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *);
- /* Called to initialize BFD private section data from one object file
- to another. */
-#define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
- BFD_SEND (obfd, _bfd_init_private_section_data, \
- (ibfd, isec, obfd, osec, link_info))
- bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *,
- sec_ptr,
- struct bfd_link_info *);
- /* Called to copy BFD private section data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *,
- sec_ptr);
- /* Called to copy BFD private symbol data from one symbol
- to another. */
- bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *,
- asymbol *);
- /* Called to copy BFD private header data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *);
- /* Called to set private backend flags. */
- bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
-
- /* Called to print private BFD data. */
- bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *);
-
- /* Core file entry points. */
-#define BFD_JUMP_TABLE_CORE(NAME) \
- NAME##_core_file_failing_command, \
- NAME##_core_file_failing_signal, \
- NAME##_core_file_matches_executable_p, \
- NAME##_core_file_pid
-
- char * (*_core_file_failing_command) (bfd *);
- int (*_core_file_failing_signal) (bfd *);
- bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *);
- int (*_core_file_pid) (bfd *);
-
- /* Archive entry points. */
-#define BFD_JUMP_TABLE_ARCHIVE(NAME) \
- NAME##_slurp_armap, \
- NAME##_slurp_extended_name_table, \
- NAME##_construct_extended_name_table, \
- NAME##_truncate_arname, \
- NAME##_write_armap, \
- NAME##_read_ar_hdr, \
- NAME##_write_ar_hdr, \
- NAME##_openr_next_archived_file, \
- NAME##_get_elt_at_index, \
- NAME##_generic_stat_arch_elt, \
- NAME##_update_armap_timestamp
-
- bfd_boolean (*_bfd_slurp_armap) (bfd *);
- bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *);
- bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **,
- bfd_size_type *,
- const char **);
- void (*_bfd_truncate_arname) (bfd *, const char *, char *);
- bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *,
- unsigned int, int);
- void * (*_bfd_read_ar_hdr_fn) (bfd *);
- bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *);
- bfd * (*openr_next_archived_file) (bfd *, bfd *);
-#define bfd_get_elt_at_index(b,i) \
- BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
- bfd * (*_bfd_get_elt_at_index) (bfd *, symindex);
- int (*_bfd_stat_arch_elt) (bfd *, struct stat *);
- bfd_boolean (*_bfd_update_armap_timestamp) (bfd *);
-
- /* Entry points used for symbols. */
-#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
- NAME##_get_symtab_upper_bound, \
- NAME##_canonicalize_symtab, \
- NAME##_make_empty_symbol, \
- NAME##_print_symbol, \
- NAME##_get_symbol_info, \
- NAME##_get_symbol_version_string, \
- NAME##_bfd_is_local_label_name, \
- NAME##_bfd_is_target_special_symbol, \
- NAME##_get_lineno, \
- NAME##_find_nearest_line, \
- NAME##_find_line, \
- NAME##_find_inliner_info, \
- NAME##_bfd_make_debug_symbol, \
- NAME##_read_minisymbols, \
- NAME##_minisymbol_to_symbol
-
- long (*_bfd_get_symtab_upper_bound) (bfd *);
- long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **);
- struct bfd_symbol *
- (*_bfd_make_empty_symbol) (bfd *);
- void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *,
- bfd_print_symbol_type);
-#define bfd_print_symbol(b,p,s,e) \
- BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
- void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *,
- symbol_info *);
-#define bfd_get_symbol_info(b,p,e) \
- BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
- const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *,
- bfd_boolean *);
-#define bfd_get_symbol_version_string(b,s,h) \
- BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h))
- bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
- bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
- alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
- bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **,
- struct bfd_section *, bfd_vma,
- const char **, const char **,
- unsigned int *, unsigned int *);
- bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **,
- struct bfd_symbol *, const char **,
- unsigned int *);
- bfd_boolean (*_bfd_find_inliner_info)
- (bfd *, const char **, const char **, unsigned int *);
- /* Back-door to allow format-aware applications to create debug symbols
- while using BFD for everything else. Currently used by the assembler
- when creating COFF files. */
- asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size);
-#define bfd_read_minisymbols(b, d, m, s) \
- BFD_SEND (b, _read_minisymbols, (b, d, m, s))
- long (*_read_minisymbols) (bfd *, bfd_boolean, void **,
- unsigned int *);
-#define bfd_minisymbol_to_symbol(b, d, m, f) \
- BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
- asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *,
- asymbol *);
-
- /* Routines for relocs. */
-#define BFD_JUMP_TABLE_RELOCS(NAME) \
- NAME##_get_reloc_upper_bound, \
- NAME##_canonicalize_reloc, \
- NAME##_set_reloc, \
- NAME##_bfd_reloc_type_lookup, \
- NAME##_bfd_reloc_name_lookup
-
- long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
- long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **,
- struct bfd_symbol **);
- void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int);
- /* See documentation on reloc types. */
- reloc_howto_type *
- (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
- reloc_howto_type *
- (*reloc_name_lookup) (bfd *, const char *);
-
- /* Routines used when writing an object file. */
-#define BFD_JUMP_TABLE_WRITE(NAME) \
- NAME##_set_arch_mach, \
- NAME##_set_section_contents
-
- bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture,
- unsigned long);
- bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *,
- file_ptr, bfd_size_type);
-
- /* Routines used by the linker. */
-#define BFD_JUMP_TABLE_LINK(NAME) \
- NAME##_sizeof_headers, \
- NAME##_bfd_get_relocated_section_contents, \
- NAME##_bfd_relax_section, \
- NAME##_bfd_link_hash_table_create, \
- NAME##_bfd_link_add_symbols, \
- NAME##_bfd_link_just_syms, \
- NAME##_bfd_copy_link_hash_symbol_type, \
- NAME##_bfd_final_link, \
- NAME##_bfd_link_split_section, \
- NAME##_bfd_link_check_relocs, \
- NAME##_bfd_gc_sections, \
- NAME##_bfd_lookup_section_flags, \
- NAME##_bfd_merge_sections, \
- NAME##_bfd_is_group_section, \
- NAME##_bfd_discard_group, \
- NAME##_section_already_linked, \
- NAME##_bfd_define_common_symbol, \
- NAME##_bfd_link_hide_symbol, \
- NAME##_bfd_define_start_stop
-
- int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
- bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *,
- struct bfd_link_info *,
- struct bfd_link_order *,
- bfd_byte *, bfd_boolean,
- struct bfd_symbol **);
-
- bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *,
- struct bfd_link_info *, bfd_boolean *);
-
- /* Create a hash table for the linker. Different backends store
- different information in this table. */
- struct bfd_link_hash_table *
- (*_bfd_link_hash_table_create) (bfd *);
-
- /* Add symbols from this object file into the hash table. */
- bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
-
- /* Indicate that we are only retrieving symbol values from this section. */
- void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
-
- /* Copy the symbol type and other attributes for a linker script
- assignment of one symbol to another. */
-#define bfd_copy_link_hash_symbol_type(b, t, f) \
- BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f))
- void (*_bfd_copy_link_hash_symbol_type) (bfd *,
- struct bfd_link_hash_entry *,
- struct bfd_link_hash_entry *);
-
- /* Do a link based on the link_order structures attached to each
- section of the BFD. */
- bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
-
- /* Should this section be split up into smaller pieces during linking. */
- bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
-
- /* Check the relocations in the bfd for validity. */
- bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *);
-
- /* Remove sections that are not referenced from the output. */
- bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
-
- /* Sets the bitmask of allowed and disallowed section flags. */
- bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *,
- struct flag_info *, asection *);
-
- /* Attempt to merge SEC_MERGE sections. */
- bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
-
- /* Is this section a member of a group? */
- bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
-
- /* Discard members of a group. */
- bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
-
- /* Check if SEC has been already linked during a reloceatable or
- final link. */
- bfd_boolean (*_section_already_linked) (bfd *, asection *,
- struct bfd_link_info *);
-
- /* Define a common symbol. */
- bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *,
- struct bfd_link_hash_entry *);
-
- /* Hide a symbol. */
- void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *,
- struct bfd_link_hash_entry *);
-
- /* Define a __start, __stop, .startof. or .sizeof. symbol. */
- struct bfd_link_hash_entry *
- (*_bfd_define_start_stop) (struct bfd_link_info *, const char *,
- asection *);
-
- /* Routines to handle dynamic symbols and relocs. */
-#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
- NAME##_get_dynamic_symtab_upper_bound, \
- NAME##_canonicalize_dynamic_symtab, \
- NAME##_get_synthetic_symtab, \
- NAME##_get_dynamic_reloc_upper_bound, \
- NAME##_canonicalize_dynamic_reloc
-
- /* Get the amount of memory required to hold the dynamic symbols. */
- long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
- /* Read in the dynamic symbols. */
- long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **);
- /* Create synthetized symbols. */
- long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **,
- long, struct bfd_symbol **,
- struct bfd_symbol **);
- /* Get the amount of memory required to hold the dynamic relocs. */
- long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
- /* Read in the dynamic relocs. */
- long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **,
- struct bfd_symbol **);
-
- /* Opposite endian version of this target. */
- const struct bfd_target *alternative_target;
-
- /* Data for use by back-end routines, which isn't
- generic enough to belong in this structure. */
- const void *backend_data;
-
-} bfd_target;
-
-bfd_boolean bfd_set_default_target (const char *name);
-
-const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
-
-const bfd_target *bfd_get_target_info (const char *target_name,
- bfd *abfd,
- bfd_boolean *is_bigendian,
- int *underscoring,
- const char **def_target_arch);
-const char ** bfd_target_list (void);
-
-const bfd_target *bfd_iterate_over_targets
- (int (*func) (const bfd_target *, void *),
- void *data);
-
-const char *bfd_flavour_name (enum bfd_flavour flavour);
-
-/* Extracted from format.c. */
-bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
-
-bfd_boolean bfd_check_format_matches
- (bfd *abfd, bfd_format format, char ***matching);
-
-bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
-
-const char *bfd_format_string (bfd_format format);
-
-/* Extracted from linker.c. */
-/* Return TRUE if the symbol described by a linker hash entry H
- is going to be absolute. Linker-script defined symbols can be
- converted from absolute to section-relative ones late in the
- link. Use this macro to correctly determine whether the symbol
- will actually end up absolute in output. */
-#define bfd_is_abs_symbol(H) \
- (((H)->type == bfd_link_hash_defined \
- || (H)->type == bfd_link_hash_defweak) \
- && bfd_is_abs_section ((H)->u.def.section) \
- && !(H)->rel_from_abs)
-
-bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
-
-#define bfd_link_split_section(abfd, sec) \
- BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
-
-bfd_boolean bfd_section_already_linked (bfd *abfd,
- asection *sec,
- struct bfd_link_info *info);
-
-#define bfd_section_already_linked(abfd, sec, info) \
- BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
-
-bfd_boolean bfd_generic_define_common_symbol
- (bfd *output_bfd, struct bfd_link_info *info,
- struct bfd_link_hash_entry *h);
-
-#define bfd_define_common_symbol(output_bfd, info, h) \
- BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h))
-
-void _bfd_generic_link_hide_symbol
- (bfd *output_bfd, struct bfd_link_info *info,
- struct bfd_link_hash_entry *h);
-
-#define bfd_link_hide_symbol(output_bfd, info, h) \
- BFD_SEND (output_bfd, _bfd_link_hide_symbol, (output_bfd, info, h))
-
-struct bfd_link_hash_entry *bfd_generic_define_start_stop
- (struct bfd_link_info *info,
- const char *symbol, asection *sec);
-
-#define bfd_define_start_stop(output_bfd, info, symbol, sec) \
- BFD_SEND (output_bfd, _bfd_define_start_stop, (info, symbol, sec))
-
-struct bfd_elf_version_tree * bfd_find_version_for_sym
- (struct bfd_elf_version_tree *verdefs,
- const char *sym_name, bfd_boolean *hide);
-
-bfd_boolean bfd_hide_sym_by_version
- (struct bfd_elf_version_tree *verdefs, const char *sym_name);
-
-bfd_boolean bfd_link_check_relocs
- (bfd *abfd, struct bfd_link_info *info);
-
-bfd_boolean _bfd_generic_link_check_relocs
- (bfd *abfd, struct bfd_link_info *info);
-
-bfd_boolean bfd_merge_private_bfd_data
- (bfd *ibfd, struct bfd_link_info *info);
-
-#define bfd_merge_private_bfd_data(ibfd, info) \
- BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \
- (ibfd, info))
-/* Extracted from simple.c. */
-bfd_byte *bfd_simple_get_relocated_section_contents
- (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
-
-/* Extracted from compress.c. */
-bfd_boolean bfd_get_full_section_contents
- (bfd *abfd, asection *section, bfd_byte **ptr);
-
-void bfd_cache_section_contents
- (asection *sec, void *contents);
-
-bfd_boolean bfd_is_section_compressed_with_header
- (bfd *abfd, asection *section,
- int *compression_header_size_p,
- bfd_size_type *uncompressed_size_p,
- unsigned int *uncompressed_alignment_power_p);
-
-bfd_boolean bfd_is_section_compressed
- (bfd *abfd, asection *section);
-
-bfd_boolean bfd_init_section_decompress_status
- (bfd *abfd, asection *section);
-
-bfd_boolean bfd_init_section_compress_status
- (bfd *abfd, asection *section);
-
-bfd_boolean bfd_compress_section
- (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabihf/bfd_stdint.h b/lib/libc/include/arm-linux-musleabihf/bfd_stdint.h
deleted file mode 100644
index 9961d1607c777a2a5c7fd85585b678d31cf81bec..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabihf/bfd_stdint.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* generated for arm-linux-musleabihf-gcc (GCC) 8.3.0 */
-
-#ifndef GCC_GENERATED_STDINT_H
-#define GCC_GENERATED_STDINT_H 1
-
-#include
-#include
-/* glibc uses these symbols as guards to prevent redefinitions. */
-#ifdef __int8_t_defined
-#define _INT8_T
-#define _INT16_T
-#define _INT32_T
-#endif
-#ifdef __uint32_t_defined
-#define _UINT32_T
-#endif
-
-
-/* Some systems have guard macros to prevent redefinitions, define them. */
-#ifndef _INT8_T
-#define _INT8_T
-#endif
-#ifndef _INT16_T
-#define _INT16_T
-#endif
-#ifndef _INT32_T
-#define _INT32_T
-#endif
-#ifndef _UINT8_T
-#define _UINT8_T
-#endif
-#ifndef _UINT16_T
-#define _UINT16_T
-#endif
-#ifndef _UINT32_T
-#define _UINT32_T
-#endif
-
-/* system headers have good uint64_t and int64_t */
-#ifndef _INT64_T
-#define _INT64_T
-#endif
-#ifndef _UINT64_T
-#define _UINT64_T
-#endif
-
-#endif /* GCC_GENERATED_STDINT_H */
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabihf/bits/fcntl.h b/lib/libc/include/arm-linux-musleabihf/bits/fcntl.h
deleted file mode 100644
index 2408640910a08a79b5dc06ebb934bff061d6f89f..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabihf/bits/fcntl.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#define O_CREAT 0100
-#define O_EXCL 0200
-#define O_NOCTTY 0400
-#define O_TRUNC 01000
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
-#define O_DSYNC 010000
-#define O_SYNC 04010000
-#define O_RSYNC 04010000
-#define O_DIRECTORY 040000
-#define O_NOFOLLOW 0100000
-#define O_CLOEXEC 02000000
-
-#define O_ASYNC 020000
-#define O_DIRECT 0200000
-#define O_LARGEFILE 0400000
-#define O_NOATIME 01000000
-#define O_PATH 010000000
-#define O_TMPFILE 020040000
-#define O_NDELAY O_NONBLOCK
-
-#define F_DUPFD 0
-#define F_GETFD 1
-#define F_SETFD 2
-#define F_GETFL 3
-#define F_SETFL 4
-
-#define F_SETOWN 8
-#define F_GETOWN 9
-#define F_SETSIG 10
-#define F_GETSIG 11
-
-#define F_GETLK 12
-#define F_SETLK 13
-#define F_SETLKW 14
-
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-
-#define F_GETOWNER_UIDS 17
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabihf/bits/hwcap.h b/lib/libc/include/arm-linux-musleabihf/bits/hwcap.h
deleted file mode 100644
index c1c1fb1683d7710287af82ec59c42e27149eebf0..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabihf/bits/hwcap.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#define HWCAP_SWP (1 << 0)
-#define HWCAP_HALF (1 << 1)
-#define HWCAP_THUMB (1 << 2)
-#define HWCAP_26BIT (1 << 3)
-#define HWCAP_FAST_MULT (1 << 4)
-#define HWCAP_FPA (1 << 5)
-#define HWCAP_VFP (1 << 6)
-#define HWCAP_EDSP (1 << 7)
-#define HWCAP_JAVA (1 << 8)
-#define HWCAP_IWMMXT (1 << 9)
-#define HWCAP_CRUNCH (1 << 10)
-#define HWCAP_THUMBEE (1 << 11)
-#define HWCAP_NEON (1 << 12)
-#define HWCAP_VFPv3 (1 << 13)
-#define HWCAP_VFPv3D16 (1 << 14)
-#define HWCAP_TLS (1 << 15)
-#define HWCAP_VFPv4 (1 << 16)
-#define HWCAP_IDIVA (1 << 17)
-#define HWCAP_IDIVT (1 << 18)
-#define HWCAP_VFPD32 (1 << 19)
-#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)
-#define HWCAP_LPAE (1 << 20)
-#define HWCAP_EVTSTRM (1 << 21)
-
-#define HWCAP2_AES (1 << 0)
-#define HWCAP2_PMULL (1 << 1)
-#define HWCAP2_SHA1 (1 << 2)
-#define HWCAP2_SHA2 (1 << 3)
-#define HWCAP2_CRC32 (1 << 4)
-
-#define HWCAP_ARM_SWP (1 << 0)
-#define HWCAP_ARM_HALF (1 << 1)
-#define HWCAP_ARM_THUMB (1 << 2)
-#define HWCAP_ARM_26BIT (1 << 3)
-#define HWCAP_ARM_FAST_MULT (1 << 4)
-#define HWCAP_ARM_FPA (1 << 5)
-#define HWCAP_ARM_VFP (1 << 6)
-#define HWCAP_ARM_EDSP (1 << 7)
-#define HWCAP_ARM_JAVA (1 << 8)
-#define HWCAP_ARM_IWMMXT (1 << 9)
-#define HWCAP_ARM_CRUNCH (1 << 10)
-#define HWCAP_ARM_THUMBEE (1 << 11)
-#define HWCAP_ARM_NEON (1 << 12)
-#define HWCAP_ARM_VFPv3 (1 << 13)
-#define HWCAP_ARM_VFPv3D16 (1 << 14)
-#define HWCAP_ARM_TLS (1 << 15)
-#define HWCAP_ARM_VFPv4 (1 << 16)
-#define HWCAP_ARM_IDIVA (1 << 17)
-#define HWCAP_ARM_IDIVT (1 << 18)
-#define HWCAP_ARM_VFPD32 (1 << 19)
-#define HWCAP_ARM_IDIV (HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT)
-#define HWCAP_ARM_LPAE (1 << 20)
-#define HWCAP_ARM_EVTSTRM (1 << 21)
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabihf/bits/ioctl_fix.h b/lib/libc/include/arm-linux-musleabihf/bits/ioctl_fix.h
deleted file mode 100644
index 9c177f7679e4ddf3a89e03a984cc3cd45476d773..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabihf/bits/ioctl_fix.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#undef FIOQSIZE
-#define FIOQSIZE 0x545e
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabihf/bits/msg.h b/lib/libc/include/arm-linux-musleabihf/bits/msg.h
deleted file mode 100644
index e5c8ba75208c2ed80da66995f1afe78fdab39893..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabihf/bits/msg.h
+++ /dev/null
@@ -1,15 +0,0 @@
-struct msqid_ds {
- struct ipc_perm msg_perm;
- time_t msg_stime;
- int __unused1;
- time_t msg_rtime;
- int __unused2;
- time_t msg_ctime;
- int __unused3;
- unsigned long msg_cbytes;
- msgqnum_t msg_qnum;
- msglen_t msg_qbytes;
- pid_t msg_lspid;
- pid_t msg_lrpid;
- unsigned long __unused[2];
-};
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabihf/bits/ptrace.h b/lib/libc/include/arm-linux-musleabihf/bits/ptrace.h
deleted file mode 100644
index cd96d836f1fdae143f8b0faa5ea72695152b995f..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabihf/bits/ptrace.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#define PTRACE_GETWMMXREGS 18
-#define PTRACE_SETWMMXREGS 19
-#define PTRACE_GET_THREAD_AREA 22
-#define PTRACE_SET_SYSCALL 23
-#define PTRACE_GETCRUNCHREGS 25
-#define PTRACE_SETCRUNCHREGS 26
-#define PTRACE_GETVFPREGS 27
-#define PTRACE_SETVFPREGS 28
-#define PTRACE_GETHBPREGS 29
-#define PTRACE_SETHBPREGS 30
-#define PTRACE_GETFDPIC 31
-#define PTRACE_GETFDPIC_EXEC 0
-#define PTRACE_GETFDPIC_INTERP 1
-
-#define PT_GETWMMXREGS PTRACE_GETWMMXREGS
-#define PT_SETWMMXREGS PTRACE_SETWMMXREGS
-#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
-#define PT_SET_SYSCALL PTRACE_SET_SYSCALL
-#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS
-#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS
-#define PT_GETVFPREGS PTRACE_GETVFPREGS
-#define PT_SETVFPREGS PTRACE_SETVFPREGS
-#define PT_GETHBPREGS PTRACE_GETHBPREGS
-#define PT_SETHBPREGS PTRACE_SETHBPREGS
-#define PT_GETFDPIC PTRACE_GETFDPIC
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabihf/bits/shm.h b/lib/libc/include/arm-linux-musleabihf/bits/shm.h
deleted file mode 100644
index aa5587127ab24a71b87e7bef5946234c46a9c916..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabihf/bits/shm.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#define SHMLBA 4096
-
-struct shmid_ds {
- struct ipc_perm shm_perm;
- size_t shm_segsz;
- time_t shm_atime;
- int __unused1;
- time_t shm_dtime;
- int __unused2;
- time_t shm_ctime;
- int __unused3;
- pid_t shm_cpid;
- pid_t shm_lpid;
- unsigned long shm_nattch;
- unsigned long __pad1;
- unsigned long __pad2;
-};
-
-struct shminfo {
- unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-};
-
-struct shm_info {
- int __used_ids;
- unsigned long shm_tot, shm_rss, shm_swp;
- unsigned long __swap_attempts, __swap_successes;
-};
\ No newline at end of file
diff --git a/lib/libc/include/arm-linux-musleabihf/bits/stdint.h b/lib/libc/include/arm-linux-musleabihf/bits/stdint.h
deleted file mode 100644
index b70a87dc9d5868de097ab14ec47980f3980e9e65..0000000000000000000000000000000000000000
--- a/lib/libc/include/arm-linux-musleabihf/bits/stdint.h
+++ /dev/null
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN INT32_MIN
-#define INT_FAST32_MIN INT32_MIN
-
-#define INT_FAST16_MAX INT32_MAX
-#define INT_FAST32_MAX INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-
-#define INTPTR_MIN INT32_MIN
-#define INTPTR_MAX INT32_MAX
-#define UINTPTR_MAX UINT32_MAX
-#define PTRDIFF_MIN INT32_MIN
-#define PTRDIFF_MAX INT32_MAX
-#define SIZE_MAX UINT32_MAX
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabi/bfd.h b/lib/libc/include/armeb-linux-musleabi/bfd.h
deleted file mode 100644
index 73d2dccfe27dcdd2c636e967e661b2ff7a035116..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabi/bfd.h
+++ /dev/null
@@ -1,8034 +0,0 @@
-/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
- generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
- "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
- "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
- "linker.c", "simple.c" and "compress.c".
- Run "make headers" in your build bfd/ to regenerate. */
-
-/* Main header file for the bfd library -- portable access to object files.
-
- Copyright (C) 1990-2019 Free Software Foundation, Inc.
-
- Contributed by Cygnus Support.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef __BFD_H_SEEN__
-#define __BFD_H_SEEN__
-
-/* PR 14072: Ensure that config.h is included first. */
-#if !defined PACKAGE && !defined PACKAGE_VERSION
-#error config.h must be included before this header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ansidecl.h"
-#include "symcat.h"
-#include "bfd_stdint.h"
-#include "diagnostics.h"
-#include
-#include
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#ifndef SABER
-/* This hack is to avoid a problem with some strict ANSI C preprocessors.
- The problem is, "32_" is not a valid preprocessing token, and we don't
- want extra underscores (e.g., "nlm_32_"). The XCONCAT2 macro will
- cause the inner CONCAT2 macros to be evaluated first, producing
- still-valid pp-tokens. Then the final concatenation can be done. */
-#undef CONCAT4
-#define CONCAT4(a,b,c,d) XCONCAT2(CONCAT2(a,b),CONCAT2(c,d))
-#endif
-#endif
-
-/* This is a utility macro to handle the situation where the code
- wants to place a constant string into the code, followed by a
- comma and then the length of the string. Doing this by hand
- is error prone, so using this macro is safer. */
-#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
-/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
- to create the arguments to another macro, since the preprocessor
- will mis-count the number of arguments to the outer macro (by not
- evaluating STRING_COMMA_LEN and so missing the comma). This is a
- problem for example when trying to use STRING_COMMA_LEN to build
- the arguments to the strncmp() macro. Hence this alternative
- definition of strncmp is provided here.
-
- Note - these macros do NOT work if STR2 is not a constant string. */
-#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
- /* strcpy() can have a similar problem, but since we know we are
- copying a constant string, we can use memcpy which will be faster
- since there is no need to check for a NUL byte inside STR. We
- can also save time if we do not need to copy the terminating NUL. */
-#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
-#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
-
-
-#define BFD_SUPPORTS_PLUGINS 1
-
-/* The word size used by BFD on the host. This may be 64 with a 32
- bit target if the host is 64 bit, or if other 64 bit targets have
- been selected with --enable-targets, or if --enable-64-bit-bfd. */
-#define BFD_ARCH_SIZE 32
-
-/* The word size of the default bfd target. */
-#define BFD_DEFAULT_TARGET_SIZE 32
-
-#define BFD_HOST_64BIT_LONG 0
-#define BFD_HOST_64BIT_LONG_LONG 1
-#if 1
-#define BFD_HOST_64_BIT long long
-#define BFD_HOST_U_64_BIT unsigned long long
-typedef BFD_HOST_64_BIT bfd_int64_t;
-typedef BFD_HOST_U_64_BIT bfd_uint64_t;
-#endif
-
-#ifdef HAVE_INTTYPES_H
-# include
-#else
-# if BFD_HOST_64BIT_LONG
-# define BFD_PRI64 "l"
-# elif defined (__MSVCRT__)
-# define BFD_PRI64 "I64"
-# else
-# define BFD_PRI64 "ll"
-# endif
-# undef PRId64
-# define PRId64 BFD_PRI64 "d"
-# undef PRIu64
-# define PRIu64 BFD_PRI64 "u"
-# undef PRIx64
-# define PRIx64 BFD_PRI64 "x"
-#endif
-
-#if BFD_ARCH_SIZE >= 64
-#define BFD64
-#endif
-
-#ifndef INLINE
-#if __GNUC__ >= 2
-#define INLINE __inline__
-#else
-#define INLINE
-#endif
-#endif
-
-/* Declaring a type wide enough to hold a host long and a host pointer. */
-#define BFD_HOSTPTR_T unsigned long
-typedef BFD_HOSTPTR_T bfd_hostptr_t;
-
-/* Forward declaration. */
-typedef struct bfd bfd;
-
-/* Boolean type used in bfd. Too many systems define their own
- versions of "boolean" for us to safely typedef a "boolean" of
- our own. Using an enum for "bfd_boolean" has its own set of
- problems, with strange looking casts required to avoid warnings
- on some older compilers. Thus we just use an int.
-
- General rule: Functions which are bfd_boolean return TRUE on
- success and FALSE on failure (unless they're a predicate). */
-
-typedef int bfd_boolean;
-#undef FALSE
-#undef TRUE
-#define FALSE 0
-#define TRUE 1
-
-#ifdef BFD64
-
-#ifndef BFD_HOST_64_BIT
- #error No 64 bit integer type available
-#endif /* ! defined (BFD_HOST_64_BIT) */
-
-typedef BFD_HOST_U_64_BIT bfd_vma;
-typedef BFD_HOST_64_BIT bfd_signed_vma;
-typedef BFD_HOST_U_64_BIT bfd_size_type;
-typedef BFD_HOST_U_64_BIT symvalue;
-
-#if BFD_HOST_64BIT_LONG
-#define BFD_VMA_FMT "l"
-#elif defined (__MSVCRT__)
-#define BFD_VMA_FMT "I64"
-#else
-#define BFD_VMA_FMT "ll"
-#endif
-
-#ifndef fprintf_vma
-#define sprintf_vma(s,x) sprintf (s, "%016" BFD_VMA_FMT "x", x)
-#define fprintf_vma(f,x) fprintf (f, "%016" BFD_VMA_FMT "x", x)
-#endif
-
-#else /* not BFD64 */
-
-/* Represent a target address. Also used as a generic unsigned type
- which is guaranteed to be big enough to hold any arithmetic types
- we need to deal with. */
-typedef unsigned long bfd_vma;
-
-/* A generic signed type which is guaranteed to be big enough to hold any
- arithmetic types we need to deal with. Can be assumed to be compatible
- with bfd_vma in the same way that signed and unsigned ints are compatible
- (as parameters, in assignment, etc). */
-typedef long bfd_signed_vma;
-
-typedef unsigned long symvalue;
-typedef unsigned long bfd_size_type;
-
-/* Print a bfd_vma x on stream s. */
-#define BFD_VMA_FMT "l"
-#define fprintf_vma(s,x) fprintf (s, "%08" BFD_VMA_FMT "x", x)
-#define sprintf_vma(s,x) sprintf (s, "%08" BFD_VMA_FMT "x", x)
-
-#endif /* not BFD64 */
-
-#define HALF_BFD_SIZE_TYPE \
- (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2))
-
-#ifndef BFD_HOST_64_BIT
-/* Fall back on a 32 bit type. The idea is to make these types always
- available for function return types, but in the case that
- BFD_HOST_64_BIT is undefined such a function should abort or
- otherwise signal an error. */
-typedef bfd_signed_vma bfd_int64_t;
-typedef bfd_vma bfd_uint64_t;
-#endif
-
-/* An offset into a file. BFD always uses the largest possible offset
- based on the build time availability of fseek, fseeko, or fseeko64. */
-typedef BFD_HOST_64_BIT file_ptr;
-typedef unsigned BFD_HOST_64_BIT ufile_ptr;
-
-extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
-extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
-
-#define printf_vma(x) fprintf_vma(stdout,x)
-#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
-
-typedef unsigned int flagword; /* 32 bits of flags */
-typedef unsigned char bfd_byte;
-
-/* File formats. */
-
-typedef enum bfd_format
-{
- bfd_unknown = 0, /* File format is unknown. */
- bfd_object, /* Linker/assembler/compiler output. */
- bfd_archive, /* Object archive file. */
- bfd_core, /* Core dump. */
- bfd_type_end /* Marks the end; don't use it! */
-}
-bfd_format;
-
-/* Symbols and relocation. */
-
-/* A count of carsyms (canonical archive symbols). */
-typedef unsigned long symindex;
-
-#define BFD_NO_MORE_SYMBOLS ((symindex) ~0)
-
-/* General purpose part of a symbol X;
- target specific parts are in libcoff.h, libaout.h, etc. */
-
-#define bfd_get_section(x) ((x)->section)
-#define bfd_get_output_section(x) ((x)->section->output_section)
-#define bfd_set_section(x,y) ((x)->section) = (y)
-#define bfd_asymbol_base(x) ((x)->section->vma)
-#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value)
-#define bfd_asymbol_name(x) ((x)->name)
-/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/
-#define bfd_asymbol_bfd(x) ((x)->the_bfd)
-#define bfd_asymbol_flavour(x) \
- (((x)->flags & BSF_SYNTHETIC) != 0 \
- ? bfd_target_unknown_flavour \
- : bfd_asymbol_bfd (x)->xvec->flavour)
-
-/* A canonical archive symbol. */
-/* This is a type pun with struct ranlib on purpose! */
-typedef struct carsym
-{
- char *name;
- file_ptr file_offset; /* Look here to find the file. */
-}
-carsym; /* To make these you call a carsymogen. */
-
-/* Used in generating armaps (archive tables of contents).
- Perhaps just a forward definition would do? */
-struct orl /* Output ranlib. */
-{
- char **name; /* Symbol name. */
- union
- {
- file_ptr pos;
- bfd *abfd;
- } u; /* bfd* or file position. */
- int namidx; /* Index into string table. */
-};
-
-/* Linenumber stuff. */
-typedef struct lineno_cache_entry
-{
- unsigned int line_number; /* Linenumber from start of function. */
- union
- {
- struct bfd_symbol *sym; /* Function name. */
- bfd_vma offset; /* Offset into section. */
- } u;
-}
-alent;
-
-/* Object and core file sections. */
-typedef struct bfd_section *sec_ptr;
-
-#define align_power(addr, align) \
- (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align))))
-
-/* Align an address upward to a boundary, expressed as a number of bytes.
- E.g. align to an 8-byte boundary with argument of 8. Take care never
- to wrap around if the address is within boundary-1 of the end of the
- address space. */
-#define BFD_ALIGN(this, boundary) \
- ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
- ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \
- : ~ (bfd_vma) 0)
-
-#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name)
-#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma)
-#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma)
-#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \
- (ptr)->alignment_power)
-#define bfd_section_name(bfd, ptr) ((ptr)->name)
-#define bfd_section_size(bfd, ptr) ((ptr)->size)
-#define bfd_get_section_size(ptr) ((ptr)->size)
-#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
-#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
-#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
-#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags)
-#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata)
-
-#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
-
-#define bfd_get_section_limit_octets(bfd, sec) \
- ((bfd)->direction != write_direction && (sec)->rawsize != 0 \
- ? (sec)->rawsize : (sec)->size)
-
-/* Find the address one past the end of SEC. */
-#define bfd_get_section_limit(bfd, sec) \
- (bfd_get_section_limit_octets(bfd, sec) / bfd_octets_per_byte (bfd))
-
-/* Return TRUE if input section SEC has been discarded. */
-#define discarded_section(sec) \
- (!bfd_is_abs_section (sec) \
- && bfd_is_abs_section ((sec)->output_section) \
- && (sec)->sec_info_type != SEC_INFO_TYPE_MERGE \
- && (sec)->sec_info_type != SEC_INFO_TYPE_JUST_SYMS)
-
-typedef enum bfd_print_symbol
-{
- bfd_print_symbol_name,
- bfd_print_symbol_more,
- bfd_print_symbol_all
-} bfd_print_symbol_type;
-
-/* Information about a symbol that nm needs. */
-
-typedef struct _symbol_info
-{
- symvalue value;
- char type;
- const char *name; /* Symbol name. */
- unsigned char stab_type; /* Stab type. */
- char stab_other; /* Stab other. */
- short stab_desc; /* Stab desc. */
- const char *stab_name; /* String for stab type. */
-} symbol_info;
-
-/* Get the name of a stabs type code. */
-
-extern const char *bfd_get_stab_name (int);
-
-/* Hash table routines. There is no way to free up a hash table. */
-
-/* An element in the hash table. Most uses will actually use a larger
- structure, and an instance of this will be the first field. */
-
-struct bfd_hash_entry
-{
- /* Next entry for this hash code. */
- struct bfd_hash_entry *next;
- /* String being hashed. */
- const char *string;
- /* Hash code. This is the full hash code, not the index into the
- table. */
- unsigned long hash;
-};
-
-/* A hash table. */
-
-struct bfd_hash_table
-{
- /* The hash array. */
- struct bfd_hash_entry **table;
- /* A function used to create new elements in the hash table. The
- first entry is itself a pointer to an element. When this
- function is first invoked, this pointer will be NULL. However,
- having the pointer permits a hierarchy of method functions to be
- built each of which calls the function in the superclass. Thus
- each function should be written to allocate a new block of memory
- only if the argument is NULL. */
- struct bfd_hash_entry *(*newfunc)
- (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
- /* An objalloc for this hash table. This is a struct objalloc *,
- but we use void * to avoid requiring the inclusion of objalloc.h. */
- void *memory;
- /* The number of slots in the hash table. */
- unsigned int size;
- /* The number of entries in the hash table. */
- unsigned int count;
- /* The size of elements. */
- unsigned int entsize;
- /* If non-zero, don't grow the hash table. */
- unsigned int frozen:1;
-};
-
-/* Initialize a hash table. */
-extern bfd_boolean bfd_hash_table_init
- (struct bfd_hash_table *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *),
- unsigned int);
-
-/* Initialize a hash table specifying a size. */
-extern bfd_boolean bfd_hash_table_init_n
- (struct bfd_hash_table *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *),
- unsigned int, unsigned int);
-
-/* Free up a hash table. */
-extern void bfd_hash_table_free
- (struct bfd_hash_table *);
-
-/* Look up a string in a hash table. If CREATE is TRUE, a new entry
- will be created for this string if one does not already exist. The
- COPY argument must be TRUE if this routine should copy the string
- into newly allocated memory when adding an entry. */
-extern struct bfd_hash_entry *bfd_hash_lookup
- (struct bfd_hash_table *, const char *, bfd_boolean create,
- bfd_boolean copy);
-
-/* Insert an entry in a hash table. */
-extern struct bfd_hash_entry *bfd_hash_insert
- (struct bfd_hash_table *, const char *, unsigned long);
-
-/* Rename an entry in a hash table. */
-extern void bfd_hash_rename
- (struct bfd_hash_table *, const char *, struct bfd_hash_entry *);
-
-/* Replace an entry in a hash table. */
-extern void bfd_hash_replace
- (struct bfd_hash_table *, struct bfd_hash_entry *old,
- struct bfd_hash_entry *nw);
-
-/* Base method for creating a hash table entry. */
-extern struct bfd_hash_entry *bfd_hash_newfunc
- (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
-
-/* Grab some space for a hash table entry. */
-extern void *bfd_hash_allocate
- (struct bfd_hash_table *, unsigned int);
-
-/* Traverse a hash table in a random order, calling a function on each
- element. If the function returns FALSE, the traversal stops. The
- INFO argument is passed to the function. */
-extern void bfd_hash_traverse
- (struct bfd_hash_table *,
- bfd_boolean (*) (struct bfd_hash_entry *, void *),
- void *info);
-
-/* Allows the default size of a hash table to be configured. New hash
- tables allocated using bfd_hash_table_init will be created with
- this size. */
-extern unsigned long bfd_hash_set_default_size (unsigned long);
-
-/* Types of compressed DWARF debug sections. We currently support
- zlib. */
-enum compressed_debug_section_type
-{
- COMPRESS_DEBUG_NONE = 0,
- COMPRESS_DEBUG = 1 << 0,
- COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1,
- COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2
-};
-
-/* This structure is used to keep track of stabs in sections
- information while linking. */
-
-struct stab_info
-{
- /* A hash table used to hold stabs strings. */
- struct bfd_strtab_hash *strings;
- /* The header file hash table. */
- struct bfd_hash_table includes;
- /* The first .stabstr section. */
- struct bfd_section *stabstr;
-};
-
-#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table
-
-/* User program access to BFD facilities. */
-
-/* Direct I/O routines, for programs which know more about the object
- file than BFD does. Use higher level routines if possible. */
-
-extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *);
-extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *);
-extern int bfd_seek (bfd *, file_ptr, int);
-extern file_ptr bfd_tell (bfd *);
-extern int bfd_flush (bfd *);
-extern int bfd_stat (bfd *, struct stat *);
-
-/* Deprecated old routines. */
-#if __GNUC__
-#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \
- bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \
- bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#else
-#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
- bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
- bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#endif
-extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
-
-/* Cast from const char * to char * so that caller can assign to
- a char * without a warning. */
-#define bfd_get_filename(abfd) ((char *) (abfd)->filename)
-#define bfd_get_cacheable(abfd) ((abfd)->cacheable)
-#define bfd_get_format(abfd) ((abfd)->format)
-#define bfd_get_target(abfd) ((abfd)->xvec->name)
-#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
-#define bfd_family_coff(abfd) \
- (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \
- bfd_get_flavour (abfd) == bfd_target_xcoff_flavour)
-#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
-#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
-#define bfd_header_big_endian(abfd) \
- ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG)
-#define bfd_header_little_endian(abfd) \
- ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE)
-#define bfd_get_file_flags(abfd) ((abfd)->flags)
-#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
-#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
-#define bfd_has_map(abfd) ((abfd)->has_armap)
-#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive)
-
-#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types)
-#define bfd_usrdata(abfd) ((abfd)->usrdata)
-
-#define bfd_get_start_address(abfd) ((abfd)->start_address)
-#define bfd_get_symcount(abfd) ((abfd)->symcount)
-#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols)
-#define bfd_count_sections(abfd) ((abfd)->section_count)
-
-#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount)
-
-#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
-
-extern bfd_boolean bfd_cache_close
- (bfd *abfd);
-/* NB: This declaration should match the autogenerated one in libbfd.h. */
-
-extern bfd_boolean bfd_cache_close_all (void);
-
-extern bfd_boolean bfd_record_phdr
- (bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
- bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
-
-/* Byte swapping routines. */
-
-bfd_uint64_t bfd_getb64 (const void *);
-bfd_uint64_t bfd_getl64 (const void *);
-bfd_int64_t bfd_getb_signed_64 (const void *);
-bfd_int64_t bfd_getl_signed_64 (const void *);
-bfd_vma bfd_getb32 (const void *);
-bfd_vma bfd_getl32 (const void *);
-bfd_signed_vma bfd_getb_signed_32 (const void *);
-bfd_signed_vma bfd_getl_signed_32 (const void *);
-bfd_vma bfd_getb16 (const void *);
-bfd_vma bfd_getl16 (const void *);
-bfd_signed_vma bfd_getb_signed_16 (const void *);
-bfd_signed_vma bfd_getl_signed_16 (const void *);
-void bfd_putb64 (bfd_uint64_t, void *);
-void bfd_putl64 (bfd_uint64_t, void *);
-void bfd_putb32 (bfd_vma, void *);
-void bfd_putl32 (bfd_vma, void *);
-void bfd_putb24 (bfd_vma, void *);
-void bfd_putl24 (bfd_vma, void *);
-void bfd_putb16 (bfd_vma, void *);
-void bfd_putl16 (bfd_vma, void *);
-
-/* Byte swapping routines which take size and endiannes as arguments. */
-
-bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
-void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
-
-#if defined(__STDC__) || defined(ALMOST_STDC)
-struct ecoff_debug_info;
-struct ecoff_debug_swap;
-struct ecoff_extr;
-struct bfd_symbol;
-struct bfd_link_info;
-struct bfd_link_hash_entry;
-struct bfd_section_already_linked;
-struct bfd_elf_version_tree;
-#endif
-
-extern bfd_boolean bfd_section_already_linked_table_init (void);
-extern void bfd_section_already_linked_table_free (void);
-extern bfd_boolean _bfd_handle_already_linked
- (struct bfd_section *, struct bfd_section_already_linked *,
- struct bfd_link_info *);
-
-/* Externally visible ECOFF routines. */
-
-extern bfd_boolean bfd_ecoff_set_gp_value
- (bfd *abfd, bfd_vma gp_value);
-extern bfd_boolean bfd_ecoff_set_regmasks
- (bfd *abfd, unsigned long gprmask, unsigned long fprmask,
- unsigned long *cprmask);
-extern void *bfd_ecoff_debug_init
- (bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
-extern void bfd_ecoff_debug_free
- (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_accumulate
- (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
- struct ecoff_debug_info *input_debug,
- const struct ecoff_debug_swap *input_swap, struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_accumulate_other
- (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
- struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_externals
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap, bfd_boolean relocatable,
- bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *),
- void (*set_index) (struct bfd_symbol *, bfd_size_type));
-extern bfd_boolean bfd_ecoff_debug_one_external
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap, const char *name,
- struct ecoff_extr *esym);
-extern bfd_size_type bfd_ecoff_debug_size
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap);
-extern bfd_boolean bfd_ecoff_write_debug
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap, file_ptr where);
-extern bfd_boolean bfd_ecoff_write_accumulated_debug
- (void *handle, bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap,
- struct bfd_link_info *info, file_ptr where);
-
-/* Externally visible ELF routines. */
-
-struct bfd_link_needed_list
-{
- struct bfd_link_needed_list *next;
- bfd *by;
- const char *name;
-};
-
-enum dynamic_lib_link_class {
- DYN_NORMAL = 0,
- DYN_AS_NEEDED = 1,
- DYN_DT_NEEDED = 2,
- DYN_NO_ADD_NEEDED = 4,
- DYN_NO_NEEDED = 8
-};
-
-enum notice_asneeded_action {
- notice_as_needed,
- notice_not_needed,
- notice_needed
-};
-
-extern bfd_boolean bfd_elf_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
- bfd_boolean);
-extern struct bfd_link_needed_list *bfd_elf_get_needed_list
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_elf_get_bfd_needed_list
- (bfd *, struct bfd_link_needed_list **);
-extern bfd_boolean bfd_elf_stack_segment_size (bfd *, struct bfd_link_info *,
- const char *, bfd_vma);
-extern bfd_boolean bfd_elf_size_dynamic_sections
- (bfd *, const char *, const char *, const char *, const char *, const char *,
- const char * const *, struct bfd_link_info *, struct bfd_section **);
-extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr
- (bfd *, struct bfd_link_info *);
-extern void bfd_elf_set_dt_needed_name
- (bfd *, const char *);
-extern const char *bfd_elf_get_dt_soname
- (bfd *);
-extern void bfd_elf_set_dyn_lib_class
- (bfd *, enum dynamic_lib_link_class);
-extern int bfd_elf_get_dyn_lib_class
- (bfd *);
-extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
- (bfd *, struct bfd_link_info *);
-extern int bfd_elf_discard_info
- (bfd *, struct bfd_link_info *);
-extern unsigned int _bfd_elf_default_action_discarded
- (struct bfd_section *);
-
-/* Return an upper bound on the number of bytes required to store a
- copy of ABFD's program header table entries. Return -1 if an error
- occurs; bfd_get_error will return an appropriate code. */
-extern long bfd_get_elf_phdr_upper_bound
- (bfd *abfd);
-
-/* Copy ABFD's program header table entries to *PHDRS. The entries
- will be stored as an array of Elf_Internal_Phdr structures, as
- defined in include/elf/internal.h. To find out how large the
- buffer needs to be, call bfd_get_elf_phdr_upper_bound.
-
- Return the number of program header table entries read, or -1 if an
- error occurs; bfd_get_error will return an appropriate code. */
-extern int bfd_get_elf_phdrs
- (bfd *abfd, void *phdrs);
-
-/* Create a new BFD as if by bfd_openr. Rather than opening a file,
- reconstruct an ELF file by reading the segments out of remote
- memory based on the ELF file header at EHDR_VMA and the ELF program
- headers it points to. If non-zero, SIZE is the known extent of the
- object. If not null, *LOADBASEP is filled in with the difference
- between the VMAs from which the segments were read, and the VMAs
- the file headers (and hence BFD's idea of each section's VMA) put
- them at.
-
- The function TARGET_READ_MEMORY is called to copy LEN bytes from
- the remote memory at target address VMA into the local buffer at
- MYADDR; it should return zero on success or an `errno' code on
- failure. TEMPL must be a BFD for a target with the word size and
- byte order found in the remote memory. */
-extern bfd *bfd_elf_bfd_from_remote_memory
- (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr,
- bfd_size_type len));
-
-extern struct bfd_section *_bfd_elf_tls_setup
- (bfd *, struct bfd_link_info *);
-
-extern struct bfd_section *
-_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma);
-
-extern void _bfd_fix_excluded_sec_syms
- (bfd *, struct bfd_link_info *);
-
-extern unsigned bfd_m68k_mach_to_features (int);
-
-extern int bfd_m68k_features_to_mach (unsigned);
-
-extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
- char **);
-
-extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
- char **);
-
-extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
- char **);
-
-/* SunOS shared library support routines for the linker. */
-
-extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_sunos_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_sunos_size_dynamic_sections
- (bfd *, struct bfd_link_info *, struct bfd_section **,
- struct bfd_section **, struct bfd_section **);
-
-/* Linux shared library support routines for the linker. */
-
-extern bfd_boolean bfd_i386linux_size_dynamic_sections
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_sparclinux_size_dynamic_sections
- (bfd *, struct bfd_link_info *);
-
-/* mmap hacks */
-
-struct _bfd_window_internal;
-typedef struct _bfd_window_internal bfd_window_internal;
-
-typedef struct _bfd_window
-{
- /* What the user asked for. */
- void *data;
- bfd_size_type size;
- /* The actual window used by BFD. Small user-requested read-only
- regions sharing a page may share a single window into the object
- file. Read-write versions shouldn't until I've fixed things to
- keep track of which portions have been claimed by the
- application; don't want to give the same region back when the
- application wants two writable copies! */
- struct _bfd_window_internal *i;
-}
-bfd_window;
-
-extern void bfd_init_window
- (bfd_window *);
-extern void bfd_free_window
- (bfd_window *);
-extern bfd_boolean bfd_get_file_window
- (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean);
-
-/* XCOFF support routines for the linker. */
-
-extern bfd_boolean bfd_xcoff_split_import_path
- (bfd *, const char *, const char **, const char **);
-extern bfd_boolean bfd_xcoff_set_archive_import_path
- (struct bfd_link_info *, bfd *, const char *);
-extern bfd_boolean bfd_xcoff_link_record_set
- (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
-extern bfd_boolean bfd_xcoff_import_symbol
- (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
- const char *, const char *, const char *, unsigned int);
-extern bfd_boolean bfd_xcoff_export_symbol
- (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
-extern bfd_boolean bfd_xcoff_link_count_reloc
- (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_xcoff_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_xcoff_size_dynamic_sections
- (bfd *, struct bfd_link_info *, const char *, const char *,
- unsigned long, unsigned long, unsigned long, bfd_boolean,
- int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean);
-extern bfd_boolean bfd_xcoff_link_generate_rtinit
- (bfd *, const char *, const char *, bfd_boolean);
-
-/* XCOFF support routines for ar. */
-extern bfd_boolean bfd_xcoff_ar_archive_set_magic
- (bfd *, char *);
-
-/* Externally visible COFF routines. */
-
-#if defined(__STDC__) || defined(ALMOST_STDC)
-struct internal_syment;
-union internal_auxent;
-#endif
-
-extern bfd_boolean bfd_coff_set_symbol_class
- (bfd *, struct bfd_symbol *, unsigned int);
-
-/* ARM VFP11 erratum workaround support. */
-typedef enum
-{
- BFD_ARM_VFP11_FIX_DEFAULT,
- BFD_ARM_VFP11_FIX_NONE,
- BFD_ARM_VFP11_FIX_SCALAR,
- BFD_ARM_VFP11_FIX_VECTOR
-} bfd_arm_vfp11_fix;
-
-extern void bfd_elf32_arm_init_maps
- (bfd *);
-
-extern void bfd_elf32_arm_set_vfp11_fix
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_set_cortex_a8_fix
- (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_vfp11_fix_veneer_locations
- (bfd *, struct bfd_link_info *);
-
-/* ARM STM STM32L4XX erratum workaround support. */
-typedef enum
-{
- BFD_ARM_STM32L4XX_FIX_NONE,
- BFD_ARM_STM32L4XX_FIX_DEFAULT,
- BFD_ARM_STM32L4XX_FIX_ALL
-} bfd_arm_stm32l4xx_fix;
-
-extern void bfd_elf32_arm_set_stm32l4xx_fix
- (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations
- (bfd *, struct bfd_link_info *);
-
-/* ARM Interworking support. Called from linker. */
-extern bfd_boolean bfd_arm_allocate_interworking_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean bfd_arm_process_before_allocation
- (bfd *, struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_arm_get_bfd_for_interworking
- (bfd *, struct bfd_link_info *);
-
-/* PE ARM Interworking support. Called from linker. */
-extern bfd_boolean bfd_arm_pe_allocate_interworking_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean bfd_arm_pe_process_before_allocation
- (bfd *, struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking
- (bfd *, struct bfd_link_info *);
-
-/* ELF ARM Interworking support. Called from linker. */
-extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_process_before_allocation
- (bfd *, struct bfd_link_info *);
-
-struct elf32_arm_params {
- char *thumb_entry_symbol;
- int byteswap_code;
- int target1_is_rel;
- char * target2_type;
- int fix_v4bx;
- int use_blx;
- bfd_arm_vfp11_fix vfp11_denorm_fix;
- bfd_arm_stm32l4xx_fix stm32l4xx_fix;
- int no_enum_size_warning;
- int no_wchar_size_warning;
- int pic_veneer;
- int fix_cortex_a8;
- int fix_arm1176;
- int merge_exidx_entries;
- int cmse_implib;
- bfd *in_implib_bfd;
-};
-
-void bfd_elf32_arm_set_target_params
- (bfd *, struct bfd_link_info *, struct elf32_arm_params *);
-
-extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
- (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_keep_private_stub_output_sections
- (struct bfd_link_info *);
-
-/* ELF ARM mapping symbol support. */
-#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0)
-#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1)
-#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2)
-#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0)
-
-extern bfd_boolean bfd_is_arm_special_symbol_name
- (const char *, int);
-
-extern void bfd_elf32_arm_set_byteswap_code
- (struct bfd_link_info *, int);
-
-extern void bfd_elf32_arm_use_long_plt (void);
-
-/* ARM Note section processing. */
-extern bfd_boolean bfd_arm_merge_machines
- (bfd *, bfd *);
-
-extern bfd_boolean bfd_arm_update_notes
- (bfd *, const char *);
-
-extern unsigned int bfd_arm_get_mach_from_notes
- (bfd *, const char *);
-
-/* ARM stub generation support. Called from the linker. */
-extern int elf32_arm_setup_section_lists
- (bfd *, struct bfd_link_info *);
-extern void elf32_arm_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf32_arm_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *,
- struct bfd_section *, unsigned int),
- void (*) (void));
-extern bfd_boolean elf32_arm_build_stubs
- (struct bfd_link_info *);
-
-/* ARM unwind section editing support. */
-extern bfd_boolean elf32_arm_fix_exidx_coverage
-(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
-
-/* C6x unwind section editing support. */
-extern bfd_boolean elf32_tic6x_fix_exidx_coverage
-(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
-
-extern void bfd_elf64_aarch64_init_maps
- (bfd *);
-
-extern void bfd_elf32_aarch64_init_maps
- (bfd *);
-
-extern void bfd_elf64_aarch64_set_options
- (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
-
-extern void bfd_elf32_aarch64_set_options
- (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
-
-/* ELF AArch64 mapping symbol support. */
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0)
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1)
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2)
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0)
-extern bfd_boolean bfd_is_aarch64_special_symbol_name
- (const char * name, int type);
-
-/* AArch64 stub generation support for ELF64. Called from the linker. */
-extern int elf64_aarch64_setup_section_lists
- (bfd *, struct bfd_link_info *);
-extern void elf64_aarch64_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf64_aarch64_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *),
- void (*) (void));
-extern bfd_boolean elf64_aarch64_build_stubs
- (struct bfd_link_info *);
-/* AArch64 stub generation support for ELF32. Called from the linker. */
-extern int elf32_aarch64_setup_section_lists
- (bfd *, struct bfd_link_info *);
-extern void elf32_aarch64_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf32_aarch64_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *),
- void (*) (void));
-extern bfd_boolean elf32_aarch64_build_stubs
- (struct bfd_link_info *);
-
-
-/* TI COFF load page support. */
-extern void bfd_ticoff_set_section_load_page
- (struct bfd_section *, int);
-
-extern int bfd_ticoff_get_section_load_page
- (struct bfd_section *);
-
-/* H8/300 functions. */
-extern bfd_vma bfd_h8300_pad_address
- (bfd *, bfd_vma);
-
-/* IA64 Itanium code generation. Called from linker. */
-extern void bfd_elf32_ia64_after_parse
- (int);
-
-extern void bfd_elf64_ia64_after_parse
- (int);
-
-/* V850 Note manipulation routines. */
-extern bfd_boolean v850_elf_create_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean v850_elf_set_note
- (bfd *, unsigned int, unsigned int);
-
-/* MIPS ABI flags data access. For the disassembler. */
-struct elf_internal_abiflags_v0;
-extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *);
-
-/* C-SKY functions. */
-extern bfd_boolean elf32_csky_build_stubs
- (struct bfd_link_info *);
-extern bfd_boolean elf32_csky_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section *(*) (const char*, struct bfd_section*),
- void (*) (void));
-extern void elf32_csky_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern int elf32_csky_setup_section_lists
- (bfd *, struct bfd_link_info *);
-/* Extracted from init.c. */
-unsigned int bfd_init (void);
-
-
-/* Value returned by bfd_init. */
-
-#define BFD_INIT_MAGIC (sizeof (struct bfd_section))
-/* Extracted from opncls.c. */
-/* Set to N to open the next N BFDs using an alternate id space. */
-extern unsigned int bfd_use_reserved_id;
-bfd *bfd_fopen (const char *filename, const char *target,
- const char *mode, int fd);
-
-bfd *bfd_openr (const char *filename, const char *target);
-
-bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
-
-bfd *bfd_openstreamr (const char * filename, const char * target,
- void * stream);
-
-bfd *bfd_openr_iovec (const char *filename, const char *target,
- void *(*open_func) (struct bfd *nbfd,
- void *open_closure),
- void *open_closure,
- file_ptr (*pread_func) (struct bfd *nbfd,
- void *stream,
- void *buf,
- file_ptr nbytes,
- file_ptr offset),
- int (*close_func) (struct bfd *nbfd,
- void *stream),
- int (*stat_func) (struct bfd *abfd,
- void *stream,
- struct stat *sb));
-
-bfd *bfd_openw (const char *filename, const char *target);
-
-bfd_boolean bfd_close (bfd *abfd);
-
-bfd_boolean bfd_close_all_done (bfd *);
-
-bfd *bfd_create (const char *filename, bfd *templ);
-
-bfd_boolean bfd_make_writable (bfd *abfd);
-
-bfd_boolean bfd_make_readable (bfd *abfd);
-
-void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
-
-void *bfd_zalloc (bfd *abfd, bfd_size_type wanted);
-
-unsigned long bfd_calc_gnu_debuglink_crc32
- (unsigned long crc, const unsigned char *buf, bfd_size_type len);
-
-char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
-
-char *bfd_get_alt_debug_link_info (bfd * abfd,
- bfd_size_type *buildid_len,
- bfd_byte **buildid_out);
-
-char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
-
-char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir);
-
-struct bfd_section *bfd_create_gnu_debuglink_section
- (bfd *abfd, const char *filename);
-
-bfd_boolean bfd_fill_in_gnu_debuglink_section
- (bfd *abfd, struct bfd_section *sect, const char *filename);
-
-char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir);
-
-/* Extracted from libbfd.c. */
-
-/* Byte swapping macros for user section data. */
-
-#define bfd_put_8(abfd, val, ptr) \
- ((void) (*((unsigned char *) (ptr)) = (val) & 0xff))
-#define bfd_put_signed_8 \
- bfd_put_8
-#define bfd_get_8(abfd, ptr) \
- (*(const unsigned char *) (ptr) & 0xff)
-#define bfd_get_signed_8(abfd, ptr) \
- (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
-
-#define bfd_put_16(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
-#define bfd_put_signed_16 \
- bfd_put_16
-#define bfd_get_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx16, (ptr))
-#define bfd_get_signed_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
-
-#define bfd_put_24(abfd, val, ptr) \
- do \
- if (bfd_big_endian (abfd)) \
- bfd_putb24 ((val), (ptr)); \
- else \
- bfd_putl24 ((val), (ptr)); \
- while (0)
-
-bfd_vma bfd_getb24 (const void *p);
-bfd_vma bfd_getl24 (const void *p);
-
-#define bfd_get_24(abfd, ptr) \
- (bfd_big_endian (abfd) ? bfd_getb24 (ptr) : bfd_getl24 (ptr))
-
-#define bfd_put_32(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
-#define bfd_put_signed_32 \
- bfd_put_32
-#define bfd_get_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx32, (ptr))
-#define bfd_get_signed_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_32, (ptr))
-
-#define bfd_put_64(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx64, ((val), (ptr)))
-#define bfd_put_signed_64 \
- bfd_put_64
-#define bfd_get_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx64, (ptr))
-#define bfd_get_signed_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
-
-#define bfd_get(bits, abfd, ptr) \
- ((bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr) \
- : (bits) == 16 ? bfd_get_16 (abfd, ptr) \
- : (bits) == 32 ? bfd_get_32 (abfd, ptr) \
- : (bits) == 64 ? bfd_get_64 (abfd, ptr) \
- : (abort (), (bfd_vma) - 1))
-
-#define bfd_put(bits, abfd, val, ptr) \
- ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
- : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
- : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
- : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
- : (abort (), (void) 0))
-
-
-/* Byte swapping macros for file header data. */
-
-#define bfd_h_put_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
-#define bfd_h_put_signed_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
-#define bfd_h_get_8(abfd, ptr) \
- bfd_get_8 (abfd, ptr)
-#define bfd_h_get_signed_8(abfd, ptr) \
- bfd_get_signed_8 (abfd, ptr)
-
-#define bfd_h_put_16(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
-#define bfd_h_put_signed_16 \
- bfd_h_put_16
-#define bfd_h_get_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx16, (ptr))
-#define bfd_h_get_signed_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
-
-#define bfd_h_put_32(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
-#define bfd_h_put_signed_32 \
- bfd_h_put_32
-#define bfd_h_get_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx32, (ptr))
-#define bfd_h_get_signed_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
-
-#define bfd_h_put_64(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
-#define bfd_h_put_signed_64 \
- bfd_h_put_64
-#define bfd_h_get_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx64, (ptr))
-#define bfd_h_get_signed_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
-
-/* Aliases for the above, which should eventually go away. */
-
-#define H_PUT_64 bfd_h_put_64
-#define H_PUT_32 bfd_h_put_32
-#define H_PUT_16 bfd_h_put_16
-#define H_PUT_8 bfd_h_put_8
-#define H_PUT_S64 bfd_h_put_signed_64
-#define H_PUT_S32 bfd_h_put_signed_32
-#define H_PUT_S16 bfd_h_put_signed_16
-#define H_PUT_S8 bfd_h_put_signed_8
-#define H_GET_64 bfd_h_get_64
-#define H_GET_32 bfd_h_get_32
-#define H_GET_16 bfd_h_get_16
-#define H_GET_8 bfd_h_get_8
-#define H_GET_S64 bfd_h_get_signed_64
-#define H_GET_S32 bfd_h_get_signed_32
-#define H_GET_S16 bfd_h_get_signed_16
-#define H_GET_S8 bfd_h_get_signed_8
-
-
-/* Extracted from bfdio.c. */
-long bfd_get_mtime (bfd *abfd);
-
-ufile_ptr bfd_get_size (bfd *abfd);
-
-ufile_ptr bfd_get_file_size (bfd *abfd);
-
-void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
- int prot, int flags, file_ptr offset,
- void **map_addr, bfd_size_type *map_len);
-
-/* Extracted from bfdwin.c. */
-/* Extracted from section.c. */
-
-typedef struct bfd_section
-{
- /* The name of the section; the name isn't a copy, the pointer is
- the same as that passed to bfd_make_section. */
- const char *name;
-
- /* A unique sequence number. */
- unsigned int id;
-
- /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
- unsigned int index;
-
- /* The next section in the list belonging to the BFD, or NULL. */
- struct bfd_section *next;
-
- /* The previous section in the list belonging to the BFD, or NULL. */
- struct bfd_section *prev;
-
- /* The field flags contains attributes of the section. Some
- flags are read in from the object file, and some are
- synthesized from other information. */
- flagword flags;
-
-#define SEC_NO_FLAGS 0x0
-
- /* Tells the OS to allocate space for this section when loading.
- This is clear for a section containing debug information only. */
-#define SEC_ALLOC 0x1
-
- /* Tells the OS to load the section from the file when loading.
- This is clear for a .bss section. */
-#define SEC_LOAD 0x2
-
- /* The section contains data still to be relocated, so there is
- some relocation information too. */
-#define SEC_RELOC 0x4
-
- /* A signal to the OS that the section contains read only data. */
-#define SEC_READONLY 0x8
-
- /* The section contains code only. */
-#define SEC_CODE 0x10
-
- /* The section contains data only. */
-#define SEC_DATA 0x20
-
- /* The section will reside in ROM. */
-#define SEC_ROM 0x40
-
- /* The section contains constructor information. This section
- type is used by the linker to create lists of constructors and
- destructors used by <>. When a back end sees a symbol
- which should be used in a constructor list, it creates a new
- section for the type of name (e.g., <<__CTOR_LIST__>>), attaches
- the symbol to it, and builds a relocation. To build the lists
- of constructors, all the linker has to do is catenate all the
- sections called <<__CTOR_LIST__>> and relocate the data
- contained within - exactly the operations it would peform on
- standard data. */
-#define SEC_CONSTRUCTOR 0x80
-
- /* The section has contents - a data section could be
- <> | <>; a debug section could be
- <> */
-#define SEC_HAS_CONTENTS 0x100
-
- /* An instruction to the linker to not output the section
- even if it has information which would normally be written. */
-#define SEC_NEVER_LOAD 0x200
-
- /* The section contains thread local data. */
-#define SEC_THREAD_LOCAL 0x400
-
- /* The section's size is fixed. Generic linker code will not
- recalculate it and it is up to whoever has set this flag to
- get the size right. */
-#define SEC_FIXED_SIZE 0x800
-
- /* The section contains common symbols (symbols may be defined
- multiple times, the value of a symbol is the amount of
- space it requires, and the largest symbol value is the one
- used). Most targets have exactly one of these (which we
- translate to bfd_com_section_ptr), but ECOFF has two. */
-#define SEC_IS_COMMON 0x1000
-
- /* The section contains only debugging information. For
- example, this is set for ELF .debug and .stab sections.
- strip tests this flag to see if a section can be
- discarded. */
-#define SEC_DEBUGGING 0x2000
-
- /* The contents of this section are held in memory pointed to
- by the contents field. This is checked by bfd_get_section_contents,
- and the data is retrieved from memory if appropriate. */
-#define SEC_IN_MEMORY 0x4000
-
- /* The contents of this section are to be excluded by the
- linker for executable and shared objects unless those
- objects are to be further relocated. */
-#define SEC_EXCLUDE 0x8000
-
- /* The contents of this section are to be sorted based on the sum of
- the symbol and addend values specified by the associated relocation
- entries. Entries without associated relocation entries will be
- appended to the end of the section in an unspecified order. */
-#define SEC_SORT_ENTRIES 0x10000
-
- /* When linking, duplicate sections of the same name should be
- discarded, rather than being combined into a single section as
- is usually done. This is similar to how common symbols are
- handled. See SEC_LINK_DUPLICATES below. */
-#define SEC_LINK_ONCE 0x20000
-
- /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
- should handle duplicate sections. */
-#define SEC_LINK_DUPLICATES 0xc0000
-
- /* This value for SEC_LINK_DUPLICATES means that duplicate
- sections with the same name should simply be discarded. */
-#define SEC_LINK_DUPLICATES_DISCARD 0x0
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if there are any duplicate sections, although
- it should still only link one copy. */
-#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections are a different size. */
-#define SEC_LINK_DUPLICATES_SAME_SIZE 0x80000
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections contain different
- contents. */
-#define SEC_LINK_DUPLICATES_SAME_CONTENTS \
- (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
-
- /* This section was created by the linker as part of dynamic
- relocation or other arcane processing. It is skipped when
- going through the first-pass output, trusting that someone
- else up the line will take care of it later. */
-#define SEC_LINKER_CREATED 0x100000
-
- /* This section should not be subject to garbage collection.
- Also set to inform the linker that this section should not be
- listed in the link map as discarded. */
-#define SEC_KEEP 0x200000
-
- /* This section contains "short" data, and should be placed
- "near" the GP. */
-#define SEC_SMALL_DATA 0x400000
-
- /* Attempt to merge identical entities in the section.
- Entity size is given in the entsize field. */
-#define SEC_MERGE 0x800000
-
- /* If given with SEC_MERGE, entities to merge are zero terminated
- strings where entsize specifies character size instead of fixed
- size entries. */
-#define SEC_STRINGS 0x1000000
-
- /* This section contains data about section groups. */
-#define SEC_GROUP 0x2000000
-
- /* The section is a COFF shared library section. This flag is
- only for the linker. If this type of section appears in
- the input file, the linker must copy it to the output file
- without changing the vma or size. FIXME: Although this
- was originally intended to be general, it really is COFF
- specific (and the flag was renamed to indicate this). It
- might be cleaner to have some more general mechanism to
- allow the back end to control what the linker does with
- sections. */
-#define SEC_COFF_SHARED_LIBRARY 0x4000000
-
- /* This input section should be copied to output in reverse order
- as an array of pointers. This is for ELF linker internal use
- only. */
-#define SEC_ELF_REVERSE_COPY 0x4000000
-
- /* This section contains data which may be shared with other
- executables or shared objects. This is for COFF only. */
-#define SEC_COFF_SHARED 0x8000000
-
- /* This section should be compressed. This is for ELF linker
- internal use only. */
-#define SEC_ELF_COMPRESS 0x8000000
-
- /* When a section with this flag is being linked, then if the size of
- the input section is less than a page, it should not cross a page
- boundary. If the size of the input section is one page or more,
- it should be aligned on a page boundary. This is for TI
- TMS320C54X only. */
-#define SEC_TIC54X_BLOCK 0x10000000
-
- /* This section should be renamed. This is for ELF linker
- internal use only. */
-#define SEC_ELF_RENAME 0x10000000
-
- /* Conditionally link this section; do not link if there are no
- references found to any symbol in the section. This is for TI
- TMS320C54X only. */
-#define SEC_TIC54X_CLINK 0x20000000
-
- /* This section contains vliw code. This is for Toshiba MeP only. */
-#define SEC_MEP_VLIW 0x20000000
-
- /* Indicate that section has the no read flag set. This happens
- when memory read flag isn't set. */
-#define SEC_COFF_NOREAD 0x40000000
-
- /* Indicate that section has the purecode flag set. */
-#define SEC_ELF_PURECODE 0x80000000
-
- /* End of section flags. */
-
- /* Some internal packed boolean fields. */
-
- /* See the vma field. */
- unsigned int user_set_vma : 1;
-
- /* A mark flag used by some of the linker backends. */
- unsigned int linker_mark : 1;
-
- /* Another mark flag used by some of the linker backends. Set for
- output sections that have an input section. */
- unsigned int linker_has_input : 1;
-
- /* Mark flag used by some linker backends for garbage collection. */
- unsigned int gc_mark : 1;
-
- /* Section compression status. */
- unsigned int compress_status : 2;
-#define COMPRESS_SECTION_NONE 0
-#define COMPRESS_SECTION_DONE 1
-#define DECOMPRESS_SECTION_SIZED 2
-
- /* The following flags are used by the ELF linker. */
-
- /* Mark sections which have been allocated to segments. */
- unsigned int segment_mark : 1;
-
- /* Type of sec_info information. */
- unsigned int sec_info_type:3;
-#define SEC_INFO_TYPE_NONE 0
-#define SEC_INFO_TYPE_STABS 1
-#define SEC_INFO_TYPE_MERGE 2
-#define SEC_INFO_TYPE_EH_FRAME 3
-#define SEC_INFO_TYPE_JUST_SYMS 4
-#define SEC_INFO_TYPE_TARGET 5
-#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6
-
- /* Nonzero if this section uses RELA relocations, rather than REL. */
- unsigned int use_rela_p:1;
-
- /* Bits used by various backends. The generic code doesn't touch
- these fields. */
-
- unsigned int sec_flg0:1;
- unsigned int sec_flg1:1;
- unsigned int sec_flg2:1;
- unsigned int sec_flg3:1;
- unsigned int sec_flg4:1;
- unsigned int sec_flg5:1;
-
- /* End of internal packed boolean fields. */
-
- /* The virtual memory address of the section - where it will be
- at run time. The symbols are relocated against this. The
- user_set_vma flag is maintained by bfd; if it's not set, the
- backend can assign addresses (for example, in <>, where
- the default address for <<.data>> is dependent on the specific
- target and various flags). */
- bfd_vma vma;
-
- /* The load address of the section - where it would be in a
- rom image; really only used for writing section header
- information. */
- bfd_vma lma;
-
- /* The size of the section in *octets*, as it will be output.
- Contains a value even if the section has no contents (e.g., the
- size of <<.bss>>). */
- bfd_size_type size;
-
- /* For input sections, the original size on disk of the section, in
- octets. This field should be set for any section whose size is
- changed by linker relaxation. It is required for sections where
- the linker relaxation scheme doesn't cache altered section and
- reloc contents (stabs, eh_frame, SEC_MERGE, some coff relaxing
- targets), and thus the original size needs to be kept to read the
- section multiple times. For output sections, rawsize holds the
- section size calculated on a previous linker relaxation pass. */
- bfd_size_type rawsize;
-
- /* The compressed size of the section in octets. */
- bfd_size_type compressed_size;
-
- /* Relaxation table. */
- struct relax_table *relax;
-
- /* Count of used relaxation table entries. */
- int relax_count;
-
-
- /* If this section is going to be output, then this value is the
- offset in *bytes* into the output section of the first byte in the
- input section (byte ==> smallest addressable unit on the
- target). In most cases, if this was going to start at the
- 100th octet (8-bit quantity) in the output section, this value
- would be 100. However, if the target byte size is 16 bits
- (bfd_octets_per_byte is "2"), this value would be 50. */
- bfd_vma output_offset;
-
- /* The output section through which to map on output. */
- struct bfd_section *output_section;
-
- /* The alignment requirement of the section, as an exponent of 2 -
- e.g., 3 aligns to 2^3 (or 8). */
- unsigned int alignment_power;
-
- /* If an input section, a pointer to a vector of relocation
- records for the data in this section. */
- struct reloc_cache_entry *relocation;
-
- /* If an output section, a pointer to a vector of pointers to
- relocation records for the data in this section. */
- struct reloc_cache_entry **orelocation;
-
- /* The number of relocation records in one of the above. */
- unsigned reloc_count;
-
- /* Information below is back end specific - and not always used
- or updated. */
-
- /* File position of section data. */
- file_ptr filepos;
-
- /* File position of relocation info. */
- file_ptr rel_filepos;
-
- /* File position of line data. */
- file_ptr line_filepos;
-
- /* Pointer to data for applications. */
- void *userdata;
-
- /* If the SEC_IN_MEMORY flag is set, this points to the actual
- contents. */
- unsigned char *contents;
-
- /* Attached line number information. */
- alent *lineno;
-
- /* Number of line number records. */
- unsigned int lineno_count;
-
- /* Entity size for merging purposes. */
- unsigned int entsize;
-
- /* Points to the kept section if this section is a link-once section,
- and is discarded. */
- struct bfd_section *kept_section;
-
- /* When a section is being output, this value changes as more
- linenumbers are written out. */
- file_ptr moving_line_filepos;
-
- /* What the section number is in the target world. */
- int target_index;
-
- void *used_by_bfd;
-
- /* If this is a constructor section then here is a list of the
- relocations created to relocate items within it. */
- struct relent_chain *constructor_chain;
-
- /* The BFD which owns the section. */
- bfd *owner;
-
- /* A symbol which points at this section only. */
- struct bfd_symbol *symbol;
- struct bfd_symbol **symbol_ptr_ptr;
-
- /* Early in the link process, map_head and map_tail are used to build
- a list of input sections attached to an output section. Later,
- output sections use these fields for a list of bfd_link_order
- structs. */
- union {
- struct bfd_link_order *link_order;
- struct bfd_section *s;
- } map_head, map_tail;
-} asection;
-
-/* Relax table contains information about instructions which can
- be removed by relaxation -- replacing a long address with a
- short address. */
-struct relax_table {
- /* Address where bytes may be deleted. */
- bfd_vma addr;
-
- /* Number of bytes to be deleted. */
- int size;
-};
-
-/* Note: the following are provided as inline functions rather than macros
- because not all callers use the return value. A macro implementation
- would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
- compilers will complain about comma expressions that have no effect. */
-static inline bfd_boolean
-bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr,
- void * val)
-{
- ptr->userdata = val;
- return TRUE;
-}
-
-static inline bfd_boolean
-bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
-{
- ptr->vma = ptr->lma = val;
- ptr->user_set_vma = TRUE;
- return TRUE;
-}
-
-static inline bfd_boolean
-bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr,
- unsigned int val)
-{
- ptr->alignment_power = val;
- return TRUE;
-}
-
-/* These sections are global, and are managed by BFD. The application
- and target back end are not permitted to change the values in
- these sections. */
-extern asection _bfd_std_section[4];
-
-#define BFD_ABS_SECTION_NAME "*ABS*"
-#define BFD_UND_SECTION_NAME "*UND*"
-#define BFD_COM_SECTION_NAME "*COM*"
-#define BFD_IND_SECTION_NAME "*IND*"
-
-/* Pointer to the common section. */
-#define bfd_com_section_ptr (&_bfd_std_section[0])
-/* Pointer to the undefined section. */
-#define bfd_und_section_ptr (&_bfd_std_section[1])
-/* Pointer to the absolute section. */
-#define bfd_abs_section_ptr (&_bfd_std_section[2])
-/* Pointer to the indirect section. */
-#define bfd_ind_section_ptr (&_bfd_std_section[3])
-
-#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
-#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
-#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
-
-#define bfd_is_const_section(SEC) \
- ( ((SEC) == bfd_abs_section_ptr) \
- || ((SEC) == bfd_und_section_ptr) \
- || ((SEC) == bfd_com_section_ptr) \
- || ((SEC) == bfd_ind_section_ptr))
-
-/* Macros to handle insertion and deletion of a bfd's sections. These
- only handle the list pointers, ie. do not adjust section_count,
- target_index etc. */
-#define bfd_section_list_remove(ABFD, S) \
- do \
- { \
- asection *_s = S; \
- asection *_next = _s->next; \
- asection *_prev = _s->prev; \
- if (_prev) \
- _prev->next = _next; \
- else \
- (ABFD)->sections = _next; \
- if (_next) \
- _next->prev = _prev; \
- else \
- (ABFD)->section_last = _prev; \
- } \
- while (0)
-#define bfd_section_list_append(ABFD, S) \
- do \
- { \
- asection *_s = S; \
- bfd *_abfd = ABFD; \
- _s->next = NULL; \
- if (_abfd->section_last) \
- { \
- _s->prev = _abfd->section_last; \
- _abfd->section_last->next = _s; \
- } \
- else \
- { \
- _s->prev = NULL; \
- _abfd->sections = _s; \
- } \
- _abfd->section_last = _s; \
- } \
- while (0)
-#define bfd_section_list_prepend(ABFD, S) \
- do \
- { \
- asection *_s = S; \
- bfd *_abfd = ABFD; \
- _s->prev = NULL; \
- if (_abfd->sections) \
- { \
- _s->next = _abfd->sections; \
- _abfd->sections->prev = _s; \
- } \
- else \
- { \
- _s->next = NULL; \
- _abfd->section_last = _s; \
- } \
- _abfd->sections = _s; \
- } \
- while (0)
-#define bfd_section_list_insert_after(ABFD, A, S) \
- do \
- { \
- asection *_a = A; \
- asection *_s = S; \
- asection *_next = _a->next; \
- _s->next = _next; \
- _s->prev = _a; \
- _a->next = _s; \
- if (_next) \
- _next->prev = _s; \
- else \
- (ABFD)->section_last = _s; \
- } \
- while (0)
-#define bfd_section_list_insert_before(ABFD, B, S) \
- do \
- { \
- asection *_b = B; \
- asection *_s = S; \
- asection *_prev = _b->prev; \
- _s->prev = _prev; \
- _s->next = _b; \
- _b->prev = _s; \
- if (_prev) \
- _prev->next = _s; \
- else \
- (ABFD)->sections = _s; \
- } \
- while (0)
-#define bfd_section_removed_from_list(ABFD, S) \
- ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
-
-#define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS) \
- /* name, id, index, next, prev, flags, user_set_vma, */ \
- { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \
- \
- /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \
- 0, 0, 1, 0, \
- \
- /* segment_mark, sec_info_type, use_rela_p, */ \
- 0, 0, 0, \
- \
- /* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5, */ \
- 0, 0, 0, 0, 0, 0, \
- \
- /* vma, lma, size, rawsize, compressed_size, relax, relax_count, */ \
- 0, 0, 0, 0, 0, 0, 0, \
- \
- /* output_offset, output_section, alignment_power, */ \
- 0, &SEC, 0, \
- \
- /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
- NULL, NULL, 0, 0, 0, \
- \
- /* line_filepos, userdata, contents, lineno, lineno_count, */ \
- 0, NULL, NULL, NULL, 0, \
- \
- /* entsize, kept_section, moving_line_filepos, */ \
- 0, NULL, 0, \
- \
- /* target_index, used_by_bfd, constructor_chain, owner, */ \
- 0, NULL, NULL, NULL, \
- \
- /* symbol, symbol_ptr_ptr, */ \
- (struct bfd_symbol *) SYM, &SEC.symbol, \
- \
- /* map_head, map_tail */ \
- { NULL }, { NULL } \
- }
-
-/* We use a macro to initialize the static asymbol structures because
- traditional C does not permit us to initialize a union member while
- gcc warns if we don't initialize it.
- the_bfd, name, value, attr, section [, udata] */
-#ifdef __STDC__
-#define GLOBAL_SYM_INIT(NAME, SECTION) \
- { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }}
-#else
-#define GLOBAL_SYM_INIT(NAME, SECTION) \
- { 0, NAME, 0, BSF_SECTION_SYM, SECTION }
-#endif
-
-void bfd_section_list_clear (bfd *);
-
-asection *bfd_get_section_by_name (bfd *abfd, const char *name);
-
-asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec);
-
-asection *bfd_get_linker_section (bfd *abfd, const char *name);
-
-asection *bfd_get_section_by_name_if
- (bfd *abfd,
- const char *name,
- bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-
-char *bfd_get_unique_section_name
- (bfd *abfd, const char *templat, int *count);
-
-asection *bfd_make_section_old_way (bfd *abfd, const char *name);
-
-asection *bfd_make_section_anyway_with_flags
- (bfd *abfd, const char *name, flagword flags);
-
-asection *bfd_make_section_anyway (bfd *abfd, const char *name);
-
-asection *bfd_make_section_with_flags
- (bfd *, const char *name, flagword flags);
-
-asection *bfd_make_section (bfd *, const char *name);
-
-bfd_boolean bfd_set_section_flags
- (bfd *abfd, asection *sec, flagword flags);
-
-void bfd_rename_section
- (bfd *abfd, asection *sec, const char *newname);
-
-void bfd_map_over_sections
- (bfd *abfd,
- void (*func) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-
-asection *bfd_sections_find_if
- (bfd *abfd,
- bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-
-bfd_boolean bfd_set_section_size
- (bfd *abfd, asection *sec, bfd_size_type val);
-
-bfd_boolean bfd_set_section_contents
- (bfd *abfd, asection *section, const void *data,
- file_ptr offset, bfd_size_type count);
-
-bfd_boolean bfd_get_section_contents
- (bfd *abfd, asection *section, void *location, file_ptr offset,
- bfd_size_type count);
-
-bfd_boolean bfd_malloc_and_get_section
- (bfd *abfd, asection *section, bfd_byte **buf);
-
-bfd_boolean bfd_copy_private_section_data
- (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
-
-#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
- BFD_SEND (obfd, _bfd_copy_private_section_data, \
- (ibfd, isection, obfd, osection))
-bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
-
-bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
-
-/* Extracted from archures.c. */
-enum bfd_architecture
-{
- bfd_arch_unknown, /* File arch not known. */
- bfd_arch_obscure, /* Arch known, not one of these. */
- bfd_arch_m68k, /* Motorola 68xxx. */
-#define bfd_mach_m68000 1
-#define bfd_mach_m68008 2
-#define bfd_mach_m68010 3
-#define bfd_mach_m68020 4
-#define bfd_mach_m68030 5
-#define bfd_mach_m68040 6
-#define bfd_mach_m68060 7
-#define bfd_mach_cpu32 8
-#define bfd_mach_fido 9
-#define bfd_mach_mcf_isa_a_nodiv 10
-#define bfd_mach_mcf_isa_a 11
-#define bfd_mach_mcf_isa_a_mac 12
-#define bfd_mach_mcf_isa_a_emac 13
-#define bfd_mach_mcf_isa_aplus 14
-#define bfd_mach_mcf_isa_aplus_mac 15
-#define bfd_mach_mcf_isa_aplus_emac 16
-#define bfd_mach_mcf_isa_b_nousp 17
-#define bfd_mach_mcf_isa_b_nousp_mac 18
-#define bfd_mach_mcf_isa_b_nousp_emac 19
-#define bfd_mach_mcf_isa_b 20
-#define bfd_mach_mcf_isa_b_mac 21
-#define bfd_mach_mcf_isa_b_emac 22
-#define bfd_mach_mcf_isa_b_float 23
-#define bfd_mach_mcf_isa_b_float_mac 24
-#define bfd_mach_mcf_isa_b_float_emac 25
-#define bfd_mach_mcf_isa_c 26
-#define bfd_mach_mcf_isa_c_mac 27
-#define bfd_mach_mcf_isa_c_emac 28
-#define bfd_mach_mcf_isa_c_nodiv 29
-#define bfd_mach_mcf_isa_c_nodiv_mac 30
-#define bfd_mach_mcf_isa_c_nodiv_emac 31
- bfd_arch_vax, /* DEC Vax. */
-
- bfd_arch_or1k, /* OpenRISC 1000. */
-#define bfd_mach_or1k 1
-#define bfd_mach_or1knd 2
-
- bfd_arch_sparc, /* SPARC. */
-#define bfd_mach_sparc 1
-/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
-#define bfd_mach_sparc_sparclet 2
-#define bfd_mach_sparc_sparclite 3
-#define bfd_mach_sparc_v8plus 4
-#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */
-#define bfd_mach_sparc_sparclite_le 6
-#define bfd_mach_sparc_v9 7
-#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */
-#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */
-#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */
-#define bfd_mach_sparc_v8plusc 11 /* with UA2005 and T1 add'ns. */
-#define bfd_mach_sparc_v9c 12 /* with UA2005 and T1 add'ns. */
-#define bfd_mach_sparc_v8plusd 13 /* with UA2007 and T3 add'ns. */
-#define bfd_mach_sparc_v9d 14 /* with UA2007 and T3 add'ns. */
-#define bfd_mach_sparc_v8pluse 15 /* with OSA2001 and T4 add'ns (no IMA). */
-#define bfd_mach_sparc_v9e 16 /* with OSA2001 and T4 add'ns (no IMA). */
-#define bfd_mach_sparc_v8plusv 17 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
-#define bfd_mach_sparc_v9v 18 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
-#define bfd_mach_sparc_v8plusm 19 /* with OSA2015 and M7 add'ns. */
-#define bfd_mach_sparc_v9m 20 /* with OSA2015 and M7 add'ns. */
-#define bfd_mach_sparc_v8plusm8 21 /* with OSA2017 and M8 add'ns. */
-#define bfd_mach_sparc_v9m8 22 /* with OSA2017 and M8 add'ns. */
-/* Nonzero if MACH has the v9 instruction set. */
-#define bfd_mach_sparc_v9_p(mach) \
- ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9m8 \
- && (mach) != bfd_mach_sparc_sparclite_le)
-/* Nonzero if MACH is a 64 bit sparc architecture. */
-#define bfd_mach_sparc_64bit_p(mach) \
- ((mach) >= bfd_mach_sparc_v9 \
- && (mach) != bfd_mach_sparc_v8plusb \
- && (mach) != bfd_mach_sparc_v8plusc \
- && (mach) != bfd_mach_sparc_v8plusd \
- && (mach) != bfd_mach_sparc_v8pluse \
- && (mach) != bfd_mach_sparc_v8plusv \
- && (mach) != bfd_mach_sparc_v8plusm \
- && (mach) != bfd_mach_sparc_v8plusm8)
- bfd_arch_spu, /* PowerPC SPU. */
-#define bfd_mach_spu 256
- bfd_arch_mips, /* MIPS Rxxxx. */
-#define bfd_mach_mips3000 3000
-#define bfd_mach_mips3900 3900
-#define bfd_mach_mips4000 4000
-#define bfd_mach_mips4010 4010
-#define bfd_mach_mips4100 4100
-#define bfd_mach_mips4111 4111
-#define bfd_mach_mips4120 4120
-#define bfd_mach_mips4300 4300
-#define bfd_mach_mips4400 4400
-#define bfd_mach_mips4600 4600
-#define bfd_mach_mips4650 4650
-#define bfd_mach_mips5000 5000
-#define bfd_mach_mips5400 5400
-#define bfd_mach_mips5500 5500
-#define bfd_mach_mips5900 5900
-#define bfd_mach_mips6000 6000
-#define bfd_mach_mips7000 7000
-#define bfd_mach_mips8000 8000
-#define bfd_mach_mips9000 9000
-#define bfd_mach_mips10000 10000
-#define bfd_mach_mips12000 12000
-#define bfd_mach_mips14000 14000
-#define bfd_mach_mips16000 16000
-#define bfd_mach_mips16 16
-#define bfd_mach_mips5 5
-#define bfd_mach_mips_loongson_2e 3001
-#define bfd_mach_mips_loongson_2f 3002
-#define bfd_mach_mips_gs464 3003
-#define bfd_mach_mips_gs464e 3004
-#define bfd_mach_mips_gs264e 3005
-#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01. */
-#define bfd_mach_mips_octeon 6501
-#define bfd_mach_mips_octeonp 6601
-#define bfd_mach_mips_octeon2 6502
-#define bfd_mach_mips_octeon3 6503
-#define bfd_mach_mips_xlr 887682 /* decimal 'XLR'. */
-#define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2'. */
-#define bfd_mach_mipsisa32 32
-#define bfd_mach_mipsisa32r2 33
-#define bfd_mach_mipsisa32r3 34
-#define bfd_mach_mipsisa32r5 36
-#define bfd_mach_mipsisa32r6 37
-#define bfd_mach_mipsisa64 64
-#define bfd_mach_mipsisa64r2 65
-#define bfd_mach_mipsisa64r3 66
-#define bfd_mach_mipsisa64r5 68
-#define bfd_mach_mipsisa64r6 69
-#define bfd_mach_mips_micromips 96
- bfd_arch_i386, /* Intel 386. */
-#define bfd_mach_i386_intel_syntax (1 << 0)
-#define bfd_mach_i386_i8086 (1 << 1)
-#define bfd_mach_i386_i386 (1 << 2)
-#define bfd_mach_x86_64 (1 << 3)
-#define bfd_mach_x64_32 (1 << 4)
-#define bfd_mach_i386_i386_intel_syntax (bfd_mach_i386_i386 | bfd_mach_i386_intel_syntax)
-#define bfd_mach_x86_64_intel_syntax (bfd_mach_x86_64 | bfd_mach_i386_intel_syntax)
-#define bfd_mach_x64_32_intel_syntax (bfd_mach_x64_32 | bfd_mach_i386_intel_syntax)
- bfd_arch_l1om, /* Intel L1OM. */
-#define bfd_mach_l1om (1 << 5)
-#define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax)
- bfd_arch_k1om, /* Intel K1OM. */
-#define bfd_mach_k1om (1 << 6)
-#define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax)
-#define bfd_mach_i386_nacl (1 << 7)
-#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl)
-#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl)
-#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl)
- bfd_arch_iamcu, /* Intel MCU. */
-#define bfd_mach_iamcu (1 << 8)
-#define bfd_mach_i386_iamcu (bfd_mach_i386_i386 | bfd_mach_iamcu)
-#define bfd_mach_i386_iamcu_intel_syntax (bfd_mach_i386_iamcu | bfd_mach_i386_intel_syntax)
- bfd_arch_romp, /* IBM ROMP PC/RT. */
- bfd_arch_convex, /* Convex. */
- bfd_arch_m98k, /* Motorola 98xxx. */
- bfd_arch_pyramid, /* Pyramid Technology. */
- bfd_arch_h8300, /* Renesas H8/300 (formerly Hitachi H8/300). */
-#define bfd_mach_h8300 1
-#define bfd_mach_h8300h 2
-#define bfd_mach_h8300s 3
-#define bfd_mach_h8300hn 4
-#define bfd_mach_h8300sn 5
-#define bfd_mach_h8300sx 6
-#define bfd_mach_h8300sxn 7
- bfd_arch_pdp11, /* DEC PDP-11. */
- bfd_arch_plugin,
- bfd_arch_powerpc, /* PowerPC. */
-#define bfd_mach_ppc 32
-#define bfd_mach_ppc64 64
-#define bfd_mach_ppc_403 403
-#define bfd_mach_ppc_403gc 4030
-#define bfd_mach_ppc_405 405
-#define bfd_mach_ppc_505 505
-#define bfd_mach_ppc_601 601
-#define bfd_mach_ppc_602 602
-#define bfd_mach_ppc_603 603
-#define bfd_mach_ppc_ec603e 6031
-#define bfd_mach_ppc_604 604
-#define bfd_mach_ppc_620 620
-#define bfd_mach_ppc_630 630
-#define bfd_mach_ppc_750 750
-#define bfd_mach_ppc_860 860
-#define bfd_mach_ppc_a35 35
-#define bfd_mach_ppc_rs64ii 642
-#define bfd_mach_ppc_rs64iii 643
-#define bfd_mach_ppc_7400 7400
-#define bfd_mach_ppc_e500 500
-#define bfd_mach_ppc_e500mc 5001
-#define bfd_mach_ppc_e500mc64 5005
-#define bfd_mach_ppc_e5500 5006
-#define bfd_mach_ppc_e6500 5007
-#define bfd_mach_ppc_titan 83
-#define bfd_mach_ppc_vle 84
- bfd_arch_rs6000, /* IBM RS/6000. */
-#define bfd_mach_rs6k 6000
-#define bfd_mach_rs6k_rs1 6001
-#define bfd_mach_rs6k_rsc 6003
-#define bfd_mach_rs6k_rs2 6002
- bfd_arch_hppa, /* HP PA RISC. */
-#define bfd_mach_hppa10 10
-#define bfd_mach_hppa11 11
-#define bfd_mach_hppa20 20
-#define bfd_mach_hppa20w 25
- bfd_arch_d10v, /* Mitsubishi D10V. */
-#define bfd_mach_d10v 1
-#define bfd_mach_d10v_ts2 2
-#define bfd_mach_d10v_ts3 3
- bfd_arch_d30v, /* Mitsubishi D30V. */
- bfd_arch_dlx, /* DLX. */
- bfd_arch_m68hc11, /* Motorola 68HC11. */
- bfd_arch_m68hc12, /* Motorola 68HC12. */
-#define bfd_mach_m6812_default 0
-#define bfd_mach_m6812 1
-#define bfd_mach_m6812s 2
- bfd_arch_m9s12x, /* Freescale S12X. */
- bfd_arch_m9s12xg, /* Freescale XGATE. */
- bfd_arch_s12z, /* Freescale S12Z. */
-#define bfd_mach_s12z_default 0
- bfd_arch_z8k, /* Zilog Z8000. */
-#define bfd_mach_z8001 1
-#define bfd_mach_z8002 2
- bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */
-#define bfd_mach_sh 1
-#define bfd_mach_sh2 0x20
-#define bfd_mach_sh_dsp 0x2d
-#define bfd_mach_sh2a 0x2a
-#define bfd_mach_sh2a_nofpu 0x2b
-#define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
-#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2
-#define bfd_mach_sh2a_or_sh4 0x2a3
-#define bfd_mach_sh2a_or_sh3e 0x2a4
-#define bfd_mach_sh2e 0x2e
-#define bfd_mach_sh3 0x30
-#define bfd_mach_sh3_nommu 0x31
-#define bfd_mach_sh3_dsp 0x3d
-#define bfd_mach_sh3e 0x3e
-#define bfd_mach_sh4 0x40
-#define bfd_mach_sh4_nofpu 0x41
-#define bfd_mach_sh4_nommu_nofpu 0x42
-#define bfd_mach_sh4a 0x4a
-#define bfd_mach_sh4a_nofpu 0x4b
-#define bfd_mach_sh4al_dsp 0x4d
- bfd_arch_alpha, /* Dec Alpha. */
-#define bfd_mach_alpha_ev4 0x10
-#define bfd_mach_alpha_ev5 0x20
-#define bfd_mach_alpha_ev6 0x30
- bfd_arch_arm, /* Advanced Risc Machines ARM. */
-#define bfd_mach_arm_unknown 0
-#define bfd_mach_arm_2 1
-#define bfd_mach_arm_2a 2
-#define bfd_mach_arm_3 3
-#define bfd_mach_arm_3M 4
-#define bfd_mach_arm_4 5
-#define bfd_mach_arm_4T 6
-#define bfd_mach_arm_5 7
-#define bfd_mach_arm_5T 8
-#define bfd_mach_arm_5TE 9
-#define bfd_mach_arm_XScale 10
-#define bfd_mach_arm_ep9312 11
-#define bfd_mach_arm_iWMMXt 12
-#define bfd_mach_arm_iWMMXt2 13
-#define bfd_mach_arm_5TEJ 14
-#define bfd_mach_arm_6 15
-#define bfd_mach_arm_6KZ 16
-#define bfd_mach_arm_6T2 17
-#define bfd_mach_arm_6K 18
-#define bfd_mach_arm_7 19
-#define bfd_mach_arm_6M 20
-#define bfd_mach_arm_6SM 21
-#define bfd_mach_arm_7EM 22
-#define bfd_mach_arm_8 23
-#define bfd_mach_arm_8R 24
-#define bfd_mach_arm_8M_BASE 25
-#define bfd_mach_arm_8M_MAIN 26
- bfd_arch_nds32, /* Andes NDS32. */
-#define bfd_mach_n1 1
-#define bfd_mach_n1h 2
-#define bfd_mach_n1h_v2 3
-#define bfd_mach_n1h_v3 4
-#define bfd_mach_n1h_v3m 5
- bfd_arch_ns32k, /* National Semiconductors ns32000. */
- bfd_arch_tic30, /* Texas Instruments TMS320C30. */
- bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */
-#define bfd_mach_tic3x 30
-#define bfd_mach_tic4x 40
- bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */
- bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */
- bfd_arch_tic80, /* TI TMS320c80 (MVP). */
- bfd_arch_v850, /* NEC V850. */
- bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */
-#define bfd_mach_v850 1
-#define bfd_mach_v850e 'E'
-#define bfd_mach_v850e1 '1'
-#define bfd_mach_v850e2 0x4532
-#define bfd_mach_v850e2v3 0x45325633
-#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */
- bfd_arch_arc, /* ARC Cores. */
-#define bfd_mach_arc_a4 0
-#define bfd_mach_arc_a5 1
-#define bfd_mach_arc_arc600 2
-#define bfd_mach_arc_arc601 4
-#define bfd_mach_arc_arc700 3
-#define bfd_mach_arc_arcv2 5
- bfd_arch_m32c, /* Renesas M16C/M32C. */
-#define bfd_mach_m16c 0x75
-#define bfd_mach_m32c 0x78
- bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */
-#define bfd_mach_m32r 1 /* For backwards compatibility. */
-#define bfd_mach_m32rx 'x'
-#define bfd_mach_m32r2 '2'
- bfd_arch_mn10200, /* Matsushita MN10200. */
- bfd_arch_mn10300, /* Matsushita MN10300. */
-#define bfd_mach_mn10300 300
-#define bfd_mach_am33 330
-#define bfd_mach_am33_2 332
- bfd_arch_fr30,
-#define bfd_mach_fr30 0x46523330
- bfd_arch_frv,
-#define bfd_mach_frv 1
-#define bfd_mach_frvsimple 2
-#define bfd_mach_fr300 300
-#define bfd_mach_fr400 400
-#define bfd_mach_fr450 450
-#define bfd_mach_frvtomcat 499 /* fr500 prototype. */
-#define bfd_mach_fr500 500
-#define bfd_mach_fr550 550
- bfd_arch_moxie, /* The moxie processor. */
-#define bfd_mach_moxie 1
- bfd_arch_ft32, /* The ft32 processor. */
-#define bfd_mach_ft32 1
-#define bfd_mach_ft32b 2
- bfd_arch_mcore,
- bfd_arch_mep,
-#define bfd_mach_mep 1
-#define bfd_mach_mep_h1 0x6831
-#define bfd_mach_mep_c5 0x6335
- bfd_arch_metag,
-#define bfd_mach_metag 1
- bfd_arch_ia64, /* HP/Intel ia64. */
-#define bfd_mach_ia64_elf64 64
-#define bfd_mach_ia64_elf32 32
- bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */
-#define bfd_mach_ip2022 1
-#define bfd_mach_ip2022ext 2
- bfd_arch_iq2000, /* Vitesse IQ2000. */
-#define bfd_mach_iq2000 1
-#define bfd_mach_iq10 2
- bfd_arch_epiphany, /* Adapteva EPIPHANY. */
-#define bfd_mach_epiphany16 1
-#define bfd_mach_epiphany32 2
- bfd_arch_mt,
-#define bfd_mach_ms1 1
-#define bfd_mach_mrisc2 2
-#define bfd_mach_ms2 3
- bfd_arch_pj,
- bfd_arch_avr, /* Atmel AVR microcontrollers. */
-#define bfd_mach_avr1 1
-#define bfd_mach_avr2 2
-#define bfd_mach_avr25 25
-#define bfd_mach_avr3 3
-#define bfd_mach_avr31 31
-#define bfd_mach_avr35 35
-#define bfd_mach_avr4 4
-#define bfd_mach_avr5 5
-#define bfd_mach_avr51 51
-#define bfd_mach_avr6 6
-#define bfd_mach_avrtiny 100
-#define bfd_mach_avrxmega1 101
-#define bfd_mach_avrxmega2 102
-#define bfd_mach_avrxmega3 103
-#define bfd_mach_avrxmega4 104
-#define bfd_mach_avrxmega5 105
-#define bfd_mach_avrxmega6 106
-#define bfd_mach_avrxmega7 107
- bfd_arch_bfin, /* ADI Blackfin. */
-#define bfd_mach_bfin 1
- bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */
-#define bfd_mach_cr16 1
- bfd_arch_cr16c, /* National Semiconductor CompactRISC. */
-#define bfd_mach_cr16c 1
- bfd_arch_crx, /* National Semiconductor CRX. */
-#define bfd_mach_crx 1
- bfd_arch_cris, /* Axis CRIS. */
-#define bfd_mach_cris_v0_v10 255
-#define bfd_mach_cris_v32 32
-#define bfd_mach_cris_v10_v32 1032
- bfd_arch_riscv,
-#define bfd_mach_riscv32 132
-#define bfd_mach_riscv64 164
- bfd_arch_rl78,
-#define bfd_mach_rl78 0x75
- bfd_arch_rx, /* Renesas RX. */
-#define bfd_mach_rx 0x75
-#define bfd_mach_rx_v2 0x76
-#define bfd_mach_rx_v3 0x77
- bfd_arch_s390, /* IBM s390. */
-#define bfd_mach_s390_31 31
-#define bfd_mach_s390_64 64
- bfd_arch_score, /* Sunplus score. */
-#define bfd_mach_score3 3
-#define bfd_mach_score7 7
- bfd_arch_mmix, /* Donald Knuth's educational processor. */
- bfd_arch_xstormy16,
-#define bfd_mach_xstormy16 1
- bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */
-#define bfd_mach_msp11 11
-#define bfd_mach_msp110 110
-#define bfd_mach_msp12 12
-#define bfd_mach_msp13 13
-#define bfd_mach_msp14 14
-#define bfd_mach_msp15 15
-#define bfd_mach_msp16 16
-#define bfd_mach_msp20 20
-#define bfd_mach_msp21 21
-#define bfd_mach_msp22 22
-#define bfd_mach_msp23 23
-#define bfd_mach_msp24 24
-#define bfd_mach_msp26 26
-#define bfd_mach_msp31 31
-#define bfd_mach_msp32 32
-#define bfd_mach_msp33 33
-#define bfd_mach_msp41 41
-#define bfd_mach_msp42 42
-#define bfd_mach_msp43 43
-#define bfd_mach_msp44 44
-#define bfd_mach_msp430x 45
-#define bfd_mach_msp46 46
-#define bfd_mach_msp47 47
-#define bfd_mach_msp54 54
- bfd_arch_xc16x, /* Infineon's XC16X Series. */
-#define bfd_mach_xc16x 1
-#define bfd_mach_xc16xl 2
-#define bfd_mach_xc16xs 3
- bfd_arch_xgate, /* Freescale XGATE. */
-#define bfd_mach_xgate 1
- bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
-#define bfd_mach_xtensa 1
- bfd_arch_z80,
-#define bfd_mach_z80strict 1 /* No undocumented opcodes. */
-#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */
-#define bfd_mach_z80full 7 /* All undocumented instructions. */
-#define bfd_mach_r800 11 /* R800: successor with multiplication. */
- bfd_arch_lm32, /* Lattice Mico32. */
-#define bfd_mach_lm32 1
- bfd_arch_microblaze,/* Xilinx MicroBlaze. */
- bfd_arch_tilepro, /* Tilera TILEPro. */
- bfd_arch_tilegx, /* Tilera TILE-Gx. */
-#define bfd_mach_tilepro 1
-#define bfd_mach_tilegx 1
-#define bfd_mach_tilegx32 2
- bfd_arch_aarch64, /* AArch64. */
-#define bfd_mach_aarch64 0
-#define bfd_mach_aarch64_ilp32 32
- bfd_arch_nios2, /* Nios II. */
-#define bfd_mach_nios2 0
-#define bfd_mach_nios2r1 1
-#define bfd_mach_nios2r2 2
- bfd_arch_visium, /* Visium. */
-#define bfd_mach_visium 1
- bfd_arch_wasm32, /* WebAssembly. */
-#define bfd_mach_wasm32 1
- bfd_arch_pru, /* PRU. */
-#define bfd_mach_pru 0
- bfd_arch_nfp, /* Netronome Flow Processor */
-#define bfd_mach_nfp3200 0x3200
-#define bfd_mach_nfp6000 0x6000
- bfd_arch_csky, /* C-SKY. */
-#define bfd_mach_ck_unknown 0
-#define bfd_mach_ck510 1
-#define bfd_mach_ck610 2
-#define bfd_mach_ck801 3
-#define bfd_mach_ck802 4
-#define bfd_mach_ck803 5
-#define bfd_mach_ck807 6
-#define bfd_mach_ck810 7
- bfd_arch_last
- };
-
-typedef struct bfd_arch_info
-{
- int bits_per_word;
- int bits_per_address;
- int bits_per_byte;
- enum bfd_architecture arch;
- unsigned long mach;
- const char *arch_name;
- const char *printable_name;
- unsigned int section_align_power;
- /* TRUE if this is the default machine for the architecture.
- The default arch should be the first entry for an arch so that
- all the entries for that arch can be accessed via <>. */
- bfd_boolean the_default;
- const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *,
- const struct bfd_arch_info *);
-
- bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
-
- /* Allocate via bfd_malloc and return a fill buffer of size COUNT. If
- IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is
- TRUE, the buffer contains code. */
- void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian,
- bfd_boolean code);
-
- const struct bfd_arch_info *next;
-}
-bfd_arch_info_type;
-
-const char *bfd_printable_name (bfd *abfd);
-
-const bfd_arch_info_type *bfd_scan_arch (const char *string);
-
-const char **bfd_arch_list (void);
-
-const bfd_arch_info_type *bfd_arch_get_compatible
- (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
-
-void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
-
-bfd_boolean bfd_default_set_arch_mach
- (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
-
-enum bfd_architecture bfd_get_arch (bfd *abfd);
-
-unsigned long bfd_get_mach (bfd *abfd);
-
-unsigned int bfd_arch_bits_per_byte (bfd *abfd);
-
-unsigned int bfd_arch_bits_per_address (bfd *abfd);
-
-const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
-
-const bfd_arch_info_type *bfd_lookup_arch
- (enum bfd_architecture arch, unsigned long machine);
-
-const char *bfd_printable_arch_mach
- (enum bfd_architecture arch, unsigned long machine);
-
-unsigned int bfd_octets_per_byte (bfd *abfd);
-
-unsigned int bfd_arch_mach_octets_per_byte
- (enum bfd_architecture arch, unsigned long machine);
-
-/* Extracted from reloc.c. */
-
-typedef enum bfd_reloc_status
-{
- /* No errors detected. Note - the value 2 is used so that it
- will not be mistaken for the boolean TRUE or FALSE values. */
- bfd_reloc_ok = 2,
-
- /* The relocation was performed, but there was an overflow. */
- bfd_reloc_overflow,
-
- /* The address to relocate was not within the section supplied. */
- bfd_reloc_outofrange,
-
- /* Used by special functions. */
- bfd_reloc_continue,
-
- /* Unsupported relocation size requested. */
- bfd_reloc_notsupported,
-
- /* Unused. */
- bfd_reloc_other,
-
- /* The symbol to relocate against was undefined. */
- bfd_reloc_undefined,
-
- /* The relocation was performed, but may not be ok. If this type is
- returned, the error_message argument to bfd_perform_relocation
- will be set. */
- bfd_reloc_dangerous
- }
- bfd_reloc_status_type;
-
-typedef const struct reloc_howto_struct reloc_howto_type;
-
-typedef struct reloc_cache_entry
-{
- /* A pointer into the canonical table of pointers. */
- struct bfd_symbol **sym_ptr_ptr;
-
- /* offset in section. */
- bfd_size_type address;
-
- /* addend for relocation value. */
- bfd_vma addend;
-
- /* Pointer to how to perform the required relocation. */
- reloc_howto_type *howto;
-
-}
-arelent;
-
-
-enum complain_overflow
-{
- /* Do not complain on overflow. */
- complain_overflow_dont,
-
- /* Complain if the value overflows when considered as a signed
- number one bit larger than the field. ie. A bitfield of N bits
- is allowed to represent -2**n to 2**n-1. */
- complain_overflow_bitfield,
-
- /* Complain if the value overflows when considered as a signed
- number. */
- complain_overflow_signed,
-
- /* Complain if the value overflows when considered as an
- unsigned number. */
- complain_overflow_unsigned
-};
-struct reloc_howto_struct
-{
- /* The type field has mainly a documentary use - the back end can
- do what it wants with it, though normally the back end's idea of
- an external reloc number is stored in this field. */
- unsigned int type;
-
- /* The encoded size of the item to be relocated. This is *not* a
- power-of-two measure. Use bfd_get_reloc_size to find the size
- of the item in bytes. */
- unsigned int size:3;
-
- /* The number of bits in the field to be relocated. This is used
- when doing overflow checking. */
- unsigned int bitsize:7;
-
- /* The value the final relocation is shifted right by. This drops
- unwanted data from the relocation. */
- unsigned int rightshift:6;
-
- /* The bit position of the reloc value in the destination.
- The relocated value is left shifted by this amount. */
- unsigned int bitpos:6;
-
- /* What type of overflow error should be checked for when
- relocating. */
- ENUM_BITFIELD (complain_overflow) complain_on_overflow:2;
-
- /* The relocation value should be negated before applying. */
- unsigned int negate:1;
-
- /* The relocation is relative to the item being relocated. */
- unsigned int pc_relative:1;
-
- /* Some formats record a relocation addend in the section contents
- rather than with the relocation. For ELF formats this is the
- distinction between USE_REL and USE_RELA (though the code checks
- for USE_REL == 1/0). The value of this field is TRUE if the
- addend is recorded with the section contents; when performing a
- partial link (ld -r) the section contents (the data) will be
- modified. The value of this field is FALSE if addends are
- recorded with the relocation (in arelent.addend); when performing
- a partial link the relocation will be modified.
- All relocations for all ELF USE_RELA targets should set this field
- to FALSE (values of TRUE should be looked on with suspicion).
- However, the converse is not true: not all relocations of all ELF
- USE_REL targets set this field to TRUE. Why this is so is peculiar
- to each particular target. For relocs that aren't used in partial
- links (e.g. GOT stuff) it doesn't matter what this is set to. */
- unsigned int partial_inplace:1;
-
- /* When some formats create PC relative instructions, they leave
- the value of the pc of the place being relocated in the offset
- slot of the instruction, so that a PC relative relocation can
- be made just by adding in an ordinary offset (e.g., sun3 a.out).
- Some formats leave the displacement part of an instruction
- empty (e.g., ELF); this flag signals the fact. */
- unsigned int pcrel_offset:1;
-
- /* src_mask selects the part of the instruction (or data) to be used
- in the relocation sum. If the target relocations don't have an
- addend in the reloc, eg. ELF USE_REL, src_mask will normally equal
- dst_mask to extract the addend from the section contents. If
- relocations do have an addend in the reloc, eg. ELF USE_RELA, this
- field should normally be zero. Non-zero values for ELF USE_RELA
- targets should be viewed with suspicion as normally the value in
- the dst_mask part of the section contents should be ignored. */
- bfd_vma src_mask;
-
- /* dst_mask selects which parts of the instruction (or data) are
- replaced with a relocated value. */
- bfd_vma dst_mask;
-
- /* If this field is non null, then the supplied function is
- called rather than the normal function. This allows really
- strange relocation methods to be accommodated. */
- bfd_reloc_status_type (*special_function)
- (bfd *, arelent *, struct bfd_symbol *, void *, asection *,
- bfd *, char **);
-
- /* The textual name of the relocation type. */
- char *name;
-};
-
-#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \
- inplace, src_mask, dst_mask, pcrel_off) \
- { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \
- size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name }
-#define EMPTY_HOWTO(C) \
- HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \
- NULL, FALSE, 0, 0, FALSE)
-
-unsigned int bfd_get_reloc_size (reloc_howto_type *);
-
-typedef struct relent_chain
-{
- arelent relent;
- struct relent_chain *next;
-}
-arelent_chain;
-
-bfd_reloc_status_type bfd_check_overflow
- (enum complain_overflow how,
- unsigned int bitsize,
- unsigned int rightshift,
- unsigned int addrsize,
- bfd_vma relocation);
-
-bfd_boolean bfd_reloc_offset_in_range
- (reloc_howto_type *howto,
- bfd *abfd,
- asection *section,
- bfd_size_type offset);
-
-bfd_reloc_status_type bfd_perform_relocation
- (bfd *abfd,
- arelent *reloc_entry,
- void *data,
- asection *input_section,
- bfd *output_bfd,
- char **error_message);
-
-bfd_reloc_status_type bfd_install_relocation
- (bfd *abfd,
- arelent *reloc_entry,
- void *data, bfd_vma data_start,
- asection *input_section,
- char **error_message);
-
-enum bfd_reloc_code_real {
- _dummy_first_bfd_reloc_code_real,
-
-
-/* Basic absolute relocations of N bits. */
- BFD_RELOC_64,
- BFD_RELOC_32,
- BFD_RELOC_26,
- BFD_RELOC_24,
- BFD_RELOC_16,
- BFD_RELOC_14,
- BFD_RELOC_8,
-
-/* PC-relative relocations. Sometimes these are relative to the address
-of the relocation itself; sometimes they are relative to the start of
-the section containing the relocation. It depends on the specific target. */
- BFD_RELOC_64_PCREL,
- BFD_RELOC_32_PCREL,
- BFD_RELOC_24_PCREL,
- BFD_RELOC_16_PCREL,
- BFD_RELOC_12_PCREL,
- BFD_RELOC_8_PCREL,
-
-/* Section relative relocations. Some targets need this for DWARF2. */
- BFD_RELOC_32_SECREL,
-
-/* For ELF. */
- BFD_RELOC_32_GOT_PCREL,
- BFD_RELOC_16_GOT_PCREL,
- BFD_RELOC_8_GOT_PCREL,
- BFD_RELOC_32_GOTOFF,
- BFD_RELOC_16_GOTOFF,
- BFD_RELOC_LO16_GOTOFF,
- BFD_RELOC_HI16_GOTOFF,
- BFD_RELOC_HI16_S_GOTOFF,
- BFD_RELOC_8_GOTOFF,
- BFD_RELOC_64_PLT_PCREL,
- BFD_RELOC_32_PLT_PCREL,
- BFD_RELOC_24_PLT_PCREL,
- BFD_RELOC_16_PLT_PCREL,
- BFD_RELOC_8_PLT_PCREL,
- BFD_RELOC_64_PLTOFF,
- BFD_RELOC_32_PLTOFF,
- BFD_RELOC_16_PLTOFF,
- BFD_RELOC_LO16_PLTOFF,
- BFD_RELOC_HI16_PLTOFF,
- BFD_RELOC_HI16_S_PLTOFF,
- BFD_RELOC_8_PLTOFF,
-
-/* Size relocations. */
- BFD_RELOC_SIZE32,
- BFD_RELOC_SIZE64,
-
-/* Relocations used by 68K ELF. */
- BFD_RELOC_68K_GLOB_DAT,
- BFD_RELOC_68K_JMP_SLOT,
- BFD_RELOC_68K_RELATIVE,
- BFD_RELOC_68K_TLS_GD32,
- BFD_RELOC_68K_TLS_GD16,
- BFD_RELOC_68K_TLS_GD8,
- BFD_RELOC_68K_TLS_LDM32,
- BFD_RELOC_68K_TLS_LDM16,
- BFD_RELOC_68K_TLS_LDM8,
- BFD_RELOC_68K_TLS_LDO32,
- BFD_RELOC_68K_TLS_LDO16,
- BFD_RELOC_68K_TLS_LDO8,
- BFD_RELOC_68K_TLS_IE32,
- BFD_RELOC_68K_TLS_IE16,
- BFD_RELOC_68K_TLS_IE8,
- BFD_RELOC_68K_TLS_LE32,
- BFD_RELOC_68K_TLS_LE16,
- BFD_RELOC_68K_TLS_LE8,
-
-/* Linkage-table relative. */
- BFD_RELOC_32_BASEREL,
- BFD_RELOC_16_BASEREL,
- BFD_RELOC_LO16_BASEREL,
- BFD_RELOC_HI16_BASEREL,
- BFD_RELOC_HI16_S_BASEREL,
- BFD_RELOC_8_BASEREL,
- BFD_RELOC_RVA,
-
-/* Absolute 8-bit relocation, but used to form an address like 0xFFnn. */
- BFD_RELOC_8_FFnn,
-
-/* These PC-relative relocations are stored as word displacements --
-i.e., byte displacements shifted right two bits. The 30-bit word
-displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the
-SPARC. (SPARC tools generally refer to this as <>.) The
-signed 16-bit displacement is used on the MIPS, and the 23-bit
-displacement is used on the Alpha. */
- BFD_RELOC_32_PCREL_S2,
- BFD_RELOC_16_PCREL_S2,
- BFD_RELOC_23_PCREL_S2,
-
-/* High 22 bits and low 10 bits of 32-bit value, placed into lower bits of
-the target word. These are used on the SPARC. */
- BFD_RELOC_HI22,
- BFD_RELOC_LO10,
-
-/* For systems that allocate a Global Pointer register, these are
-displacements off that register. These relocation types are
-handled specially, because the value the register will have is
-decided relatively late. */
- BFD_RELOC_GPREL16,
- BFD_RELOC_GPREL32,
-
-/* SPARC ELF relocations. There is probably some overlap with other
-relocation types already defined. */
- BFD_RELOC_NONE,
- BFD_RELOC_SPARC_WDISP22,
- BFD_RELOC_SPARC22,
- BFD_RELOC_SPARC13,
- BFD_RELOC_SPARC_GOT10,
- BFD_RELOC_SPARC_GOT13,
- BFD_RELOC_SPARC_GOT22,
- BFD_RELOC_SPARC_PC10,
- BFD_RELOC_SPARC_PC22,
- BFD_RELOC_SPARC_WPLT30,
- BFD_RELOC_SPARC_COPY,
- BFD_RELOC_SPARC_GLOB_DAT,
- BFD_RELOC_SPARC_JMP_SLOT,
- BFD_RELOC_SPARC_RELATIVE,
- BFD_RELOC_SPARC_UA16,
- BFD_RELOC_SPARC_UA32,
- BFD_RELOC_SPARC_UA64,
- BFD_RELOC_SPARC_GOTDATA_HIX22,
- BFD_RELOC_SPARC_GOTDATA_LOX10,
- BFD_RELOC_SPARC_GOTDATA_OP_HIX22,
- BFD_RELOC_SPARC_GOTDATA_OP_LOX10,
- BFD_RELOC_SPARC_GOTDATA_OP,
- BFD_RELOC_SPARC_JMP_IREL,
- BFD_RELOC_SPARC_IRELATIVE,
-
-/* I think these are specific to SPARC a.out (e.g., Sun 4). */
- BFD_RELOC_SPARC_BASE13,
- BFD_RELOC_SPARC_BASE22,
-
-/* SPARC64 relocations */
-#define BFD_RELOC_SPARC_64 BFD_RELOC_64
- BFD_RELOC_SPARC_10,
- BFD_RELOC_SPARC_11,
- BFD_RELOC_SPARC_OLO10,
- BFD_RELOC_SPARC_HH22,
- BFD_RELOC_SPARC_HM10,
- BFD_RELOC_SPARC_LM22,
- BFD_RELOC_SPARC_PC_HH22,
- BFD_RELOC_SPARC_PC_HM10,
- BFD_RELOC_SPARC_PC_LM22,
- BFD_RELOC_SPARC_WDISP16,
- BFD_RELOC_SPARC_WDISP19,
- BFD_RELOC_SPARC_7,
- BFD_RELOC_SPARC_6,
- BFD_RELOC_SPARC_5,
-#define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL
- BFD_RELOC_SPARC_PLT32,
- BFD_RELOC_SPARC_PLT64,
- BFD_RELOC_SPARC_HIX22,
- BFD_RELOC_SPARC_LOX10,
- BFD_RELOC_SPARC_H44,
- BFD_RELOC_SPARC_M44,
- BFD_RELOC_SPARC_L44,
- BFD_RELOC_SPARC_REGISTER,
- BFD_RELOC_SPARC_H34,
- BFD_RELOC_SPARC_SIZE32,
- BFD_RELOC_SPARC_SIZE64,
- BFD_RELOC_SPARC_WDISP10,
-
-/* SPARC little endian relocation */
- BFD_RELOC_SPARC_REV32,
-
-/* SPARC TLS relocations */
- BFD_RELOC_SPARC_TLS_GD_HI22,
- BFD_RELOC_SPARC_TLS_GD_LO10,
- BFD_RELOC_SPARC_TLS_GD_ADD,
- BFD_RELOC_SPARC_TLS_GD_CALL,
- BFD_RELOC_SPARC_TLS_LDM_HI22,
- BFD_RELOC_SPARC_TLS_LDM_LO10,
- BFD_RELOC_SPARC_TLS_LDM_ADD,
- BFD_RELOC_SPARC_TLS_LDM_CALL,
- BFD_RELOC_SPARC_TLS_LDO_HIX22,
- BFD_RELOC_SPARC_TLS_LDO_LOX10,
- BFD_RELOC_SPARC_TLS_LDO_ADD,
- BFD_RELOC_SPARC_TLS_IE_HI22,
- BFD_RELOC_SPARC_TLS_IE_LO10,
- BFD_RELOC_SPARC_TLS_IE_LD,
- BFD_RELOC_SPARC_TLS_IE_LDX,
- BFD_RELOC_SPARC_TLS_IE_ADD,
- BFD_RELOC_SPARC_TLS_LE_HIX22,
- BFD_RELOC_SPARC_TLS_LE_LOX10,
- BFD_RELOC_SPARC_TLS_DTPMOD32,
- BFD_RELOC_SPARC_TLS_DTPMOD64,
- BFD_RELOC_SPARC_TLS_DTPOFF32,
- BFD_RELOC_SPARC_TLS_DTPOFF64,
- BFD_RELOC_SPARC_TLS_TPOFF32,
- BFD_RELOC_SPARC_TLS_TPOFF64,
-
-/* SPU Relocations. */
- BFD_RELOC_SPU_IMM7,
- BFD_RELOC_SPU_IMM8,
- BFD_RELOC_SPU_IMM10,
- BFD_RELOC_SPU_IMM10W,
- BFD_RELOC_SPU_IMM16,
- BFD_RELOC_SPU_IMM16W,
- BFD_RELOC_SPU_IMM18,
- BFD_RELOC_SPU_PCREL9a,
- BFD_RELOC_SPU_PCREL9b,
- BFD_RELOC_SPU_PCREL16,
- BFD_RELOC_SPU_LO16,
- BFD_RELOC_SPU_HI16,
- BFD_RELOC_SPU_PPU32,
- BFD_RELOC_SPU_PPU64,
- BFD_RELOC_SPU_ADD_PIC,
-
-/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
-"addend" in some special way.
-For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
-writing; when reading, it will be the absolute section symbol. The
-addend is the displacement in bytes of the "lda" instruction from
-the "ldah" instruction (which is at the address of this reloc). */
- BFD_RELOC_ALPHA_GPDISP_HI16,
-
-/* For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
-with GPDISP_HI16 relocs. The addend is ignored when writing the
-relocations out, and is filled in with the file's GP value on
-reading, for convenience. */
- BFD_RELOC_ALPHA_GPDISP_LO16,
-
-/* The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
-relocation except that there is no accompanying GPDISP_LO16
-relocation. */
- BFD_RELOC_ALPHA_GPDISP,
-
-/* The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
-the assembler turns it into a LDQ instruction to load the address of
-the symbol, and then fills in a register in the real instruction.
-
-The LITERAL reloc, at the LDQ instruction, refers to the .lita
-section symbol. The addend is ignored when writing, but is filled
-in with the file's GP value on reading, for convenience, as with the
-GPDISP_LO16 reloc.
-
-The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16.
-It should refer to the symbol to be referenced, as with 16_GOTOFF,
-but it generates output not based on the position within the .got
-section, but relative to the GP value chosen for the file during the
-final link stage.
-
-The LITUSE reloc, on the instruction using the loaded address, gives
-information to the linker that it might be able to use to optimize
-away some literal section references. The symbol is ignored (read
-as the absolute section symbol), and the "addend" indicates the type
-of instruction using the register:
-1 - "memory" fmt insn
-2 - byte-manipulation (byte offset reg)
-3 - jsr (target of branch) */
- BFD_RELOC_ALPHA_LITERAL,
- BFD_RELOC_ALPHA_ELF_LITERAL,
- BFD_RELOC_ALPHA_LITUSE,
-
-/* The HINT relocation indicates a value that should be filled into the
-"hint" field of a jmp/jsr/ret instruction, for possible branch-
-prediction logic which may be provided on some processors. */
- BFD_RELOC_ALPHA_HINT,
-
-/* The LINKAGE relocation outputs a linkage pair in the object file,
-which is filled by the linker. */
- BFD_RELOC_ALPHA_LINKAGE,
-
-/* The CODEADDR relocation outputs a STO_CA in the object file,
-which is filled by the linker. */
- BFD_RELOC_ALPHA_CODEADDR,
-
-/* The GPREL_HI/LO relocations together form a 32-bit offset from the
-GP register. */
- BFD_RELOC_ALPHA_GPREL_HI16,
- BFD_RELOC_ALPHA_GPREL_LO16,
-
-/* Like BFD_RELOC_23_PCREL_S2, except that the source and target must
-share a common GP, and the target address is adjusted for
-STO_ALPHA_STD_GPLOAD. */
- BFD_RELOC_ALPHA_BRSGP,
-
-/* The NOP relocation outputs a NOP if the longword displacement
-between two procedure entry points is < 2^21. */
- BFD_RELOC_ALPHA_NOP,
-
-/* The BSR relocation outputs a BSR if the longword displacement
-between two procedure entry points is < 2^21. */
- BFD_RELOC_ALPHA_BSR,
-
-/* The LDA relocation outputs a LDA if the longword displacement
-between two procedure entry points is < 2^16. */
- BFD_RELOC_ALPHA_LDA,
-
-/* The BOH relocation outputs a BSR if the longword displacement
-between two procedure entry points is < 2^21, or else a hint. */
- BFD_RELOC_ALPHA_BOH,
-
-/* Alpha thread-local storage relocations. */
- BFD_RELOC_ALPHA_TLSGD,
- BFD_RELOC_ALPHA_TLSLDM,
- BFD_RELOC_ALPHA_DTPMOD64,
- BFD_RELOC_ALPHA_GOTDTPREL16,
- BFD_RELOC_ALPHA_DTPREL64,
- BFD_RELOC_ALPHA_DTPREL_HI16,
- BFD_RELOC_ALPHA_DTPREL_LO16,
- BFD_RELOC_ALPHA_DTPREL16,
- BFD_RELOC_ALPHA_GOTTPREL16,
- BFD_RELOC_ALPHA_TPREL64,
- BFD_RELOC_ALPHA_TPREL_HI16,
- BFD_RELOC_ALPHA_TPREL_LO16,
- BFD_RELOC_ALPHA_TPREL16,
-
-/* The MIPS jump instruction. */
- BFD_RELOC_MIPS_JMP,
- BFD_RELOC_MICROMIPS_JMP,
-
-/* The MIPS16 jump instruction. */
- BFD_RELOC_MIPS16_JMP,
-
-/* MIPS16 GP relative reloc. */
- BFD_RELOC_MIPS16_GPREL,
-
-/* High 16 bits of 32-bit value; simple reloc. */
- BFD_RELOC_HI16,
-
-/* High 16 bits of 32-bit value but the low 16 bits will be sign
-extended and added to form the final result. If the low 16
-bits form a negative number, we need to add one to the high value
-to compensate for the borrow when the low bits are added. */
- BFD_RELOC_HI16_S,
-
-/* Low 16 bits. */
- BFD_RELOC_LO16,
-
-/* High 16 bits of 32-bit pc-relative value */
- BFD_RELOC_HI16_PCREL,
-
-/* High 16 bits of 32-bit pc-relative value, adjusted */
- BFD_RELOC_HI16_S_PCREL,
-
-/* Low 16 bits of pc-relative value */
- BFD_RELOC_LO16_PCREL,
-
-/* Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of
-16-bit immediate fields */
- BFD_RELOC_MIPS16_GOT16,
- BFD_RELOC_MIPS16_CALL16,
-
-/* MIPS16 high 16 bits of 32-bit value. */
- BFD_RELOC_MIPS16_HI16,
-
-/* MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign
-extended and added to form the final result. If the low 16
-bits form a negative number, we need to add one to the high value
-to compensate for the borrow when the low bits are added. */
- BFD_RELOC_MIPS16_HI16_S,
-
-/* MIPS16 low 16 bits. */
- BFD_RELOC_MIPS16_LO16,
-
-/* MIPS16 TLS relocations */
- BFD_RELOC_MIPS16_TLS_GD,
- BFD_RELOC_MIPS16_TLS_LDM,
- BFD_RELOC_MIPS16_TLS_DTPREL_HI16,
- BFD_RELOC_MIPS16_TLS_DTPREL_LO16,
- BFD_RELOC_MIPS16_TLS_GOTTPREL,
- BFD_RELOC_MIPS16_TLS_TPREL_HI16,
- BFD_RELOC_MIPS16_TLS_TPREL_LO16,
-
-/* Relocation against a MIPS literal section. */
- BFD_RELOC_MIPS_LITERAL,
- BFD_RELOC_MICROMIPS_LITERAL,
-
-/* microMIPS PC-relative relocations. */
- BFD_RELOC_MICROMIPS_7_PCREL_S1,
- BFD_RELOC_MICROMIPS_10_PCREL_S1,
- BFD_RELOC_MICROMIPS_16_PCREL_S1,
-
-/* MIPS16 PC-relative relocation. */
- BFD_RELOC_MIPS16_16_PCREL_S1,
-
-/* MIPS PC-relative relocations. */
- BFD_RELOC_MIPS_21_PCREL_S2,
- BFD_RELOC_MIPS_26_PCREL_S2,
- BFD_RELOC_MIPS_18_PCREL_S3,
- BFD_RELOC_MIPS_19_PCREL_S2,
-
-/* microMIPS versions of generic BFD relocs. */
- BFD_RELOC_MICROMIPS_GPREL16,
- BFD_RELOC_MICROMIPS_HI16,
- BFD_RELOC_MICROMIPS_HI16_S,
- BFD_RELOC_MICROMIPS_LO16,
-
-/* MIPS ELF relocations. */
- BFD_RELOC_MIPS_GOT16,
- BFD_RELOC_MICROMIPS_GOT16,
- BFD_RELOC_MIPS_CALL16,
- BFD_RELOC_MICROMIPS_CALL16,
- BFD_RELOC_MIPS_GOT_HI16,
- BFD_RELOC_MICROMIPS_GOT_HI16,
- BFD_RELOC_MIPS_GOT_LO16,
- BFD_RELOC_MICROMIPS_GOT_LO16,
- BFD_RELOC_MIPS_CALL_HI16,
- BFD_RELOC_MICROMIPS_CALL_HI16,
- BFD_RELOC_MIPS_CALL_LO16,
- BFD_RELOC_MICROMIPS_CALL_LO16,
- BFD_RELOC_MIPS_SUB,
- BFD_RELOC_MICROMIPS_SUB,
- BFD_RELOC_MIPS_GOT_PAGE,
- BFD_RELOC_MICROMIPS_GOT_PAGE,
- BFD_RELOC_MIPS_GOT_OFST,
- BFD_RELOC_MICROMIPS_GOT_OFST,
- BFD_RELOC_MIPS_GOT_DISP,
- BFD_RELOC_MICROMIPS_GOT_DISP,
- BFD_RELOC_MIPS_SHIFT5,
- BFD_RELOC_MIPS_SHIFT6,
- BFD_RELOC_MIPS_INSERT_A,
- BFD_RELOC_MIPS_INSERT_B,
- BFD_RELOC_MIPS_DELETE,
- BFD_RELOC_MIPS_HIGHEST,
- BFD_RELOC_MICROMIPS_HIGHEST,
- BFD_RELOC_MIPS_HIGHER,
- BFD_RELOC_MICROMIPS_HIGHER,
- BFD_RELOC_MIPS_SCN_DISP,
- BFD_RELOC_MICROMIPS_SCN_DISP,
- BFD_RELOC_MIPS_REL16,
- BFD_RELOC_MIPS_RELGOT,
- BFD_RELOC_MIPS_JALR,
- BFD_RELOC_MICROMIPS_JALR,
- BFD_RELOC_MIPS_TLS_DTPMOD32,
- BFD_RELOC_MIPS_TLS_DTPREL32,
- BFD_RELOC_MIPS_TLS_DTPMOD64,
- BFD_RELOC_MIPS_TLS_DTPREL64,
- BFD_RELOC_MIPS_TLS_GD,
- BFD_RELOC_MICROMIPS_TLS_GD,
- BFD_RELOC_MIPS_TLS_LDM,
- BFD_RELOC_MICROMIPS_TLS_LDM,
- BFD_RELOC_MIPS_TLS_DTPREL_HI16,
- BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16,
- BFD_RELOC_MIPS_TLS_DTPREL_LO16,
- BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16,
- BFD_RELOC_MIPS_TLS_GOTTPREL,
- BFD_RELOC_MICROMIPS_TLS_GOTTPREL,
- BFD_RELOC_MIPS_TLS_TPREL32,
- BFD_RELOC_MIPS_TLS_TPREL64,
- BFD_RELOC_MIPS_TLS_TPREL_HI16,
- BFD_RELOC_MICROMIPS_TLS_TPREL_HI16,
- BFD_RELOC_MIPS_TLS_TPREL_LO16,
- BFD_RELOC_MICROMIPS_TLS_TPREL_LO16,
- BFD_RELOC_MIPS_EH,
-
-
-/* MIPS ELF relocations (VxWorks and PLT extensions). */
- BFD_RELOC_MIPS_COPY,
- BFD_RELOC_MIPS_JUMP_SLOT,
-
-
-/* Moxie ELF relocations. */
- BFD_RELOC_MOXIE_10_PCREL,
-
-
-/* FT32 ELF relocations. */
- BFD_RELOC_FT32_10,
- BFD_RELOC_FT32_20,
- BFD_RELOC_FT32_17,
- BFD_RELOC_FT32_18,
- BFD_RELOC_FT32_RELAX,
- BFD_RELOC_FT32_SC0,
- BFD_RELOC_FT32_SC1,
- BFD_RELOC_FT32_15,
- BFD_RELOC_FT32_DIFF32,
-
-
-/* Fujitsu Frv Relocations. */
- BFD_RELOC_FRV_LABEL16,
- BFD_RELOC_FRV_LABEL24,
- BFD_RELOC_FRV_LO16,
- BFD_RELOC_FRV_HI16,
- BFD_RELOC_FRV_GPREL12,
- BFD_RELOC_FRV_GPRELU12,
- BFD_RELOC_FRV_GPREL32,
- BFD_RELOC_FRV_GPRELHI,
- BFD_RELOC_FRV_GPRELLO,
- BFD_RELOC_FRV_GOT12,
- BFD_RELOC_FRV_GOTHI,
- BFD_RELOC_FRV_GOTLO,
- BFD_RELOC_FRV_FUNCDESC,
- BFD_RELOC_FRV_FUNCDESC_GOT12,
- BFD_RELOC_FRV_FUNCDESC_GOTHI,
- BFD_RELOC_FRV_FUNCDESC_GOTLO,
- BFD_RELOC_FRV_FUNCDESC_VALUE,
- BFD_RELOC_FRV_FUNCDESC_GOTOFF12,
- BFD_RELOC_FRV_FUNCDESC_GOTOFFHI,
- BFD_RELOC_FRV_FUNCDESC_GOTOFFLO,
- BFD_RELOC_FRV_GOTOFF12,
- BFD_RELOC_FRV_GOTOFFHI,
- BFD_RELOC_FRV_GOTOFFLO,
- BFD_RELOC_FRV_GETTLSOFF,
- BFD_RELOC_FRV_TLSDESC_VALUE,
- BFD_RELOC_FRV_GOTTLSDESC12,
- BFD_RELOC_FRV_GOTTLSDESCHI,
- BFD_RELOC_FRV_GOTTLSDESCLO,
- BFD_RELOC_FRV_TLSMOFF12,
- BFD_RELOC_FRV_TLSMOFFHI,
- BFD_RELOC_FRV_TLSMOFFLO,
- BFD_RELOC_FRV_GOTTLSOFF12,
- BFD_RELOC_FRV_GOTTLSOFFHI,
- BFD_RELOC_FRV_GOTTLSOFFLO,
- BFD_RELOC_FRV_TLSOFF,
- BFD_RELOC_FRV_TLSDESC_RELAX,
- BFD_RELOC_FRV_GETTLSOFF_RELAX,
- BFD_RELOC_FRV_TLSOFF_RELAX,
- BFD_RELOC_FRV_TLSMOFF,
-
-
-/* This is a 24bit GOT-relative reloc for the mn10300. */
- BFD_RELOC_MN10300_GOTOFF24,
-
-/* This is a 32bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction. */
- BFD_RELOC_MN10300_GOT32,
-
-/* This is a 24bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction. */
- BFD_RELOC_MN10300_GOT24,
-
-/* This is a 16bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction. */
- BFD_RELOC_MN10300_GOT16,
-
-/* Copy symbol at runtime. */
- BFD_RELOC_MN10300_COPY,
-
-/* Create GOT entry. */
- BFD_RELOC_MN10300_GLOB_DAT,
-
-/* Create PLT entry. */
- BFD_RELOC_MN10300_JMP_SLOT,
-
-/* Adjust by program base. */
- BFD_RELOC_MN10300_RELATIVE,
-
-/* Together with another reloc targeted at the same location,
-allows for a value that is the difference of two symbols
-in the same section. */
- BFD_RELOC_MN10300_SYM_DIFF,
-
-/* The addend of this reloc is an alignment power that must
-be honoured at the offset's location, regardless of linker
-relaxation. */
- BFD_RELOC_MN10300_ALIGN,
-
-/* Various TLS-related relocations. */
- BFD_RELOC_MN10300_TLS_GD,
- BFD_RELOC_MN10300_TLS_LD,
- BFD_RELOC_MN10300_TLS_LDO,
- BFD_RELOC_MN10300_TLS_GOTIE,
- BFD_RELOC_MN10300_TLS_IE,
- BFD_RELOC_MN10300_TLS_LE,
- BFD_RELOC_MN10300_TLS_DTPMOD,
- BFD_RELOC_MN10300_TLS_DTPOFF,
- BFD_RELOC_MN10300_TLS_TPOFF,
-
-/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction. */
- BFD_RELOC_MN10300_32_PCREL,
-
-/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction. */
- BFD_RELOC_MN10300_16_PCREL,
-
-
-/* i386/elf relocations */
- BFD_RELOC_386_GOT32,
- BFD_RELOC_386_PLT32,
- BFD_RELOC_386_COPY,
- BFD_RELOC_386_GLOB_DAT,
- BFD_RELOC_386_JUMP_SLOT,
- BFD_RELOC_386_RELATIVE,
- BFD_RELOC_386_GOTOFF,
- BFD_RELOC_386_GOTPC,
- BFD_RELOC_386_TLS_TPOFF,
- BFD_RELOC_386_TLS_IE,
- BFD_RELOC_386_TLS_GOTIE,
- BFD_RELOC_386_TLS_LE,
- BFD_RELOC_386_TLS_GD,
- BFD_RELOC_386_TLS_LDM,
- BFD_RELOC_386_TLS_LDO_32,
- BFD_RELOC_386_TLS_IE_32,
- BFD_RELOC_386_TLS_LE_32,
- BFD_RELOC_386_TLS_DTPMOD32,
- BFD_RELOC_386_TLS_DTPOFF32,
- BFD_RELOC_386_TLS_TPOFF32,
- BFD_RELOC_386_TLS_GOTDESC,
- BFD_RELOC_386_TLS_DESC_CALL,
- BFD_RELOC_386_TLS_DESC,
- BFD_RELOC_386_IRELATIVE,
- BFD_RELOC_386_GOT32X,
-
-/* x86-64/elf relocations */
- BFD_RELOC_X86_64_GOT32,
- BFD_RELOC_X86_64_PLT32,
- BFD_RELOC_X86_64_COPY,
- BFD_RELOC_X86_64_GLOB_DAT,
- BFD_RELOC_X86_64_JUMP_SLOT,
- BFD_RELOC_X86_64_RELATIVE,
- BFD_RELOC_X86_64_GOTPCREL,
- BFD_RELOC_X86_64_32S,
- BFD_RELOC_X86_64_DTPMOD64,
- BFD_RELOC_X86_64_DTPOFF64,
- BFD_RELOC_X86_64_TPOFF64,
- BFD_RELOC_X86_64_TLSGD,
- BFD_RELOC_X86_64_TLSLD,
- BFD_RELOC_X86_64_DTPOFF32,
- BFD_RELOC_X86_64_GOTTPOFF,
- BFD_RELOC_X86_64_TPOFF32,
- BFD_RELOC_X86_64_GOTOFF64,
- BFD_RELOC_X86_64_GOTPC32,
- BFD_RELOC_X86_64_GOT64,
- BFD_RELOC_X86_64_GOTPCREL64,
- BFD_RELOC_X86_64_GOTPC64,
- BFD_RELOC_X86_64_GOTPLT64,
- BFD_RELOC_X86_64_PLTOFF64,
- BFD_RELOC_X86_64_GOTPC32_TLSDESC,
- BFD_RELOC_X86_64_TLSDESC_CALL,
- BFD_RELOC_X86_64_TLSDESC,
- BFD_RELOC_X86_64_IRELATIVE,
- BFD_RELOC_X86_64_PC32_BND,
- BFD_RELOC_X86_64_PLT32_BND,
- BFD_RELOC_X86_64_GOTPCRELX,
- BFD_RELOC_X86_64_REX_GOTPCRELX,
-
-/* ns32k relocations */
- BFD_RELOC_NS32K_IMM_8,
- BFD_RELOC_NS32K_IMM_16,
- BFD_RELOC_NS32K_IMM_32,
- BFD_RELOC_NS32K_IMM_8_PCREL,
- BFD_RELOC_NS32K_IMM_16_PCREL,
- BFD_RELOC_NS32K_IMM_32_PCREL,
- BFD_RELOC_NS32K_DISP_8,
- BFD_RELOC_NS32K_DISP_16,
- BFD_RELOC_NS32K_DISP_32,
- BFD_RELOC_NS32K_DISP_8_PCREL,
- BFD_RELOC_NS32K_DISP_16_PCREL,
- BFD_RELOC_NS32K_DISP_32_PCREL,
-
-/* PDP11 relocations */
- BFD_RELOC_PDP11_DISP_8_PCREL,
- BFD_RELOC_PDP11_DISP_6_PCREL,
-
-/* Picojava relocs. Not all of these appear in object files. */
- BFD_RELOC_PJ_CODE_HI16,
- BFD_RELOC_PJ_CODE_LO16,
- BFD_RELOC_PJ_CODE_DIR16,
- BFD_RELOC_PJ_CODE_DIR32,
- BFD_RELOC_PJ_CODE_REL16,
- BFD_RELOC_PJ_CODE_REL32,
-
-/* Power(rs6000) and PowerPC relocations. */
- BFD_RELOC_PPC_B26,
- BFD_RELOC_PPC_BA26,
- BFD_RELOC_PPC_TOC16,
- BFD_RELOC_PPC_B16,
- BFD_RELOC_PPC_B16_BRTAKEN,
- BFD_RELOC_PPC_B16_BRNTAKEN,
- BFD_RELOC_PPC_BA16,
- BFD_RELOC_PPC_BA16_BRTAKEN,
- BFD_RELOC_PPC_BA16_BRNTAKEN,
- BFD_RELOC_PPC_COPY,
- BFD_RELOC_PPC_GLOB_DAT,
- BFD_RELOC_PPC_JMP_SLOT,
- BFD_RELOC_PPC_RELATIVE,
- BFD_RELOC_PPC_LOCAL24PC,
- BFD_RELOC_PPC_EMB_NADDR32,
- BFD_RELOC_PPC_EMB_NADDR16,
- BFD_RELOC_PPC_EMB_NADDR16_LO,
- BFD_RELOC_PPC_EMB_NADDR16_HI,
- BFD_RELOC_PPC_EMB_NADDR16_HA,
- BFD_RELOC_PPC_EMB_SDAI16,
- BFD_RELOC_PPC_EMB_SDA2I16,
- BFD_RELOC_PPC_EMB_SDA2REL,
- BFD_RELOC_PPC_EMB_SDA21,
- BFD_RELOC_PPC_EMB_MRKREF,
- BFD_RELOC_PPC_EMB_RELSEC16,
- BFD_RELOC_PPC_EMB_RELST_LO,
- BFD_RELOC_PPC_EMB_RELST_HI,
- BFD_RELOC_PPC_EMB_RELST_HA,
- BFD_RELOC_PPC_EMB_BIT_FLD,
- BFD_RELOC_PPC_EMB_RELSDA,
- BFD_RELOC_PPC_VLE_REL8,
- BFD_RELOC_PPC_VLE_REL15,
- BFD_RELOC_PPC_VLE_REL24,
- BFD_RELOC_PPC_VLE_LO16A,
- BFD_RELOC_PPC_VLE_LO16D,
- BFD_RELOC_PPC_VLE_HI16A,
- BFD_RELOC_PPC_VLE_HI16D,
- BFD_RELOC_PPC_VLE_HA16A,
- BFD_RELOC_PPC_VLE_HA16D,
- BFD_RELOC_PPC_VLE_SDA21,
- BFD_RELOC_PPC_VLE_SDA21_LO,
- BFD_RELOC_PPC_VLE_SDAREL_LO16A,
- BFD_RELOC_PPC_VLE_SDAREL_LO16D,
- BFD_RELOC_PPC_VLE_SDAREL_HI16A,
- BFD_RELOC_PPC_VLE_SDAREL_HI16D,
- BFD_RELOC_PPC_VLE_SDAREL_HA16A,
- BFD_RELOC_PPC_VLE_SDAREL_HA16D,
- BFD_RELOC_PPC_16DX_HA,
- BFD_RELOC_PPC_REL16DX_HA,
- BFD_RELOC_PPC64_HIGHER,
- BFD_RELOC_PPC64_HIGHER_S,
- BFD_RELOC_PPC64_HIGHEST,
- BFD_RELOC_PPC64_HIGHEST_S,
- BFD_RELOC_PPC64_TOC16_LO,
- BFD_RELOC_PPC64_TOC16_HI,
- BFD_RELOC_PPC64_TOC16_HA,
- BFD_RELOC_PPC64_TOC,
- BFD_RELOC_PPC64_PLTGOT16,
- BFD_RELOC_PPC64_PLTGOT16_LO,
- BFD_RELOC_PPC64_PLTGOT16_HI,
- BFD_RELOC_PPC64_PLTGOT16_HA,
- BFD_RELOC_PPC64_ADDR16_DS,
- BFD_RELOC_PPC64_ADDR16_LO_DS,
- BFD_RELOC_PPC64_GOT16_DS,
- BFD_RELOC_PPC64_GOT16_LO_DS,
- BFD_RELOC_PPC64_PLT16_LO_DS,
- BFD_RELOC_PPC64_SECTOFF_DS,
- BFD_RELOC_PPC64_SECTOFF_LO_DS,
- BFD_RELOC_PPC64_TOC16_DS,
- BFD_RELOC_PPC64_TOC16_LO_DS,
- BFD_RELOC_PPC64_PLTGOT16_DS,
- BFD_RELOC_PPC64_PLTGOT16_LO_DS,
- BFD_RELOC_PPC64_ADDR16_HIGH,
- BFD_RELOC_PPC64_ADDR16_HIGHA,
- BFD_RELOC_PPC64_REL16_HIGH,
- BFD_RELOC_PPC64_REL16_HIGHA,
- BFD_RELOC_PPC64_REL16_HIGHER,
- BFD_RELOC_PPC64_REL16_HIGHERA,
- BFD_RELOC_PPC64_REL16_HIGHEST,
- BFD_RELOC_PPC64_REL16_HIGHESTA,
- BFD_RELOC_PPC64_ADDR64_LOCAL,
- BFD_RELOC_PPC64_ENTRY,
- BFD_RELOC_PPC64_REL24_NOTOC,
-
-/* PowerPC and PowerPC64 thread-local storage relocations. */
- BFD_RELOC_PPC_TLS,
- BFD_RELOC_PPC_TLSGD,
- BFD_RELOC_PPC_TLSLD,
- BFD_RELOC_PPC_DTPMOD,
- BFD_RELOC_PPC_TPREL16,
- BFD_RELOC_PPC_TPREL16_LO,
- BFD_RELOC_PPC_TPREL16_HI,
- BFD_RELOC_PPC_TPREL16_HA,
- BFD_RELOC_PPC_TPREL,
- BFD_RELOC_PPC_DTPREL16,
- BFD_RELOC_PPC_DTPREL16_LO,
- BFD_RELOC_PPC_DTPREL16_HI,
- BFD_RELOC_PPC_DTPREL16_HA,
- BFD_RELOC_PPC_DTPREL,
- BFD_RELOC_PPC_GOT_TLSGD16,
- BFD_RELOC_PPC_GOT_TLSGD16_LO,
- BFD_RELOC_PPC_GOT_TLSGD16_HI,
- BFD_RELOC_PPC_GOT_TLSGD16_HA,
- BFD_RELOC_PPC_GOT_TLSLD16,
- BFD_RELOC_PPC_GOT_TLSLD16_LO,
- BFD_RELOC_PPC_GOT_TLSLD16_HI,
- BFD_RELOC_PPC_GOT_TLSLD16_HA,
- BFD_RELOC_PPC_GOT_TPREL16,
- BFD_RELOC_PPC_GOT_TPREL16_LO,
- BFD_RELOC_PPC_GOT_TPREL16_HI,
- BFD_RELOC_PPC_GOT_TPREL16_HA,
- BFD_RELOC_PPC_GOT_DTPREL16,
- BFD_RELOC_PPC_GOT_DTPREL16_LO,
- BFD_RELOC_PPC_GOT_DTPREL16_HI,
- BFD_RELOC_PPC_GOT_DTPREL16_HA,
- BFD_RELOC_PPC64_TPREL16_DS,
- BFD_RELOC_PPC64_TPREL16_LO_DS,
- BFD_RELOC_PPC64_TPREL16_HIGHER,
- BFD_RELOC_PPC64_TPREL16_HIGHERA,
- BFD_RELOC_PPC64_TPREL16_HIGHEST,
- BFD_RELOC_PPC64_TPREL16_HIGHESTA,
- BFD_RELOC_PPC64_DTPREL16_DS,
- BFD_RELOC_PPC64_DTPREL16_LO_DS,
- BFD_RELOC_PPC64_DTPREL16_HIGHER,
- BFD_RELOC_PPC64_DTPREL16_HIGHERA,
- BFD_RELOC_PPC64_DTPREL16_HIGHEST,
- BFD_RELOC_PPC64_DTPREL16_HIGHESTA,
- BFD_RELOC_PPC64_TPREL16_HIGH,
- BFD_RELOC_PPC64_TPREL16_HIGHA,
- BFD_RELOC_PPC64_DTPREL16_HIGH,
- BFD_RELOC_PPC64_DTPREL16_HIGHA,
-
-/* IBM 370/390 relocations */
- BFD_RELOC_I370_D12,
-
-/* The type of reloc used to build a constructor table - at the moment
-probably a 32 bit wide absolute relocation, but the target can choose.
-It generally does map to one of the other relocation types. */
- BFD_RELOC_CTOR,
-
-/* ARM 26 bit pc-relative branch. The lowest two bits must be zero and are
-not stored in the instruction. */
- BFD_RELOC_ARM_PCREL_BRANCH,
-
-/* ARM 26 bit pc-relative branch. The lowest bit must be zero and is
-not stored in the instruction. The 2nd lowest bit comes from a 1 bit
-field in the instruction. */
- BFD_RELOC_ARM_PCREL_BLX,
-
-/* Thumb 22 bit pc-relative branch. The lowest bit must be zero and is
-not stored in the instruction. The 2nd lowest bit comes from a 1 bit
-field in the instruction. */
- BFD_RELOC_THUMB_PCREL_BLX,
-
-/* ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction. */
- BFD_RELOC_ARM_PCREL_CALL,
-
-/* ARM 26-bit pc-relative branch for B or conditional BL instruction. */
- BFD_RELOC_ARM_PCREL_JUMP,
-
-/* Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches.
-The lowest bit must be zero and is not stored in the instruction.
-Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an
-"nn" one smaller in all cases. Note further that BRANCH23
-corresponds to R_ARM_THM_CALL. */
- BFD_RELOC_THUMB_PCREL_BRANCH7,
- BFD_RELOC_THUMB_PCREL_BRANCH9,
- BFD_RELOC_THUMB_PCREL_BRANCH12,
- BFD_RELOC_THUMB_PCREL_BRANCH20,
- BFD_RELOC_THUMB_PCREL_BRANCH23,
- BFD_RELOC_THUMB_PCREL_BRANCH25,
-
-/* 12-bit immediate offset, used in ARM-format ldr and str instructions. */
- BFD_RELOC_ARM_OFFSET_IMM,
-
-/* 5-bit immediate offset, used in Thumb-format ldr and str instructions. */
- BFD_RELOC_ARM_THUMB_OFFSET,
-
-/* Pc-relative or absolute relocation depending on target. Used for
-entries in .init_array sections. */
- BFD_RELOC_ARM_TARGET1,
-
-/* Read-only segment base relative address. */
- BFD_RELOC_ARM_ROSEGREL32,
-
-/* Data segment base relative address. */
- BFD_RELOC_ARM_SBREL32,
-
-/* This reloc is used for references to RTTI data from exception handling
-tables. The actual definition depends on the target. It may be a
-pc-relative or some form of GOT-indirect relocation. */
- BFD_RELOC_ARM_TARGET2,
-
-/* 31-bit PC relative address. */
- BFD_RELOC_ARM_PREL31,
-
-/* Low and High halfword relocations for MOVW and MOVT instructions. */
- BFD_RELOC_ARM_MOVW,
- BFD_RELOC_ARM_MOVT,
- BFD_RELOC_ARM_MOVW_PCREL,
- BFD_RELOC_ARM_MOVT_PCREL,
- BFD_RELOC_ARM_THUMB_MOVW,
- BFD_RELOC_ARM_THUMB_MOVT,
- BFD_RELOC_ARM_THUMB_MOVW_PCREL,
- BFD_RELOC_ARM_THUMB_MOVT_PCREL,
-
-/* ARM FDPIC specific relocations. */
- BFD_RELOC_ARM_GOTFUNCDESC,
- BFD_RELOC_ARM_GOTOFFFUNCDESC,
- BFD_RELOC_ARM_FUNCDESC,
- BFD_RELOC_ARM_FUNCDESC_VALUE,
- BFD_RELOC_ARM_TLS_GD32_FDPIC,
- BFD_RELOC_ARM_TLS_LDM32_FDPIC,
- BFD_RELOC_ARM_TLS_IE32_FDPIC,
-
-/* Relocations for setting up GOTs and PLTs for shared libraries. */
- BFD_RELOC_ARM_JUMP_SLOT,
- BFD_RELOC_ARM_GLOB_DAT,
- BFD_RELOC_ARM_GOT32,
- BFD_RELOC_ARM_PLT32,
- BFD_RELOC_ARM_RELATIVE,
- BFD_RELOC_ARM_GOTOFF,
- BFD_RELOC_ARM_GOTPC,
- BFD_RELOC_ARM_GOT_PREL,
-
-/* ARM thread-local storage relocations. */
- BFD_RELOC_ARM_TLS_GD32,
- BFD_RELOC_ARM_TLS_LDO32,
- BFD_RELOC_ARM_TLS_LDM32,
- BFD_RELOC_ARM_TLS_DTPOFF32,
- BFD_RELOC_ARM_TLS_DTPMOD32,
- BFD_RELOC_ARM_TLS_TPOFF32,
- BFD_RELOC_ARM_TLS_IE32,
- BFD_RELOC_ARM_TLS_LE32,
- BFD_RELOC_ARM_TLS_GOTDESC,
- BFD_RELOC_ARM_TLS_CALL,
- BFD_RELOC_ARM_THM_TLS_CALL,
- BFD_RELOC_ARM_TLS_DESCSEQ,
- BFD_RELOC_ARM_THM_TLS_DESCSEQ,
- BFD_RELOC_ARM_TLS_DESC,
-
-/* ARM group relocations. */
- BFD_RELOC_ARM_ALU_PC_G0_NC,
- BFD_RELOC_ARM_ALU_PC_G0,
- BFD_RELOC_ARM_ALU_PC_G1_NC,
- BFD_RELOC_ARM_ALU_PC_G1,
- BFD_RELOC_ARM_ALU_PC_G2,
- BFD_RELOC_ARM_LDR_PC_G0,
- BFD_RELOC_ARM_LDR_PC_G1,
- BFD_RELOC_ARM_LDR_PC_G2,
- BFD_RELOC_ARM_LDRS_PC_G0,
- BFD_RELOC_ARM_LDRS_PC_G1,
- BFD_RELOC_ARM_LDRS_PC_G2,
- BFD_RELOC_ARM_LDC_PC_G0,
- BFD_RELOC_ARM_LDC_PC_G1,
- BFD_RELOC_ARM_LDC_PC_G2,
- BFD_RELOC_ARM_ALU_SB_G0_NC,
- BFD_RELOC_ARM_ALU_SB_G0,
- BFD_RELOC_ARM_ALU_SB_G1_NC,
- BFD_RELOC_ARM_ALU_SB_G1,
- BFD_RELOC_ARM_ALU_SB_G2,
- BFD_RELOC_ARM_LDR_SB_G0,
- BFD_RELOC_ARM_LDR_SB_G1,
- BFD_RELOC_ARM_LDR_SB_G2,
- BFD_RELOC_ARM_LDRS_SB_G0,
- BFD_RELOC_ARM_LDRS_SB_G1,
- BFD_RELOC_ARM_LDRS_SB_G2,
- BFD_RELOC_ARM_LDC_SB_G0,
- BFD_RELOC_ARM_LDC_SB_G1,
- BFD_RELOC_ARM_LDC_SB_G2,
-
-/* Annotation of BX instructions. */
- BFD_RELOC_ARM_V4BX,
-
-/* ARM support for STT_GNU_IFUNC. */
- BFD_RELOC_ARM_IRELATIVE,
-
-/* Thumb1 relocations to support execute-only code. */
- BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC,
- BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC,
- BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC,
- BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC,
-
-/* These relocs are only used within the ARM assembler. They are not
-(at present) written to any object files. */
- BFD_RELOC_ARM_IMMEDIATE,
- BFD_RELOC_ARM_ADRL_IMMEDIATE,
- BFD_RELOC_ARM_T32_IMMEDIATE,
- BFD_RELOC_ARM_T32_ADD_IMM,
- BFD_RELOC_ARM_T32_IMM12,
- BFD_RELOC_ARM_T32_ADD_PC12,
- BFD_RELOC_ARM_SHIFT_IMM,
- BFD_RELOC_ARM_SMC,
- BFD_RELOC_ARM_HVC,
- BFD_RELOC_ARM_SWI,
- BFD_RELOC_ARM_MULTI,
- BFD_RELOC_ARM_CP_OFF_IMM,
- BFD_RELOC_ARM_CP_OFF_IMM_S2,
- BFD_RELOC_ARM_T32_CP_OFF_IMM,
- BFD_RELOC_ARM_T32_CP_OFF_IMM_S2,
- BFD_RELOC_ARM_ADR_IMM,
- BFD_RELOC_ARM_LDR_IMM,
- BFD_RELOC_ARM_LITERAL,
- BFD_RELOC_ARM_IN_POOL,
- BFD_RELOC_ARM_OFFSET_IMM8,
- BFD_RELOC_ARM_T32_OFFSET_U8,
- BFD_RELOC_ARM_T32_OFFSET_IMM,
- BFD_RELOC_ARM_HWLITERAL,
- BFD_RELOC_ARM_THUMB_ADD,
- BFD_RELOC_ARM_THUMB_IMM,
- BFD_RELOC_ARM_THUMB_SHIFT,
-
-/* Renesas / SuperH SH relocs. Not all of these appear in object files. */
- BFD_RELOC_SH_PCDISP8BY2,
- BFD_RELOC_SH_PCDISP12BY2,
- BFD_RELOC_SH_IMM3,
- BFD_RELOC_SH_IMM3U,
- BFD_RELOC_SH_DISP12,
- BFD_RELOC_SH_DISP12BY2,
- BFD_RELOC_SH_DISP12BY4,
- BFD_RELOC_SH_DISP12BY8,
- BFD_RELOC_SH_DISP20,
- BFD_RELOC_SH_DISP20BY8,
- BFD_RELOC_SH_IMM4,
- BFD_RELOC_SH_IMM4BY2,
- BFD_RELOC_SH_IMM4BY4,
- BFD_RELOC_SH_IMM8,
- BFD_RELOC_SH_IMM8BY2,
- BFD_RELOC_SH_IMM8BY4,
- BFD_RELOC_SH_PCRELIMM8BY2,
- BFD_RELOC_SH_PCRELIMM8BY4,
- BFD_RELOC_SH_SWITCH16,
- BFD_RELOC_SH_SWITCH32,
- BFD_RELOC_SH_USES,
- BFD_RELOC_SH_COUNT,
- BFD_RELOC_SH_ALIGN,
- BFD_RELOC_SH_CODE,
- BFD_RELOC_SH_DATA,
- BFD_RELOC_SH_LABEL,
- BFD_RELOC_SH_LOOP_START,
- BFD_RELOC_SH_LOOP_END,
- BFD_RELOC_SH_COPY,
- BFD_RELOC_SH_GLOB_DAT,
- BFD_RELOC_SH_JMP_SLOT,
- BFD_RELOC_SH_RELATIVE,
- BFD_RELOC_SH_GOTPC,
- BFD_RELOC_SH_GOT_LOW16,
- BFD_RELOC_SH_GOT_MEDLOW16,
- BFD_RELOC_SH_GOT_MEDHI16,
- BFD_RELOC_SH_GOT_HI16,
- BFD_RELOC_SH_GOTPLT_LOW16,
- BFD_RELOC_SH_GOTPLT_MEDLOW16,
- BFD_RELOC_SH_GOTPLT_MEDHI16,
- BFD_RELOC_SH_GOTPLT_HI16,
- BFD_RELOC_SH_PLT_LOW16,
- BFD_RELOC_SH_PLT_MEDLOW16,
- BFD_RELOC_SH_PLT_MEDHI16,
- BFD_RELOC_SH_PLT_HI16,
- BFD_RELOC_SH_GOTOFF_LOW16,
- BFD_RELOC_SH_GOTOFF_MEDLOW16,
- BFD_RELOC_SH_GOTOFF_MEDHI16,
- BFD_RELOC_SH_GOTOFF_HI16,
- BFD_RELOC_SH_GOTPC_LOW16,
- BFD_RELOC_SH_GOTPC_MEDLOW16,
- BFD_RELOC_SH_GOTPC_MEDHI16,
- BFD_RELOC_SH_GOTPC_HI16,
- BFD_RELOC_SH_COPY64,
- BFD_RELOC_SH_GLOB_DAT64,
- BFD_RELOC_SH_JMP_SLOT64,
- BFD_RELOC_SH_RELATIVE64,
- BFD_RELOC_SH_GOT10BY4,
- BFD_RELOC_SH_GOT10BY8,
- BFD_RELOC_SH_GOTPLT10BY4,
- BFD_RELOC_SH_GOTPLT10BY8,
- BFD_RELOC_SH_GOTPLT32,
- BFD_RELOC_SH_SHMEDIA_CODE,
- BFD_RELOC_SH_IMMU5,
- BFD_RELOC_SH_IMMS6,
- BFD_RELOC_SH_IMMS6BY32,
- BFD_RELOC_SH_IMMU6,
- BFD_RELOC_SH_IMMS10,
- BFD_RELOC_SH_IMMS10BY2,
- BFD_RELOC_SH_IMMS10BY4,
- BFD_RELOC_SH_IMMS10BY8,
- BFD_RELOC_SH_IMMS16,
- BFD_RELOC_SH_IMMU16,
- BFD_RELOC_SH_IMM_LOW16,
- BFD_RELOC_SH_IMM_LOW16_PCREL,
- BFD_RELOC_SH_IMM_MEDLOW16,
- BFD_RELOC_SH_IMM_MEDLOW16_PCREL,
- BFD_RELOC_SH_IMM_MEDHI16,
- BFD_RELOC_SH_IMM_MEDHI16_PCREL,
- BFD_RELOC_SH_IMM_HI16,
- BFD_RELOC_SH_IMM_HI16_PCREL,
- BFD_RELOC_SH_PT_16,
- BFD_RELOC_SH_TLS_GD_32,
- BFD_RELOC_SH_TLS_LD_32,
- BFD_RELOC_SH_TLS_LDO_32,
- BFD_RELOC_SH_TLS_IE_32,
- BFD_RELOC_SH_TLS_LE_32,
- BFD_RELOC_SH_TLS_DTPMOD32,
- BFD_RELOC_SH_TLS_DTPOFF32,
- BFD_RELOC_SH_TLS_TPOFF32,
- BFD_RELOC_SH_GOT20,
- BFD_RELOC_SH_GOTOFF20,
- BFD_RELOC_SH_GOTFUNCDESC,
- BFD_RELOC_SH_GOTFUNCDESC20,
- BFD_RELOC_SH_GOTOFFFUNCDESC,
- BFD_RELOC_SH_GOTOFFFUNCDESC20,
- BFD_RELOC_SH_FUNCDESC,
-
-/* ARC relocs. */
- BFD_RELOC_ARC_NONE,
- BFD_RELOC_ARC_8,
- BFD_RELOC_ARC_16,
- BFD_RELOC_ARC_24,
- BFD_RELOC_ARC_32,
- BFD_RELOC_ARC_N8,
- BFD_RELOC_ARC_N16,
- BFD_RELOC_ARC_N24,
- BFD_RELOC_ARC_N32,
- BFD_RELOC_ARC_SDA,
- BFD_RELOC_ARC_SECTOFF,
- BFD_RELOC_ARC_S21H_PCREL,
- BFD_RELOC_ARC_S21W_PCREL,
- BFD_RELOC_ARC_S25H_PCREL,
- BFD_RELOC_ARC_S25W_PCREL,
- BFD_RELOC_ARC_SDA32,
- BFD_RELOC_ARC_SDA_LDST,
- BFD_RELOC_ARC_SDA_LDST1,
- BFD_RELOC_ARC_SDA_LDST2,
- BFD_RELOC_ARC_SDA16_LD,
- BFD_RELOC_ARC_SDA16_LD1,
- BFD_RELOC_ARC_SDA16_LD2,
- BFD_RELOC_ARC_S13_PCREL,
- BFD_RELOC_ARC_W,
- BFD_RELOC_ARC_32_ME,
- BFD_RELOC_ARC_32_ME_S,
- BFD_RELOC_ARC_N32_ME,
- BFD_RELOC_ARC_SECTOFF_ME,
- BFD_RELOC_ARC_SDA32_ME,
- BFD_RELOC_ARC_W_ME,
- BFD_RELOC_AC_SECTOFF_U8,
- BFD_RELOC_AC_SECTOFF_U8_1,
- BFD_RELOC_AC_SECTOFF_U8_2,
- BFD_RELOC_AC_SECTOFF_S9,
- BFD_RELOC_AC_SECTOFF_S9_1,
- BFD_RELOC_AC_SECTOFF_S9_2,
- BFD_RELOC_ARC_SECTOFF_ME_1,
- BFD_RELOC_ARC_SECTOFF_ME_2,
- BFD_RELOC_ARC_SECTOFF_1,
- BFD_RELOC_ARC_SECTOFF_2,
- BFD_RELOC_ARC_SDA_12,
- BFD_RELOC_ARC_SDA16_ST2,
- BFD_RELOC_ARC_32_PCREL,
- BFD_RELOC_ARC_PC32,
- BFD_RELOC_ARC_GOT32,
- BFD_RELOC_ARC_GOTPC32,
- BFD_RELOC_ARC_PLT32,
- BFD_RELOC_ARC_COPY,
- BFD_RELOC_ARC_GLOB_DAT,
- BFD_RELOC_ARC_JMP_SLOT,
- BFD_RELOC_ARC_RELATIVE,
- BFD_RELOC_ARC_GOTOFF,
- BFD_RELOC_ARC_GOTPC,
- BFD_RELOC_ARC_S21W_PCREL_PLT,
- BFD_RELOC_ARC_S25H_PCREL_PLT,
- BFD_RELOC_ARC_TLS_DTPMOD,
- BFD_RELOC_ARC_TLS_TPOFF,
- BFD_RELOC_ARC_TLS_GD_GOT,
- BFD_RELOC_ARC_TLS_GD_LD,
- BFD_RELOC_ARC_TLS_GD_CALL,
- BFD_RELOC_ARC_TLS_IE_GOT,
- BFD_RELOC_ARC_TLS_DTPOFF,
- BFD_RELOC_ARC_TLS_DTPOFF_S9,
- BFD_RELOC_ARC_TLS_LE_S9,
- BFD_RELOC_ARC_TLS_LE_32,
- BFD_RELOC_ARC_S25W_PCREL_PLT,
- BFD_RELOC_ARC_S21H_PCREL_PLT,
- BFD_RELOC_ARC_NPS_CMEM16,
- BFD_RELOC_ARC_JLI_SECTOFF,
-
-/* ADI Blackfin 16 bit immediate absolute reloc. */
- BFD_RELOC_BFIN_16_IMM,
-
-/* ADI Blackfin 16 bit immediate absolute reloc higher 16 bits. */
- BFD_RELOC_BFIN_16_HIGH,
-
-/* ADI Blackfin 'a' part of LSETUP. */
- BFD_RELOC_BFIN_4_PCREL,
-
-/* ADI Blackfin. */
- BFD_RELOC_BFIN_5_PCREL,
-
-/* ADI Blackfin 16 bit immediate absolute reloc lower 16 bits. */
- BFD_RELOC_BFIN_16_LOW,
-
-/* ADI Blackfin. */
- BFD_RELOC_BFIN_10_PCREL,
-
-/* ADI Blackfin 'b' part of LSETUP. */
- BFD_RELOC_BFIN_11_PCREL,
-
-/* ADI Blackfin. */
- BFD_RELOC_BFIN_12_PCREL_JUMP,
-
-/* ADI Blackfin Short jump, pcrel. */
- BFD_RELOC_BFIN_12_PCREL_JUMP_S,
-
-/* ADI Blackfin Call.x not implemented. */
- BFD_RELOC_BFIN_24_PCREL_CALL_X,
-
-/* ADI Blackfin Long Jump pcrel. */
- BFD_RELOC_BFIN_24_PCREL_JUMP_L,
-
-/* ADI Blackfin FD-PIC relocations. */
- BFD_RELOC_BFIN_GOT17M4,
- BFD_RELOC_BFIN_GOTHI,
- BFD_RELOC_BFIN_GOTLO,
- BFD_RELOC_BFIN_FUNCDESC,
- BFD_RELOC_BFIN_FUNCDESC_GOT17M4,
- BFD_RELOC_BFIN_FUNCDESC_GOTHI,
- BFD_RELOC_BFIN_FUNCDESC_GOTLO,
- BFD_RELOC_BFIN_FUNCDESC_VALUE,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO,
- BFD_RELOC_BFIN_GOTOFF17M4,
- BFD_RELOC_BFIN_GOTOFFHI,
- BFD_RELOC_BFIN_GOTOFFLO,
-
-/* ADI Blackfin GOT relocation. */
- BFD_RELOC_BFIN_GOT,
-
-/* ADI Blackfin PLTPC relocation. */
- BFD_RELOC_BFIN_PLTPC,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_PUSH,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_CONST,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_ADD,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_SUB,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_MULT,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_DIV,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_MOD,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LSHIFT,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_RSHIFT,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_AND,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_OR,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_XOR,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LAND,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LOR,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LEN,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_NEG,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_COMP,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_PAGE,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_HWPAGE,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_ADDR,
-
-/* Mitsubishi D10V relocs.
-This is a 10-bit reloc with the right 2 bits
-assumed to be 0. */
- BFD_RELOC_D10V_10_PCREL_R,
-
-/* Mitsubishi D10V relocs.
-This is a 10-bit reloc with the right 2 bits
-assumed to be 0. This is the same as the previous reloc
-except it is in the left container, i.e.,
-shifted left 15 bits. */
- BFD_RELOC_D10V_10_PCREL_L,
-
-/* This is an 18-bit reloc with the right 2 bits
-assumed to be 0. */
- BFD_RELOC_D10V_18,
-
-/* This is an 18-bit reloc with the right 2 bits
-assumed to be 0. */
- BFD_RELOC_D10V_18_PCREL,
-
-/* Mitsubishi D30V relocs.
-This is a 6-bit absolute reloc. */
- BFD_RELOC_D30V_6,
-
-/* This is a 6-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_9_PCREL,
-
-/* This is a 6-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
- BFD_RELOC_D30V_9_PCREL_R,
-
-/* This is a 12-bit absolute reloc with the
-right 3 bitsassumed to be 0. */
- BFD_RELOC_D30V_15,
-
-/* This is a 12-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_15_PCREL,
-
-/* This is a 12-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
- BFD_RELOC_D30V_15_PCREL_R,
-
-/* This is an 18-bit absolute reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_21,
-
-/* This is an 18-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_21_PCREL,
-
-/* This is an 18-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
- BFD_RELOC_D30V_21_PCREL_R,
-
-/* This is a 32-bit absolute reloc. */
- BFD_RELOC_D30V_32,
-
-/* This is a 32-bit pc-relative reloc. */
- BFD_RELOC_D30V_32_PCREL,
-
-/* DLX relocs */
- BFD_RELOC_DLX_HI16_S,
-
-/* DLX relocs */
- BFD_RELOC_DLX_LO16,
-
-/* DLX relocs */
- BFD_RELOC_DLX_JMP26,
-
-/* Renesas M16C/M32C Relocations. */
- BFD_RELOC_M32C_HI8,
- BFD_RELOC_M32C_RL_JUMP,
- BFD_RELOC_M32C_RL_1ADDR,
- BFD_RELOC_M32C_RL_2ADDR,
-
-/* Renesas M32R (formerly Mitsubishi M32R) relocs.
-This is a 24 bit absolute address. */
- BFD_RELOC_M32R_24,
-
-/* This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0. */
- BFD_RELOC_M32R_10_PCREL,
-
-/* This is an 18-bit reloc with the right 2 bits assumed to be 0. */
- BFD_RELOC_M32R_18_PCREL,
-
-/* This is a 26-bit reloc with the right 2 bits assumed to be 0. */
- BFD_RELOC_M32R_26_PCREL,
-
-/* This is a 16-bit reloc containing the high 16 bits of an address
-used when the lower 16 bits are treated as unsigned. */
- BFD_RELOC_M32R_HI16_ULO,
-
-/* This is a 16-bit reloc containing the high 16 bits of an address
-used when the lower 16 bits are treated as signed. */
- BFD_RELOC_M32R_HI16_SLO,
-
-/* This is a 16-bit reloc containing the lower 16 bits of an address. */
- BFD_RELOC_M32R_LO16,
-
-/* This is a 16-bit reloc containing the small data area offset for use in
-add3, load, and store instructions. */
- BFD_RELOC_M32R_SDA16,
-
-/* For PIC. */
- BFD_RELOC_M32R_GOT24,
- BFD_RELOC_M32R_26_PLTREL,
- BFD_RELOC_M32R_COPY,
- BFD_RELOC_M32R_GLOB_DAT,
- BFD_RELOC_M32R_JMP_SLOT,
- BFD_RELOC_M32R_RELATIVE,
- BFD_RELOC_M32R_GOTOFF,
- BFD_RELOC_M32R_GOTOFF_HI_ULO,
- BFD_RELOC_M32R_GOTOFF_HI_SLO,
- BFD_RELOC_M32R_GOTOFF_LO,
- BFD_RELOC_M32R_GOTPC24,
- BFD_RELOC_M32R_GOT16_HI_ULO,
- BFD_RELOC_M32R_GOT16_HI_SLO,
- BFD_RELOC_M32R_GOT16_LO,
- BFD_RELOC_M32R_GOTPC_HI_ULO,
- BFD_RELOC_M32R_GOTPC_HI_SLO,
- BFD_RELOC_M32R_GOTPC_LO,
-
-/* NDS32 relocs.
-This is a 20 bit absolute address. */
- BFD_RELOC_NDS32_20,
-
-/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_9_PCREL,
-
-/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_WORD_9_PCREL,
-
-/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_15_PCREL,
-
-/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_17_PCREL,
-
-/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_25_PCREL,
-
-/* This is a 20-bit reloc containing the high 20 bits of an address
-used with the lower 12 bits */
- BFD_RELOC_NDS32_HI20,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift right by 3. This is used with ldi,sdi... */
- BFD_RELOC_NDS32_LO12S3,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 2. This is used with lwi,swi... */
- BFD_RELOC_NDS32_LO12S2,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 1. This is used with lhi,shi... */
- BFD_RELOC_NDS32_LO12S1,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 0. This is used with lbisbi... */
- BFD_RELOC_NDS32_LO12S0,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 0. This is only used with branch relaxations */
- BFD_RELOC_NDS32_LO12S0_ORI,
-
-/* This is a 15-bit reloc containing the small data area 18-bit signed offset
-and shift left by 3 for use in ldi, sdi... */
- BFD_RELOC_NDS32_SDA15S3,
-
-/* This is a 15-bit reloc containing the small data area 17-bit signed offset
-and shift left by 2 for use in lwi, swi... */
- BFD_RELOC_NDS32_SDA15S2,
-
-/* This is a 15-bit reloc containing the small data area 16-bit signed offset
-and shift left by 1 for use in lhi, shi... */
- BFD_RELOC_NDS32_SDA15S1,
-
-/* This is a 15-bit reloc containing the small data area 15-bit signed offset
-and shift left by 0 for use in lbi, sbi... */
- BFD_RELOC_NDS32_SDA15S0,
-
-/* This is a 16-bit reloc containing the small data area 16-bit signed offset
-and shift left by 3 */
- BFD_RELOC_NDS32_SDA16S3,
-
-/* This is a 17-bit reloc containing the small data area 17-bit signed offset
-and shift left by 2 for use in lwi.gp, swi.gp... */
- BFD_RELOC_NDS32_SDA17S2,
-
-/* This is a 18-bit reloc containing the small data area 18-bit signed offset
-and shift left by 1 for use in lhi.gp, shi.gp... */
- BFD_RELOC_NDS32_SDA18S1,
-
-/* This is a 19-bit reloc containing the small data area 19-bit signed offset
-and shift left by 0 for use in lbi.gp, sbi.gp... */
- BFD_RELOC_NDS32_SDA19S0,
-
-/* for PIC */
- BFD_RELOC_NDS32_GOT20,
- BFD_RELOC_NDS32_9_PLTREL,
- BFD_RELOC_NDS32_25_PLTREL,
- BFD_RELOC_NDS32_COPY,
- BFD_RELOC_NDS32_GLOB_DAT,
- BFD_RELOC_NDS32_JMP_SLOT,
- BFD_RELOC_NDS32_RELATIVE,
- BFD_RELOC_NDS32_GOTOFF,
- BFD_RELOC_NDS32_GOTOFF_HI20,
- BFD_RELOC_NDS32_GOTOFF_LO12,
- BFD_RELOC_NDS32_GOTPC20,
- BFD_RELOC_NDS32_GOT_HI20,
- BFD_RELOC_NDS32_GOT_LO12,
- BFD_RELOC_NDS32_GOTPC_HI20,
- BFD_RELOC_NDS32_GOTPC_LO12,
-
-/* for relax */
- BFD_RELOC_NDS32_INSN16,
- BFD_RELOC_NDS32_LABEL,
- BFD_RELOC_NDS32_LONGCALL1,
- BFD_RELOC_NDS32_LONGCALL2,
- BFD_RELOC_NDS32_LONGCALL3,
- BFD_RELOC_NDS32_LONGJUMP1,
- BFD_RELOC_NDS32_LONGJUMP2,
- BFD_RELOC_NDS32_LONGJUMP3,
- BFD_RELOC_NDS32_LOADSTORE,
- BFD_RELOC_NDS32_9_FIXED,
- BFD_RELOC_NDS32_15_FIXED,
- BFD_RELOC_NDS32_17_FIXED,
- BFD_RELOC_NDS32_25_FIXED,
- BFD_RELOC_NDS32_LONGCALL4,
- BFD_RELOC_NDS32_LONGCALL5,
- BFD_RELOC_NDS32_LONGCALL6,
- BFD_RELOC_NDS32_LONGJUMP4,
- BFD_RELOC_NDS32_LONGJUMP5,
- BFD_RELOC_NDS32_LONGJUMP6,
- BFD_RELOC_NDS32_LONGJUMP7,
-
-/* for PIC */
- BFD_RELOC_NDS32_PLTREL_HI20,
- BFD_RELOC_NDS32_PLTREL_LO12,
- BFD_RELOC_NDS32_PLT_GOTREL_HI20,
- BFD_RELOC_NDS32_PLT_GOTREL_LO12,
-
-/* for floating point */
- BFD_RELOC_NDS32_SDA12S2_DP,
- BFD_RELOC_NDS32_SDA12S2_SP,
- BFD_RELOC_NDS32_LO12S2_DP,
- BFD_RELOC_NDS32_LO12S2_SP,
-
-/* for dwarf2 debug_line. */
- BFD_RELOC_NDS32_DWARF2_OP1,
- BFD_RELOC_NDS32_DWARF2_OP2,
- BFD_RELOC_NDS32_DWARF2_LEB,
-
-/* for eliminate 16-bit instructions */
- BFD_RELOC_NDS32_UPDATE_TA,
-
-/* for PIC object relaxation */
- BFD_RELOC_NDS32_PLT_GOTREL_LO20,
- BFD_RELOC_NDS32_PLT_GOTREL_LO15,
- BFD_RELOC_NDS32_PLT_GOTREL_LO19,
- BFD_RELOC_NDS32_GOT_LO15,
- BFD_RELOC_NDS32_GOT_LO19,
- BFD_RELOC_NDS32_GOTOFF_LO15,
- BFD_RELOC_NDS32_GOTOFF_LO19,
- BFD_RELOC_NDS32_GOT15S2,
- BFD_RELOC_NDS32_GOT17S2,
-
-/* NDS32 relocs.
-This is a 5 bit absolute address. */
- BFD_RELOC_NDS32_5,
-
-/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_10_UPCREL,
-
-/* If fp were omitted, fp can used as another gp. */
- BFD_RELOC_NDS32_SDA_FP7U2_RELA,
-
-/* relaxation relative relocation types */
- BFD_RELOC_NDS32_RELAX_ENTRY,
- BFD_RELOC_NDS32_GOT_SUFF,
- BFD_RELOC_NDS32_GOTOFF_SUFF,
- BFD_RELOC_NDS32_PLT_GOT_SUFF,
- BFD_RELOC_NDS32_MULCALL_SUFF,
- BFD_RELOC_NDS32_PTR,
- BFD_RELOC_NDS32_PTR_COUNT,
- BFD_RELOC_NDS32_PTR_RESOLVED,
- BFD_RELOC_NDS32_PLTBLOCK,
- BFD_RELOC_NDS32_RELAX_REGION_BEGIN,
- BFD_RELOC_NDS32_RELAX_REGION_END,
- BFD_RELOC_NDS32_MINUEND,
- BFD_RELOC_NDS32_SUBTRAHEND,
- BFD_RELOC_NDS32_DIFF8,
- BFD_RELOC_NDS32_DIFF16,
- BFD_RELOC_NDS32_DIFF32,
- BFD_RELOC_NDS32_DIFF_ULEB128,
- BFD_RELOC_NDS32_EMPTY,
-
-/* This is a 25 bit absolute address. */
- BFD_RELOC_NDS32_25_ABS,
-
-/* For ex9 and ifc using. */
- BFD_RELOC_NDS32_DATA,
- BFD_RELOC_NDS32_TRAN,
- BFD_RELOC_NDS32_17IFC_PCREL,
- BFD_RELOC_NDS32_10IFCU_PCREL,
-
-/* For TLS. */
- BFD_RELOC_NDS32_TPOFF,
- BFD_RELOC_NDS32_GOTTPOFF,
- BFD_RELOC_NDS32_TLS_LE_HI20,
- BFD_RELOC_NDS32_TLS_LE_LO12,
- BFD_RELOC_NDS32_TLS_LE_20,
- BFD_RELOC_NDS32_TLS_LE_15S0,
- BFD_RELOC_NDS32_TLS_LE_15S1,
- BFD_RELOC_NDS32_TLS_LE_15S2,
- BFD_RELOC_NDS32_TLS_LE_ADD,
- BFD_RELOC_NDS32_TLS_LE_LS,
- BFD_RELOC_NDS32_TLS_IE_HI20,
- BFD_RELOC_NDS32_TLS_IE_LO12,
- BFD_RELOC_NDS32_TLS_IE_LO12S2,
- BFD_RELOC_NDS32_TLS_IEGP_HI20,
- BFD_RELOC_NDS32_TLS_IEGP_LO12,
- BFD_RELOC_NDS32_TLS_IEGP_LO12S2,
- BFD_RELOC_NDS32_TLS_IEGP_LW,
- BFD_RELOC_NDS32_TLS_DESC,
- BFD_RELOC_NDS32_TLS_DESC_HI20,
- BFD_RELOC_NDS32_TLS_DESC_LO12,
- BFD_RELOC_NDS32_TLS_DESC_20,
- BFD_RELOC_NDS32_TLS_DESC_SDA17S2,
- BFD_RELOC_NDS32_TLS_DESC_ADD,
- BFD_RELOC_NDS32_TLS_DESC_FUNC,
- BFD_RELOC_NDS32_TLS_DESC_CALL,
- BFD_RELOC_NDS32_TLS_DESC_MEM,
- BFD_RELOC_NDS32_REMOVE,
- BFD_RELOC_NDS32_GROUP,
-
-/* For floating load store relaxation. */
- BFD_RELOC_NDS32_LSI,
-
-/* This is a 9-bit reloc */
- BFD_RELOC_V850_9_PCREL,
-
-/* This is a 22-bit reloc */
- BFD_RELOC_V850_22_PCREL,
-
-/* This is a 16 bit offset from the short data area pointer. */
- BFD_RELOC_V850_SDA_16_16_OFFSET,
-
-/* This is a 16 bit offset (of which only 15 bits are used) from the
-short data area pointer. */
- BFD_RELOC_V850_SDA_15_16_OFFSET,
-
-/* This is a 16 bit offset from the zero data area pointer. */
- BFD_RELOC_V850_ZDA_16_16_OFFSET,
-
-/* This is a 16 bit offset (of which only 15 bits are used) from the
-zero data area pointer. */
- BFD_RELOC_V850_ZDA_15_16_OFFSET,
-
-/* This is an 8 bit offset (of which only 6 bits are used) from the
-tiny data area pointer. */
- BFD_RELOC_V850_TDA_6_8_OFFSET,
-
-/* This is an 8bit offset (of which only 7 bits are used) from the tiny
-data area pointer. */
- BFD_RELOC_V850_TDA_7_8_OFFSET,
-
-/* This is a 7 bit offset from the tiny data area pointer. */
- BFD_RELOC_V850_TDA_7_7_OFFSET,
-
-/* This is a 16 bit offset from the tiny data area pointer. */
- BFD_RELOC_V850_TDA_16_16_OFFSET,
-
-/* This is a 5 bit offset (of which only 4 bits are used) from the tiny
-data area pointer. */
- BFD_RELOC_V850_TDA_4_5_OFFSET,
-
-/* This is a 4 bit offset from the tiny data area pointer. */
- BFD_RELOC_V850_TDA_4_4_OFFSET,
-
-/* This is a 16 bit offset from the short data area pointer, with the
-bits placed non-contiguously in the instruction. */
- BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET,
-
-/* This is a 16 bit offset from the zero data area pointer, with the
-bits placed non-contiguously in the instruction. */
- BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET,
-
-/* This is a 6 bit offset from the call table base pointer. */
- BFD_RELOC_V850_CALLT_6_7_OFFSET,
-
-/* This is a 16 bit offset from the call table base pointer. */
- BFD_RELOC_V850_CALLT_16_16_OFFSET,
-
-/* Used for relaxing indirect function calls. */
- BFD_RELOC_V850_LONGCALL,
-
-/* Used for relaxing indirect jumps. */
- BFD_RELOC_V850_LONGJUMP,
-
-/* Used to maintain alignment whilst relaxing. */
- BFD_RELOC_V850_ALIGN,
-
-/* This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu
-instructions. */
- BFD_RELOC_V850_LO16_SPLIT_OFFSET,
-
-/* This is a 16-bit reloc. */
- BFD_RELOC_V850_16_PCREL,
-
-/* This is a 17-bit reloc. */
- BFD_RELOC_V850_17_PCREL,
-
-/* This is a 23-bit reloc. */
- BFD_RELOC_V850_23,
-
-/* This is a 32-bit reloc. */
- BFD_RELOC_V850_32_PCREL,
-
-/* This is a 32-bit reloc. */
- BFD_RELOC_V850_32_ABS,
-
-/* This is a 16-bit reloc. */
- BFD_RELOC_V850_16_SPLIT_OFFSET,
-
-/* This is a 16-bit reloc. */
- BFD_RELOC_V850_16_S1,
-
-/* Low 16 bits. 16 bit shifted by 1. */
- BFD_RELOC_V850_LO16_S1,
-
-/* This is a 16 bit offset from the call table base pointer. */
- BFD_RELOC_V850_CALLT_15_16_OFFSET,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_GOTPCREL,
-
-/* DSO relocations. */
- BFD_RELOC_V850_16_GOT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_GOT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_22_PLT_PCREL,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_PLT_PCREL,
-
-/* DSO relocations. */
- BFD_RELOC_V850_COPY,
-
-/* DSO relocations. */
- BFD_RELOC_V850_GLOB_DAT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_JMP_SLOT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_RELATIVE,
-
-/* DSO relocations. */
- BFD_RELOC_V850_16_GOTOFF,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_GOTOFF,
-
-/* start code. */
- BFD_RELOC_V850_CODE,
-
-/* start data in text. */
- BFD_RELOC_V850_DATA,
-
-/* This is a 8bit DP reloc for the tms320c30, where the most
-significant 8 bits of a 24 bit word are placed into the least
-significant 8 bits of the opcode. */
- BFD_RELOC_TIC30_LDP,
-
-/* This is a 7bit reloc for the tms320c54x, where the least
-significant 7 bits of a 16 bit word are placed into the least
-significant 7 bits of the opcode. */
- BFD_RELOC_TIC54X_PARTLS7,
-
-/* This is a 9bit DP reloc for the tms320c54x, where the most
-significant 9 bits of a 16 bit word are placed into the least
-significant 9 bits of the opcode. */
- BFD_RELOC_TIC54X_PARTMS9,
-
-/* This is an extended address 23-bit reloc for the tms320c54x. */
- BFD_RELOC_TIC54X_23,
-
-/* This is a 16-bit reloc for the tms320c54x, where the least
-significant 16 bits of a 23-bit extended address are placed into
-the opcode. */
- BFD_RELOC_TIC54X_16_OF_23,
-
-/* This is a reloc for the tms320c54x, where the most
-significant 7 bits of a 23-bit extended address are placed into
-the opcode. */
- BFD_RELOC_TIC54X_MS7_OF_23,
-
-/* TMS320C6000 relocations. */
- BFD_RELOC_C6000_PCR_S21,
- BFD_RELOC_C6000_PCR_S12,
- BFD_RELOC_C6000_PCR_S10,
- BFD_RELOC_C6000_PCR_S7,
- BFD_RELOC_C6000_ABS_S16,
- BFD_RELOC_C6000_ABS_L16,
- BFD_RELOC_C6000_ABS_H16,
- BFD_RELOC_C6000_SBR_U15_B,
- BFD_RELOC_C6000_SBR_U15_H,
- BFD_RELOC_C6000_SBR_U15_W,
- BFD_RELOC_C6000_SBR_S16,
- BFD_RELOC_C6000_SBR_L16_B,
- BFD_RELOC_C6000_SBR_L16_H,
- BFD_RELOC_C6000_SBR_L16_W,
- BFD_RELOC_C6000_SBR_H16_B,
- BFD_RELOC_C6000_SBR_H16_H,
- BFD_RELOC_C6000_SBR_H16_W,
- BFD_RELOC_C6000_SBR_GOT_U15_W,
- BFD_RELOC_C6000_SBR_GOT_L16_W,
- BFD_RELOC_C6000_SBR_GOT_H16_W,
- BFD_RELOC_C6000_DSBT_INDEX,
- BFD_RELOC_C6000_PREL31,
- BFD_RELOC_C6000_COPY,
- BFD_RELOC_C6000_JUMP_SLOT,
- BFD_RELOC_C6000_EHTYPE,
- BFD_RELOC_C6000_PCR_H16,
- BFD_RELOC_C6000_PCR_L16,
- BFD_RELOC_C6000_ALIGN,
- BFD_RELOC_C6000_FPHEAD,
- BFD_RELOC_C6000_NOCMP,
-
-/* This is a 48 bit reloc for the FR30 that stores 32 bits. */
- BFD_RELOC_FR30_48,
-
-/* This is a 32 bit reloc for the FR30 that stores 20 bits split up into
-two sections. */
- BFD_RELOC_FR30_20,
-
-/* This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in
-4 bits. */
- BFD_RELOC_FR30_6_IN_4,
-
-/* This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset
-into 8 bits. */
- BFD_RELOC_FR30_8_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 9 bit short offset
-into 8 bits. */
- BFD_RELOC_FR30_9_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 10 bit word offset
-into 8 bits. */
- BFD_RELOC_FR30_10_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
-short offset into 8 bits. */
- BFD_RELOC_FR30_9_PCREL,
-
-/* This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative
-short offset into 11 bits. */
- BFD_RELOC_FR30_12_PCREL,
-
-/* Motorola Mcore relocations. */
- BFD_RELOC_MCORE_PCREL_IMM8BY4,
- BFD_RELOC_MCORE_PCREL_IMM11BY2,
- BFD_RELOC_MCORE_PCREL_IMM4BY2,
- BFD_RELOC_MCORE_PCREL_32,
- BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2,
- BFD_RELOC_MCORE_RVA,
-
-/* Toshiba Media Processor Relocations. */
- BFD_RELOC_MEP_8,
- BFD_RELOC_MEP_16,
- BFD_RELOC_MEP_32,
- BFD_RELOC_MEP_PCREL8A2,
- BFD_RELOC_MEP_PCREL12A2,
- BFD_RELOC_MEP_PCREL17A2,
- BFD_RELOC_MEP_PCREL24A2,
- BFD_RELOC_MEP_PCABS24A2,
- BFD_RELOC_MEP_LOW16,
- BFD_RELOC_MEP_HI16U,
- BFD_RELOC_MEP_HI16S,
- BFD_RELOC_MEP_GPREL,
- BFD_RELOC_MEP_TPREL,
- BFD_RELOC_MEP_TPREL7,
- BFD_RELOC_MEP_TPREL7A2,
- BFD_RELOC_MEP_TPREL7A4,
- BFD_RELOC_MEP_UIMM24,
- BFD_RELOC_MEP_ADDR24A4,
- BFD_RELOC_MEP_GNU_VTINHERIT,
- BFD_RELOC_MEP_GNU_VTENTRY,
-
-
-/* Imagination Technologies Meta relocations. */
- BFD_RELOC_METAG_HIADDR16,
- BFD_RELOC_METAG_LOADDR16,
- BFD_RELOC_METAG_RELBRANCH,
- BFD_RELOC_METAG_GETSETOFF,
- BFD_RELOC_METAG_HIOG,
- BFD_RELOC_METAG_LOOG,
- BFD_RELOC_METAG_REL8,
- BFD_RELOC_METAG_REL16,
- BFD_RELOC_METAG_HI16_GOTOFF,
- BFD_RELOC_METAG_LO16_GOTOFF,
- BFD_RELOC_METAG_GETSET_GOTOFF,
- BFD_RELOC_METAG_GETSET_GOT,
- BFD_RELOC_METAG_HI16_GOTPC,
- BFD_RELOC_METAG_LO16_GOTPC,
- BFD_RELOC_METAG_HI16_PLT,
- BFD_RELOC_METAG_LO16_PLT,
- BFD_RELOC_METAG_RELBRANCH_PLT,
- BFD_RELOC_METAG_GOTOFF,
- BFD_RELOC_METAG_PLT,
- BFD_RELOC_METAG_COPY,
- BFD_RELOC_METAG_JMP_SLOT,
- BFD_RELOC_METAG_RELATIVE,
- BFD_RELOC_METAG_GLOB_DAT,
- BFD_RELOC_METAG_TLS_GD,
- BFD_RELOC_METAG_TLS_LDM,
- BFD_RELOC_METAG_TLS_LDO_HI16,
- BFD_RELOC_METAG_TLS_LDO_LO16,
- BFD_RELOC_METAG_TLS_LDO,
- BFD_RELOC_METAG_TLS_IE,
- BFD_RELOC_METAG_TLS_IENONPIC,
- BFD_RELOC_METAG_TLS_IENONPIC_HI16,
- BFD_RELOC_METAG_TLS_IENONPIC_LO16,
- BFD_RELOC_METAG_TLS_TPOFF,
- BFD_RELOC_METAG_TLS_DTPMOD,
- BFD_RELOC_METAG_TLS_DTPOFF,
- BFD_RELOC_METAG_TLS_LE,
- BFD_RELOC_METAG_TLS_LE_HI16,
- BFD_RELOC_METAG_TLS_LE_LO16,
-
-/* These are relocations for the GETA instruction. */
- BFD_RELOC_MMIX_GETA,
- BFD_RELOC_MMIX_GETA_1,
- BFD_RELOC_MMIX_GETA_2,
- BFD_RELOC_MMIX_GETA_3,
-
-/* These are relocations for a conditional branch instruction. */
- BFD_RELOC_MMIX_CBRANCH,
- BFD_RELOC_MMIX_CBRANCH_J,
- BFD_RELOC_MMIX_CBRANCH_1,
- BFD_RELOC_MMIX_CBRANCH_2,
- BFD_RELOC_MMIX_CBRANCH_3,
-
-/* These are relocations for the PUSHJ instruction. */
- BFD_RELOC_MMIX_PUSHJ,
- BFD_RELOC_MMIX_PUSHJ_1,
- BFD_RELOC_MMIX_PUSHJ_2,
- BFD_RELOC_MMIX_PUSHJ_3,
- BFD_RELOC_MMIX_PUSHJ_STUBBABLE,
-
-/* These are relocations for the JMP instruction. */
- BFD_RELOC_MMIX_JMP,
- BFD_RELOC_MMIX_JMP_1,
- BFD_RELOC_MMIX_JMP_2,
- BFD_RELOC_MMIX_JMP_3,
-
-/* This is a relocation for a relative address as in a GETA instruction or
-a branch. */
- BFD_RELOC_MMIX_ADDR19,
-
-/* This is a relocation for a relative address as in a JMP instruction. */
- BFD_RELOC_MMIX_ADDR27,
-
-/* This is a relocation for an instruction field that may be a general
-register or a value 0..255. */
- BFD_RELOC_MMIX_REG_OR_BYTE,
-
-/* This is a relocation for an instruction field that may be a general
-register. */
- BFD_RELOC_MMIX_REG,
-
-/* This is a relocation for two instruction fields holding a register and
-an offset, the equivalent of the relocation. */
- BFD_RELOC_MMIX_BASE_PLUS_OFFSET,
-
-/* This relocation is an assertion that the expression is not allocated as
-a global register. It does not modify contents. */
- BFD_RELOC_MMIX_LOCAL,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit pc relative
-short offset into 7 bits. */
- BFD_RELOC_AVR_7_PCREL,
-
-/* This is a 16 bit reloc for the AVR that stores 13 bit pc relative
-short offset into 12 bits. */
- BFD_RELOC_AVR_13_PCREL,
-
-/* This is a 16 bit reloc for the AVR that stores 17 bit value (usually
-program memory address) into 16 bits. */
- BFD_RELOC_AVR_16_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
-data memory address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_LO8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of data memory address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HI8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of program memory address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HH8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of 32 bit value) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_MS8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(usually data memory address) into 8 bit immediate value of SUBI insn. */
- BFD_RELOC_AVR_LO8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 8 bit of data memory address) into 8 bit immediate value of
-SUBI insn. */
- BFD_RELOC_AVR_HI8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(most high 8 bit of program memory address) into 8 bit immediate value
-of LDI or SUBI insn. */
- BFD_RELOC_AVR_HH8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value (msb
-of 32 bit value) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_MS8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
-command address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_LO8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value
-(command address) into 8 bit immediate value of LDI insn. If the address
-is beyond the 128k boundary, the linker inserts a jump stub for this reloc
-in the lower 128k. */
- BFD_RELOC_AVR_LO8_LDI_GS,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of command address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HI8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of command address) into 8 bit immediate value of LDI insn. If the address
-is beyond the 128k boundary, the linker inserts a jump stub for this reloc
-below 128k. */
- BFD_RELOC_AVR_HI8_LDI_GS,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of command address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HH8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(usually command address) into 8 bit immediate value of SUBI insn. */
- BFD_RELOC_AVR_LO8_LDI_PM_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 8 bit of 16 bit command address) into 8 bit immediate value
-of SUBI insn. */
- BFD_RELOC_AVR_HI8_LDI_PM_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 6 bit of 22 bit command address) into 8 bit immediate
-value of SUBI insn. */
- BFD_RELOC_AVR_HH8_LDI_PM_NEG,
-
-/* This is a 32 bit reloc for the AVR that stores 23 bit value
-into 22 bits. */
- BFD_RELOC_AVR_CALL,
-
-/* This is a 16 bit reloc for the AVR that stores all needed bits
-for absolute addressing with ldi with overflow check to linktime */
- BFD_RELOC_AVR_LDI,
-
-/* This is a 6 bit reloc for the AVR that stores offset for ldd/std
-instructions */
- BFD_RELOC_AVR_6,
-
-/* This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
-instructions */
- BFD_RELOC_AVR_6_ADIW,
-
-/* This is a 8 bit reloc for the AVR that stores bits 0..7 of a symbol
-in .byte lo8(symbol) */
- BFD_RELOC_AVR_8_LO,
-
-/* This is a 8 bit reloc for the AVR that stores bits 8..15 of a symbol
-in .byte hi8(symbol) */
- BFD_RELOC_AVR_8_HI,
-
-/* This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol
-in .byte hlo8(symbol) */
- BFD_RELOC_AVR_8_HLO,
-
-/* AVR relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-second symbol so the linker can determine whether to adjust the field
-value. */
- BFD_RELOC_AVR_DIFF8,
- BFD_RELOC_AVR_DIFF16,
- BFD_RELOC_AVR_DIFF32,
-
-/* This is a 7 bit reloc for the AVR that stores SRAM address for 16bit
-lds and sts instructions supported only tiny core. */
- BFD_RELOC_AVR_LDS_STS_16,
-
-/* This is a 6 bit reloc for the AVR that stores an I/O register
-number for the IN and OUT instructions */
- BFD_RELOC_AVR_PORT6,
-
-/* This is a 5 bit reloc for the AVR that stores an I/O register
-number for the SBIC, SBIS, SBI and CBI instructions */
- BFD_RELOC_AVR_PORT5,
-
-/* RISC-V relocations. */
- BFD_RELOC_RISCV_HI20,
- BFD_RELOC_RISCV_PCREL_HI20,
- BFD_RELOC_RISCV_PCREL_LO12_I,
- BFD_RELOC_RISCV_PCREL_LO12_S,
- BFD_RELOC_RISCV_LO12_I,
- BFD_RELOC_RISCV_LO12_S,
- BFD_RELOC_RISCV_GPREL12_I,
- BFD_RELOC_RISCV_GPREL12_S,
- BFD_RELOC_RISCV_TPREL_HI20,
- BFD_RELOC_RISCV_TPREL_LO12_I,
- BFD_RELOC_RISCV_TPREL_LO12_S,
- BFD_RELOC_RISCV_TPREL_ADD,
- BFD_RELOC_RISCV_CALL,
- BFD_RELOC_RISCV_CALL_PLT,
- BFD_RELOC_RISCV_ADD8,
- BFD_RELOC_RISCV_ADD16,
- BFD_RELOC_RISCV_ADD32,
- BFD_RELOC_RISCV_ADD64,
- BFD_RELOC_RISCV_SUB8,
- BFD_RELOC_RISCV_SUB16,
- BFD_RELOC_RISCV_SUB32,
- BFD_RELOC_RISCV_SUB64,
- BFD_RELOC_RISCV_GOT_HI20,
- BFD_RELOC_RISCV_TLS_GOT_HI20,
- BFD_RELOC_RISCV_TLS_GD_HI20,
- BFD_RELOC_RISCV_JMP,
- BFD_RELOC_RISCV_TLS_DTPMOD32,
- BFD_RELOC_RISCV_TLS_DTPREL32,
- BFD_RELOC_RISCV_TLS_DTPMOD64,
- BFD_RELOC_RISCV_TLS_DTPREL64,
- BFD_RELOC_RISCV_TLS_TPREL32,
- BFD_RELOC_RISCV_TLS_TPREL64,
- BFD_RELOC_RISCV_ALIGN,
- BFD_RELOC_RISCV_RVC_BRANCH,
- BFD_RELOC_RISCV_RVC_JUMP,
- BFD_RELOC_RISCV_RVC_LUI,
- BFD_RELOC_RISCV_GPREL_I,
- BFD_RELOC_RISCV_GPREL_S,
- BFD_RELOC_RISCV_TPREL_I,
- BFD_RELOC_RISCV_TPREL_S,
- BFD_RELOC_RISCV_RELAX,
- BFD_RELOC_RISCV_CFA,
- BFD_RELOC_RISCV_SUB6,
- BFD_RELOC_RISCV_SET6,
- BFD_RELOC_RISCV_SET8,
- BFD_RELOC_RISCV_SET16,
- BFD_RELOC_RISCV_SET32,
- BFD_RELOC_RISCV_32_PCREL,
-
-/* Renesas RL78 Relocations. */
- BFD_RELOC_RL78_NEG8,
- BFD_RELOC_RL78_NEG16,
- BFD_RELOC_RL78_NEG24,
- BFD_RELOC_RL78_NEG32,
- BFD_RELOC_RL78_16_OP,
- BFD_RELOC_RL78_24_OP,
- BFD_RELOC_RL78_32_OP,
- BFD_RELOC_RL78_8U,
- BFD_RELOC_RL78_16U,
- BFD_RELOC_RL78_24U,
- BFD_RELOC_RL78_DIR3U_PCREL,
- BFD_RELOC_RL78_DIFF,
- BFD_RELOC_RL78_GPRELB,
- BFD_RELOC_RL78_GPRELW,
- BFD_RELOC_RL78_GPRELL,
- BFD_RELOC_RL78_SYM,
- BFD_RELOC_RL78_OP_SUBTRACT,
- BFD_RELOC_RL78_OP_NEG,
- BFD_RELOC_RL78_OP_AND,
- BFD_RELOC_RL78_OP_SHRA,
- BFD_RELOC_RL78_ABS8,
- BFD_RELOC_RL78_ABS16,
- BFD_RELOC_RL78_ABS16_REV,
- BFD_RELOC_RL78_ABS32,
- BFD_RELOC_RL78_ABS32_REV,
- BFD_RELOC_RL78_ABS16U,
- BFD_RELOC_RL78_ABS16UW,
- BFD_RELOC_RL78_ABS16UL,
- BFD_RELOC_RL78_RELAX,
- BFD_RELOC_RL78_HI16,
- BFD_RELOC_RL78_HI8,
- BFD_RELOC_RL78_LO16,
- BFD_RELOC_RL78_CODE,
- BFD_RELOC_RL78_SADDR,
-
-/* Renesas RX Relocations. */
- BFD_RELOC_RX_NEG8,
- BFD_RELOC_RX_NEG16,
- BFD_RELOC_RX_NEG24,
- BFD_RELOC_RX_NEG32,
- BFD_RELOC_RX_16_OP,
- BFD_RELOC_RX_24_OP,
- BFD_RELOC_RX_32_OP,
- BFD_RELOC_RX_8U,
- BFD_RELOC_RX_16U,
- BFD_RELOC_RX_24U,
- BFD_RELOC_RX_DIR3U_PCREL,
- BFD_RELOC_RX_DIFF,
- BFD_RELOC_RX_GPRELB,
- BFD_RELOC_RX_GPRELW,
- BFD_RELOC_RX_GPRELL,
- BFD_RELOC_RX_SYM,
- BFD_RELOC_RX_OP_SUBTRACT,
- BFD_RELOC_RX_OP_NEG,
- BFD_RELOC_RX_ABS8,
- BFD_RELOC_RX_ABS16,
- BFD_RELOC_RX_ABS16_REV,
- BFD_RELOC_RX_ABS32,
- BFD_RELOC_RX_ABS32_REV,
- BFD_RELOC_RX_ABS16U,
- BFD_RELOC_RX_ABS16UW,
- BFD_RELOC_RX_ABS16UL,
- BFD_RELOC_RX_RELAX,
-
-/* Direct 12 bit. */
- BFD_RELOC_390_12,
-
-/* 12 bit GOT offset. */
- BFD_RELOC_390_GOT12,
-
-/* 32 bit PC relative PLT address. */
- BFD_RELOC_390_PLT32,
-
-/* Copy symbol at runtime. */
- BFD_RELOC_390_COPY,
-
-/* Create GOT entry. */
- BFD_RELOC_390_GLOB_DAT,
-
-/* Create PLT entry. */
- BFD_RELOC_390_JMP_SLOT,
-
-/* Adjust by program base. */
- BFD_RELOC_390_RELATIVE,
-
-/* 32 bit PC relative offset to GOT. */
- BFD_RELOC_390_GOTPC,
-
-/* 16 bit GOT offset. */
- BFD_RELOC_390_GOT16,
-
-/* PC relative 12 bit shifted by 1. */
- BFD_RELOC_390_PC12DBL,
-
-/* 12 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT12DBL,
-
-/* PC relative 16 bit shifted by 1. */
- BFD_RELOC_390_PC16DBL,
-
-/* 16 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT16DBL,
-
-/* PC relative 24 bit shifted by 1. */
- BFD_RELOC_390_PC24DBL,
-
-/* 24 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT24DBL,
-
-/* PC relative 32 bit shifted by 1. */
- BFD_RELOC_390_PC32DBL,
-
-/* 32 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT32DBL,
-
-/* 32 bit PC rel. GOT shifted by 1. */
- BFD_RELOC_390_GOTPCDBL,
-
-/* 64 bit GOT offset. */
- BFD_RELOC_390_GOT64,
-
-/* 64 bit PC relative PLT address. */
- BFD_RELOC_390_PLT64,
-
-/* 32 bit rel. offset to GOT entry. */
- BFD_RELOC_390_GOTENT,
-
-/* 64 bit offset to GOT. */
- BFD_RELOC_390_GOTOFF64,
-
-/* 12-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT12,
-
-/* 16-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT16,
-
-/* 32-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT32,
-
-/* 64-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT64,
-
-/* 32-bit rel. offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLTENT,
-
-/* 16-bit rel. offset from the GOT to a PLT entry. */
- BFD_RELOC_390_PLTOFF16,
-
-/* 32-bit rel. offset from the GOT to a PLT entry. */
- BFD_RELOC_390_PLTOFF32,
-
-/* 64-bit rel. offset from the GOT to a PLT entry. */
- BFD_RELOC_390_PLTOFF64,
-
-/* s390 tls relocations. */
- BFD_RELOC_390_TLS_LOAD,
- BFD_RELOC_390_TLS_GDCALL,
- BFD_RELOC_390_TLS_LDCALL,
- BFD_RELOC_390_TLS_GD32,
- BFD_RELOC_390_TLS_GD64,
- BFD_RELOC_390_TLS_GOTIE12,
- BFD_RELOC_390_TLS_GOTIE32,
- BFD_RELOC_390_TLS_GOTIE64,
- BFD_RELOC_390_TLS_LDM32,
- BFD_RELOC_390_TLS_LDM64,
- BFD_RELOC_390_TLS_IE32,
- BFD_RELOC_390_TLS_IE64,
- BFD_RELOC_390_TLS_IEENT,
- BFD_RELOC_390_TLS_LE32,
- BFD_RELOC_390_TLS_LE64,
- BFD_RELOC_390_TLS_LDO32,
- BFD_RELOC_390_TLS_LDO64,
- BFD_RELOC_390_TLS_DTPMOD,
- BFD_RELOC_390_TLS_DTPOFF,
- BFD_RELOC_390_TLS_TPOFF,
-
-/* Long displacement extension. */
- BFD_RELOC_390_20,
- BFD_RELOC_390_GOT20,
- BFD_RELOC_390_GOTPLT20,
- BFD_RELOC_390_TLS_GOTIE20,
-
-/* STT_GNU_IFUNC relocation. */
- BFD_RELOC_390_IRELATIVE,
-
-/* Score relocations
-Low 16 bit for load/store */
- BFD_RELOC_SCORE_GPREL15,
-
-/* This is a 24-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_DUMMY2,
- BFD_RELOC_SCORE_JMP,
-
-/* This is a 19-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_BRANCH,
-
-/* This is a 32-bit reloc for 48-bit instructions. */
- BFD_RELOC_SCORE_IMM30,
-
-/* This is a 32-bit reloc for 48-bit instructions. */
- BFD_RELOC_SCORE_IMM32,
-
-/* This is a 11-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE16_JMP,
-
-/* This is a 8-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE16_BRANCH,
-
-/* This is a 9-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_BCMP,
-
-/* Undocumented Score relocs */
- BFD_RELOC_SCORE_GOT15,
- BFD_RELOC_SCORE_GOT_LO16,
- BFD_RELOC_SCORE_CALL15,
- BFD_RELOC_SCORE_DUMMY_HI16,
-
-/* Scenix IP2K - 9-bit register number / data address */
- BFD_RELOC_IP2K_FR9,
-
-/* Scenix IP2K - 4-bit register/data bank number */
- BFD_RELOC_IP2K_BANK,
-
-/* Scenix IP2K - low 13 bits of instruction word address */
- BFD_RELOC_IP2K_ADDR16CJP,
-
-/* Scenix IP2K - high 3 bits of instruction word address */
- BFD_RELOC_IP2K_PAGE3,
-
-/* Scenix IP2K - ext/low/high 8 bits of data address */
- BFD_RELOC_IP2K_LO8DATA,
- BFD_RELOC_IP2K_HI8DATA,
- BFD_RELOC_IP2K_EX8DATA,
-
-/* Scenix IP2K - low/high 8 bits of instruction word address */
- BFD_RELOC_IP2K_LO8INSN,
- BFD_RELOC_IP2K_HI8INSN,
-
-/* Scenix IP2K - even/odd PC modifier to modify snb pcl.0 */
- BFD_RELOC_IP2K_PC_SKIP,
-
-/* Scenix IP2K - 16 bit word address in text section. */
- BFD_RELOC_IP2K_TEXT,
-
-/* Scenix IP2K - 7-bit sp or dp offset */
- BFD_RELOC_IP2K_FR_OFFSET,
-
-/* Scenix VPE4K coprocessor - data/insn-space addressing */
- BFD_RELOC_VPE4KMATH_DATA,
- BFD_RELOC_VPE4KMATH_INSN,
-
-/* These two relocations are used by the linker to determine which of
-the entries in a C++ virtual function table are actually used. When
-the --gc-sections option is given, the linker will zero out the entries
-that are not used, so that the code for those functions need not be
-included in the output.
-
-VTABLE_INHERIT is a zero-space relocation used to describe to the
-linker the inheritance tree of a C++ virtual function table. The
-relocation's symbol should be the parent class' vtable, and the
-relocation should be located at the child vtable.
-
-VTABLE_ENTRY is a zero-space relocation that describes the use of a
-virtual function table entry. The reloc's symbol should refer to the
-table of the class mentioned in the code. Off of that base, an offset
-describes the entry that is being used. For Rela hosts, this offset
-is stored in the reloc's addend. For Rel hosts, we are forced to put
-this offset in the reloc's section offset. */
- BFD_RELOC_VTABLE_INHERIT,
- BFD_RELOC_VTABLE_ENTRY,
-
-/* Intel IA64 Relocations. */
- BFD_RELOC_IA64_IMM14,
- BFD_RELOC_IA64_IMM22,
- BFD_RELOC_IA64_IMM64,
- BFD_RELOC_IA64_DIR32MSB,
- BFD_RELOC_IA64_DIR32LSB,
- BFD_RELOC_IA64_DIR64MSB,
- BFD_RELOC_IA64_DIR64LSB,
- BFD_RELOC_IA64_GPREL22,
- BFD_RELOC_IA64_GPREL64I,
- BFD_RELOC_IA64_GPREL32MSB,
- BFD_RELOC_IA64_GPREL32LSB,
- BFD_RELOC_IA64_GPREL64MSB,
- BFD_RELOC_IA64_GPREL64LSB,
- BFD_RELOC_IA64_LTOFF22,
- BFD_RELOC_IA64_LTOFF64I,
- BFD_RELOC_IA64_PLTOFF22,
- BFD_RELOC_IA64_PLTOFF64I,
- BFD_RELOC_IA64_PLTOFF64MSB,
- BFD_RELOC_IA64_PLTOFF64LSB,
- BFD_RELOC_IA64_FPTR64I,
- BFD_RELOC_IA64_FPTR32MSB,
- BFD_RELOC_IA64_FPTR32LSB,
- BFD_RELOC_IA64_FPTR64MSB,
- BFD_RELOC_IA64_FPTR64LSB,
- BFD_RELOC_IA64_PCREL21B,
- BFD_RELOC_IA64_PCREL21BI,
- BFD_RELOC_IA64_PCREL21M,
- BFD_RELOC_IA64_PCREL21F,
- BFD_RELOC_IA64_PCREL22,
- BFD_RELOC_IA64_PCREL60B,
- BFD_RELOC_IA64_PCREL64I,
- BFD_RELOC_IA64_PCREL32MSB,
- BFD_RELOC_IA64_PCREL32LSB,
- BFD_RELOC_IA64_PCREL64MSB,
- BFD_RELOC_IA64_PCREL64LSB,
- BFD_RELOC_IA64_LTOFF_FPTR22,
- BFD_RELOC_IA64_LTOFF_FPTR64I,
- BFD_RELOC_IA64_LTOFF_FPTR32MSB,
- BFD_RELOC_IA64_LTOFF_FPTR32LSB,
- BFD_RELOC_IA64_LTOFF_FPTR64MSB,
- BFD_RELOC_IA64_LTOFF_FPTR64LSB,
- BFD_RELOC_IA64_SEGREL32MSB,
- BFD_RELOC_IA64_SEGREL32LSB,
- BFD_RELOC_IA64_SEGREL64MSB,
- BFD_RELOC_IA64_SEGREL64LSB,
- BFD_RELOC_IA64_SECREL32MSB,
- BFD_RELOC_IA64_SECREL32LSB,
- BFD_RELOC_IA64_SECREL64MSB,
- BFD_RELOC_IA64_SECREL64LSB,
- BFD_RELOC_IA64_REL32MSB,
- BFD_RELOC_IA64_REL32LSB,
- BFD_RELOC_IA64_REL64MSB,
- BFD_RELOC_IA64_REL64LSB,
- BFD_RELOC_IA64_LTV32MSB,
- BFD_RELOC_IA64_LTV32LSB,
- BFD_RELOC_IA64_LTV64MSB,
- BFD_RELOC_IA64_LTV64LSB,
- BFD_RELOC_IA64_IPLTMSB,
- BFD_RELOC_IA64_IPLTLSB,
- BFD_RELOC_IA64_COPY,
- BFD_RELOC_IA64_LTOFF22X,
- BFD_RELOC_IA64_LDXMOV,
- BFD_RELOC_IA64_TPREL14,
- BFD_RELOC_IA64_TPREL22,
- BFD_RELOC_IA64_TPREL64I,
- BFD_RELOC_IA64_TPREL64MSB,
- BFD_RELOC_IA64_TPREL64LSB,
- BFD_RELOC_IA64_LTOFF_TPREL22,
- BFD_RELOC_IA64_DTPMOD64MSB,
- BFD_RELOC_IA64_DTPMOD64LSB,
- BFD_RELOC_IA64_LTOFF_DTPMOD22,
- BFD_RELOC_IA64_DTPREL14,
- BFD_RELOC_IA64_DTPREL22,
- BFD_RELOC_IA64_DTPREL64I,
- BFD_RELOC_IA64_DTPREL32MSB,
- BFD_RELOC_IA64_DTPREL32LSB,
- BFD_RELOC_IA64_DTPREL64MSB,
- BFD_RELOC_IA64_DTPREL64LSB,
- BFD_RELOC_IA64_LTOFF_DTPREL22,
-
-/* Motorola 68HC11 reloc.
-This is the 8 bit high part of an absolute address. */
- BFD_RELOC_M68HC11_HI8,
-
-/* Motorola 68HC11 reloc.
-This is the 8 bit low part of an absolute address. */
- BFD_RELOC_M68HC11_LO8,
-
-/* Motorola 68HC11 reloc.
-This is the 3 bit of a value. */
- BFD_RELOC_M68HC11_3B,
-
-/* Motorola 68HC11 reloc.
-This reloc marks the beginning of a jump/call instruction.
-It is used for linker relaxation to correctly identify beginning
-of instruction and change some branches to use PC-relative
-addressing mode. */
- BFD_RELOC_M68HC11_RL_JUMP,
-
-/* Motorola 68HC11 reloc.
-This reloc marks a group of several instructions that gcc generates
-and for which the linker relaxation pass can modify and/or remove
-some of them. */
- BFD_RELOC_M68HC11_RL_GROUP,
-
-/* Motorola 68HC11 reloc.
-This is the 16-bit lower part of an address. It is used for 'call'
-instruction to specify the symbol address without any special
-transformation (due to memory bank window). */
- BFD_RELOC_M68HC11_LO16,
-
-/* Motorola 68HC11 reloc.
-This is a 8-bit reloc that specifies the page number of an address.
-It is used by 'call' instruction to specify the page number of
-the symbol. */
- BFD_RELOC_M68HC11_PAGE,
-
-/* Motorola 68HC11 reloc.
-This is a 24-bit reloc that represents the address with a 16-bit
-value and a 8-bit page number. The symbol address is transformed
-to follow the 16K memory bank of 68HC12 (seen as mapped in the window). */
- BFD_RELOC_M68HC11_24,
-
-/* Motorola 68HC12 reloc.
-This is the 5 bits of a value. */
- BFD_RELOC_M68HC12_5B,
-
-/* Freescale XGATE reloc.
-This reloc marks the beginning of a bra/jal instruction. */
- BFD_RELOC_XGATE_RL_JUMP,
-
-/* Freescale XGATE reloc.
-This reloc marks a group of several instructions that gcc generates
-and for which the linker relaxation pass can modify and/or remove
-some of them. */
- BFD_RELOC_XGATE_RL_GROUP,
-
-/* Freescale XGATE reloc.
-This is the 16-bit lower part of an address. It is used for the '16-bit'
-instructions. */
- BFD_RELOC_XGATE_LO16,
-
-/* Freescale XGATE reloc. */
- BFD_RELOC_XGATE_GPAGE,
-
-/* Freescale XGATE reloc. */
- BFD_RELOC_XGATE_24,
-
-/* Freescale XGATE reloc.
-This is a 9-bit pc-relative reloc. */
- BFD_RELOC_XGATE_PCREL_9,
-
-/* Freescale XGATE reloc.
-This is a 10-bit pc-relative reloc. */
- BFD_RELOC_XGATE_PCREL_10,
-
-/* Freescale XGATE reloc.
-This is the 16-bit lower part of an address. It is used for the '16-bit'
-instructions. */
- BFD_RELOC_XGATE_IMM8_LO,
-
-/* Freescale XGATE reloc.
-This is the 16-bit higher part of an address. It is used for the '16-bit'
-instructions. */
- BFD_RELOC_XGATE_IMM8_HI,
-
-/* Freescale XGATE reloc.
-This is a 3-bit pc-relative reloc. */
- BFD_RELOC_XGATE_IMM3,
-
-/* Freescale XGATE reloc.
-This is a 4-bit pc-relative reloc. */
- BFD_RELOC_XGATE_IMM4,
-
-/* Freescale XGATE reloc.
-This is a 5-bit pc-relative reloc. */
- BFD_RELOC_XGATE_IMM5,
-
-/* Motorola 68HC12 reloc.
-This is the 9 bits of a value. */
- BFD_RELOC_M68HC12_9B,
-
-/* Motorola 68HC12 reloc.
-This is the 16 bits of a value. */
- BFD_RELOC_M68HC12_16B,
-
-/* Motorola 68HC12/XGATE reloc.
-This is a PCREL9 branch. */
- BFD_RELOC_M68HC12_9_PCREL,
-
-/* Motorola 68HC12/XGATE reloc.
-This is a PCREL10 branch. */
- BFD_RELOC_M68HC12_10_PCREL,
-
-/* Motorola 68HC12/XGATE reloc.
-This is the 8 bit low part of an absolute address and immediately precedes
-a matching HI8XG part. */
- BFD_RELOC_M68HC12_LO8XG,
-
-/* Motorola 68HC12/XGATE reloc.
-This is the 8 bit high part of an absolute address and immediately follows
-a matching LO8XG part. */
- BFD_RELOC_M68HC12_HI8XG,
-
-/* Freescale S12Z reloc.
-This is a 15 bit relative address. If the most significant bits are all zero
-then it may be truncated to 8 bits. */
- BFD_RELOC_S12Z_15_PCREL,
-
-/* NS CR16C Relocations. */
- BFD_RELOC_16C_NUM08,
- BFD_RELOC_16C_NUM08_C,
- BFD_RELOC_16C_NUM16,
- BFD_RELOC_16C_NUM16_C,
- BFD_RELOC_16C_NUM32,
- BFD_RELOC_16C_NUM32_C,
- BFD_RELOC_16C_DISP04,
- BFD_RELOC_16C_DISP04_C,
- BFD_RELOC_16C_DISP08,
- BFD_RELOC_16C_DISP08_C,
- BFD_RELOC_16C_DISP16,
- BFD_RELOC_16C_DISP16_C,
- BFD_RELOC_16C_DISP24,
- BFD_RELOC_16C_DISP24_C,
- BFD_RELOC_16C_DISP24a,
- BFD_RELOC_16C_DISP24a_C,
- BFD_RELOC_16C_REG04,
- BFD_RELOC_16C_REG04_C,
- BFD_RELOC_16C_REG04a,
- BFD_RELOC_16C_REG04a_C,
- BFD_RELOC_16C_REG14,
- BFD_RELOC_16C_REG14_C,
- BFD_RELOC_16C_REG16,
- BFD_RELOC_16C_REG16_C,
- BFD_RELOC_16C_REG20,
- BFD_RELOC_16C_REG20_C,
- BFD_RELOC_16C_ABS20,
- BFD_RELOC_16C_ABS20_C,
- BFD_RELOC_16C_ABS24,
- BFD_RELOC_16C_ABS24_C,
- BFD_RELOC_16C_IMM04,
- BFD_RELOC_16C_IMM04_C,
- BFD_RELOC_16C_IMM16,
- BFD_RELOC_16C_IMM16_C,
- BFD_RELOC_16C_IMM20,
- BFD_RELOC_16C_IMM20_C,
- BFD_RELOC_16C_IMM24,
- BFD_RELOC_16C_IMM24_C,
- BFD_RELOC_16C_IMM32,
- BFD_RELOC_16C_IMM32_C,
-
-/* NS CR16 Relocations. */
- BFD_RELOC_CR16_NUM8,
- BFD_RELOC_CR16_NUM16,
- BFD_RELOC_CR16_NUM32,
- BFD_RELOC_CR16_NUM32a,
- BFD_RELOC_CR16_REGREL0,
- BFD_RELOC_CR16_REGREL4,
- BFD_RELOC_CR16_REGREL4a,
- BFD_RELOC_CR16_REGREL14,
- BFD_RELOC_CR16_REGREL14a,
- BFD_RELOC_CR16_REGREL16,
- BFD_RELOC_CR16_REGREL20,
- BFD_RELOC_CR16_REGREL20a,
- BFD_RELOC_CR16_ABS20,
- BFD_RELOC_CR16_ABS24,
- BFD_RELOC_CR16_IMM4,
- BFD_RELOC_CR16_IMM8,
- BFD_RELOC_CR16_IMM16,
- BFD_RELOC_CR16_IMM20,
- BFD_RELOC_CR16_IMM24,
- BFD_RELOC_CR16_IMM32,
- BFD_RELOC_CR16_IMM32a,
- BFD_RELOC_CR16_DISP4,
- BFD_RELOC_CR16_DISP8,
- BFD_RELOC_CR16_DISP16,
- BFD_RELOC_CR16_DISP20,
- BFD_RELOC_CR16_DISP24,
- BFD_RELOC_CR16_DISP24a,
- BFD_RELOC_CR16_SWITCH8,
- BFD_RELOC_CR16_SWITCH16,
- BFD_RELOC_CR16_SWITCH32,
- BFD_RELOC_CR16_GOT_REGREL20,
- BFD_RELOC_CR16_GOTC_REGREL20,
- BFD_RELOC_CR16_GLOB_DAT,
-
-/* NS CRX Relocations. */
- BFD_RELOC_CRX_REL4,
- BFD_RELOC_CRX_REL8,
- BFD_RELOC_CRX_REL8_CMP,
- BFD_RELOC_CRX_REL16,
- BFD_RELOC_CRX_REL24,
- BFD_RELOC_CRX_REL32,
- BFD_RELOC_CRX_REGREL12,
- BFD_RELOC_CRX_REGREL22,
- BFD_RELOC_CRX_REGREL28,
- BFD_RELOC_CRX_REGREL32,
- BFD_RELOC_CRX_ABS16,
- BFD_RELOC_CRX_ABS32,
- BFD_RELOC_CRX_NUM8,
- BFD_RELOC_CRX_NUM16,
- BFD_RELOC_CRX_NUM32,
- BFD_RELOC_CRX_IMM16,
- BFD_RELOC_CRX_IMM32,
- BFD_RELOC_CRX_SWITCH8,
- BFD_RELOC_CRX_SWITCH16,
- BFD_RELOC_CRX_SWITCH32,
-
-/* These relocs are only used within the CRIS assembler. They are not
-(at present) written to any object files. */
- BFD_RELOC_CRIS_BDISP8,
- BFD_RELOC_CRIS_UNSIGNED_5,
- BFD_RELOC_CRIS_SIGNED_6,
- BFD_RELOC_CRIS_UNSIGNED_6,
- BFD_RELOC_CRIS_SIGNED_8,
- BFD_RELOC_CRIS_UNSIGNED_8,
- BFD_RELOC_CRIS_SIGNED_16,
- BFD_RELOC_CRIS_UNSIGNED_16,
- BFD_RELOC_CRIS_LAPCQ_OFFSET,
- BFD_RELOC_CRIS_UNSIGNED_4,
-
-/* Relocs used in ELF shared libraries for CRIS. */
- BFD_RELOC_CRIS_COPY,
- BFD_RELOC_CRIS_GLOB_DAT,
- BFD_RELOC_CRIS_JUMP_SLOT,
- BFD_RELOC_CRIS_RELATIVE,
-
-/* 32-bit offset to symbol-entry within GOT. */
- BFD_RELOC_CRIS_32_GOT,
-
-/* 16-bit offset to symbol-entry within GOT. */
- BFD_RELOC_CRIS_16_GOT,
-
-/* 32-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_CRIS_32_GOTPLT,
-
-/* 16-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_CRIS_16_GOTPLT,
-
-/* 32-bit offset to symbol, relative to GOT. */
- BFD_RELOC_CRIS_32_GOTREL,
-
-/* 32-bit offset to symbol with PLT entry, relative to GOT. */
- BFD_RELOC_CRIS_32_PLT_GOTREL,
-
-/* 32-bit offset to symbol with PLT entry, relative to this relocation. */
- BFD_RELOC_CRIS_32_PLT_PCREL,
-
-/* Relocs used in TLS code for CRIS. */
- BFD_RELOC_CRIS_32_GOT_GD,
- BFD_RELOC_CRIS_16_GOT_GD,
- BFD_RELOC_CRIS_32_GD,
- BFD_RELOC_CRIS_DTP,
- BFD_RELOC_CRIS_32_DTPREL,
- BFD_RELOC_CRIS_16_DTPREL,
- BFD_RELOC_CRIS_32_GOT_TPREL,
- BFD_RELOC_CRIS_16_GOT_TPREL,
- BFD_RELOC_CRIS_32_TPREL,
- BFD_RELOC_CRIS_16_TPREL,
- BFD_RELOC_CRIS_DTPMOD,
- BFD_RELOC_CRIS_32_IE,
-
-/* OpenRISC 1000 Relocations. */
- BFD_RELOC_OR1K_REL_26,
- BFD_RELOC_OR1K_SLO16,
- BFD_RELOC_OR1K_PCREL_PG21,
- BFD_RELOC_OR1K_LO13,
- BFD_RELOC_OR1K_SLO13,
- BFD_RELOC_OR1K_GOTPC_HI16,
- BFD_RELOC_OR1K_GOTPC_LO16,
- BFD_RELOC_OR1K_GOT16,
- BFD_RELOC_OR1K_GOT_PG21,
- BFD_RELOC_OR1K_GOT_LO13,
- BFD_RELOC_OR1K_PLT26,
- BFD_RELOC_OR1K_PLTA26,
- BFD_RELOC_OR1K_GOTOFF_SLO16,
- BFD_RELOC_OR1K_COPY,
- BFD_RELOC_OR1K_GLOB_DAT,
- BFD_RELOC_OR1K_JMP_SLOT,
- BFD_RELOC_OR1K_RELATIVE,
- BFD_RELOC_OR1K_TLS_GD_HI16,
- BFD_RELOC_OR1K_TLS_GD_LO16,
- BFD_RELOC_OR1K_TLS_GD_PG21,
- BFD_RELOC_OR1K_TLS_GD_LO13,
- BFD_RELOC_OR1K_TLS_LDM_HI16,
- BFD_RELOC_OR1K_TLS_LDM_LO16,
- BFD_RELOC_OR1K_TLS_LDM_PG21,
- BFD_RELOC_OR1K_TLS_LDM_LO13,
- BFD_RELOC_OR1K_TLS_LDO_HI16,
- BFD_RELOC_OR1K_TLS_LDO_LO16,
- BFD_RELOC_OR1K_TLS_IE_HI16,
- BFD_RELOC_OR1K_TLS_IE_AHI16,
- BFD_RELOC_OR1K_TLS_IE_LO16,
- BFD_RELOC_OR1K_TLS_IE_PG21,
- BFD_RELOC_OR1K_TLS_IE_LO13,
- BFD_RELOC_OR1K_TLS_LE_HI16,
- BFD_RELOC_OR1K_TLS_LE_AHI16,
- BFD_RELOC_OR1K_TLS_LE_LO16,
- BFD_RELOC_OR1K_TLS_LE_SLO16,
- BFD_RELOC_OR1K_TLS_TPOFF,
- BFD_RELOC_OR1K_TLS_DTPOFF,
- BFD_RELOC_OR1K_TLS_DTPMOD,
-
-/* H8 elf Relocations. */
- BFD_RELOC_H8_DIR16A8,
- BFD_RELOC_H8_DIR16R8,
- BFD_RELOC_H8_DIR24A8,
- BFD_RELOC_H8_DIR24R8,
- BFD_RELOC_H8_DIR32A16,
- BFD_RELOC_H8_DISP32A16,
-
-/* Sony Xstormy16 Relocations. */
- BFD_RELOC_XSTORMY16_REL_12,
- BFD_RELOC_XSTORMY16_12,
- BFD_RELOC_XSTORMY16_24,
- BFD_RELOC_XSTORMY16_FPTR16,
-
-/* Self-describing complex relocations. */
- BFD_RELOC_RELC,
-
-
-/* Infineon Relocations. */
- BFD_RELOC_XC16X_PAG,
- BFD_RELOC_XC16X_POF,
- BFD_RELOC_XC16X_SEG,
- BFD_RELOC_XC16X_SOF,
-
-/* Relocations used by VAX ELF. */
- BFD_RELOC_VAX_GLOB_DAT,
- BFD_RELOC_VAX_JMP_SLOT,
- BFD_RELOC_VAX_RELATIVE,
-
-/* Morpho MT - 16 bit immediate relocation. */
- BFD_RELOC_MT_PC16,
-
-/* Morpho MT - Hi 16 bits of an address. */
- BFD_RELOC_MT_HI16,
-
-/* Morpho MT - Low 16 bits of an address. */
- BFD_RELOC_MT_LO16,
-
-/* Morpho MT - Used to tell the linker which vtable entries are used. */
- BFD_RELOC_MT_GNU_VTINHERIT,
-
-/* Morpho MT - Used to tell the linker which vtable entries are used. */
- BFD_RELOC_MT_GNU_VTENTRY,
-
-/* Morpho MT - 8 bit immediate relocation. */
- BFD_RELOC_MT_PCINSN8,
-
-/* msp430 specific relocation codes */
- BFD_RELOC_MSP430_10_PCREL,
- BFD_RELOC_MSP430_16_PCREL,
- BFD_RELOC_MSP430_16,
- BFD_RELOC_MSP430_16_PCREL_BYTE,
- BFD_RELOC_MSP430_16_BYTE,
- BFD_RELOC_MSP430_2X_PCREL,
- BFD_RELOC_MSP430_RL_PCREL,
- BFD_RELOC_MSP430_ABS8,
- BFD_RELOC_MSP430X_PCR20_EXT_SRC,
- BFD_RELOC_MSP430X_PCR20_EXT_DST,
- BFD_RELOC_MSP430X_PCR20_EXT_ODST,
- BFD_RELOC_MSP430X_ABS20_EXT_SRC,
- BFD_RELOC_MSP430X_ABS20_EXT_DST,
- BFD_RELOC_MSP430X_ABS20_EXT_ODST,
- BFD_RELOC_MSP430X_ABS20_ADR_SRC,
- BFD_RELOC_MSP430X_ABS20_ADR_DST,
- BFD_RELOC_MSP430X_PCR16,
- BFD_RELOC_MSP430X_PCR20_CALL,
- BFD_RELOC_MSP430X_ABS16,
- BFD_RELOC_MSP430_ABS_HI16,
- BFD_RELOC_MSP430_PREL31,
- BFD_RELOC_MSP430_SYM_DIFF,
-
-/* Relocations used by the Altera Nios II core. */
- BFD_RELOC_NIOS2_S16,
- BFD_RELOC_NIOS2_U16,
- BFD_RELOC_NIOS2_CALL26,
- BFD_RELOC_NIOS2_IMM5,
- BFD_RELOC_NIOS2_CACHE_OPX,
- BFD_RELOC_NIOS2_IMM6,
- BFD_RELOC_NIOS2_IMM8,
- BFD_RELOC_NIOS2_HI16,
- BFD_RELOC_NIOS2_LO16,
- BFD_RELOC_NIOS2_HIADJ16,
- BFD_RELOC_NIOS2_GPREL,
- BFD_RELOC_NIOS2_UJMP,
- BFD_RELOC_NIOS2_CJMP,
- BFD_RELOC_NIOS2_CALLR,
- BFD_RELOC_NIOS2_ALIGN,
- BFD_RELOC_NIOS2_GOT16,
- BFD_RELOC_NIOS2_CALL16,
- BFD_RELOC_NIOS2_GOTOFF_LO,
- BFD_RELOC_NIOS2_GOTOFF_HA,
- BFD_RELOC_NIOS2_PCREL_LO,
- BFD_RELOC_NIOS2_PCREL_HA,
- BFD_RELOC_NIOS2_TLS_GD16,
- BFD_RELOC_NIOS2_TLS_LDM16,
- BFD_RELOC_NIOS2_TLS_LDO16,
- BFD_RELOC_NIOS2_TLS_IE16,
- BFD_RELOC_NIOS2_TLS_LE16,
- BFD_RELOC_NIOS2_TLS_DTPMOD,
- BFD_RELOC_NIOS2_TLS_DTPREL,
- BFD_RELOC_NIOS2_TLS_TPREL,
- BFD_RELOC_NIOS2_COPY,
- BFD_RELOC_NIOS2_GLOB_DAT,
- BFD_RELOC_NIOS2_JUMP_SLOT,
- BFD_RELOC_NIOS2_RELATIVE,
- BFD_RELOC_NIOS2_GOTOFF,
- BFD_RELOC_NIOS2_CALL26_NOAT,
- BFD_RELOC_NIOS2_GOT_LO,
- BFD_RELOC_NIOS2_GOT_HA,
- BFD_RELOC_NIOS2_CALL_LO,
- BFD_RELOC_NIOS2_CALL_HA,
- BFD_RELOC_NIOS2_R2_S12,
- BFD_RELOC_NIOS2_R2_I10_1_PCREL,
- BFD_RELOC_NIOS2_R2_T1I7_1_PCREL,
- BFD_RELOC_NIOS2_R2_T1I7_2,
- BFD_RELOC_NIOS2_R2_T2I4,
- BFD_RELOC_NIOS2_R2_T2I4_1,
- BFD_RELOC_NIOS2_R2_T2I4_2,
- BFD_RELOC_NIOS2_R2_X1I7_2,
- BFD_RELOC_NIOS2_R2_X2L5,
- BFD_RELOC_NIOS2_R2_F1I5_2,
- BFD_RELOC_NIOS2_R2_L5I4X1,
- BFD_RELOC_NIOS2_R2_T1X1I6,
- BFD_RELOC_NIOS2_R2_T1X1I6_2,
-
-/* PRU LDI 16-bit unsigned data-memory relocation. */
- BFD_RELOC_PRU_U16,
-
-/* PRU LDI 16-bit unsigned instruction-memory relocation. */
- BFD_RELOC_PRU_U16_PMEMIMM,
-
-/* PRU relocation for two consecutive LDI load instructions that load a
-32 bit value into a register. If the higher bits are all zero, then
-the second instruction may be relaxed. */
- BFD_RELOC_PRU_LDI32,
-
-/* PRU QBBx 10-bit signed PC-relative relocation. */
- BFD_RELOC_PRU_S10_PCREL,
-
-/* PRU 8-bit unsigned relocation used for the LOOP instruction. */
- BFD_RELOC_PRU_U8_PCREL,
-
-/* PRU Program Memory relocations. Used to convert from byte addressing to
-32-bit word addressing. */
- BFD_RELOC_PRU_32_PMEM,
- BFD_RELOC_PRU_16_PMEM,
-
-/* PRU relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-second symbol so the linker can determine whether to adjust the field
-value. The PMEM variants encode the word difference, instead of byte
-difference between symbols. */
- BFD_RELOC_PRU_GNU_DIFF8,
- BFD_RELOC_PRU_GNU_DIFF16,
- BFD_RELOC_PRU_GNU_DIFF32,
- BFD_RELOC_PRU_GNU_DIFF16_PMEM,
- BFD_RELOC_PRU_GNU_DIFF32_PMEM,
-
-/* IQ2000 Relocations. */
- BFD_RELOC_IQ2000_OFFSET_16,
- BFD_RELOC_IQ2000_OFFSET_21,
- BFD_RELOC_IQ2000_UHI16,
-
-/* Special Xtensa relocation used only by PLT entries in ELF shared
-objects to indicate that the runtime linker should set the value
-to one of its own internal functions or data structures. */
- BFD_RELOC_XTENSA_RTLD,
-
-/* Xtensa relocations for ELF shared objects. */
- BFD_RELOC_XTENSA_GLOB_DAT,
- BFD_RELOC_XTENSA_JMP_SLOT,
- BFD_RELOC_XTENSA_RELATIVE,
-
-/* Xtensa relocation used in ELF object files for symbols that may require
-PLT entries. Otherwise, this is just a generic 32-bit relocation. */
- BFD_RELOC_XTENSA_PLT,
-
-/* Xtensa relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-first symbol so the linker can determine whether to adjust the field
-value. */
- BFD_RELOC_XTENSA_DIFF8,
- BFD_RELOC_XTENSA_DIFF16,
- BFD_RELOC_XTENSA_DIFF32,
-
-/* Generic Xtensa relocations for instruction operands. Only the slot
-number is encoded in the relocation. The relocation applies to the
-last PC-relative immediate operand, or if there are no PC-relative
-immediates, to the last immediate operand. */
- BFD_RELOC_XTENSA_SLOT0_OP,
- BFD_RELOC_XTENSA_SLOT1_OP,
- BFD_RELOC_XTENSA_SLOT2_OP,
- BFD_RELOC_XTENSA_SLOT3_OP,
- BFD_RELOC_XTENSA_SLOT4_OP,
- BFD_RELOC_XTENSA_SLOT5_OP,
- BFD_RELOC_XTENSA_SLOT6_OP,
- BFD_RELOC_XTENSA_SLOT7_OP,
- BFD_RELOC_XTENSA_SLOT8_OP,
- BFD_RELOC_XTENSA_SLOT9_OP,
- BFD_RELOC_XTENSA_SLOT10_OP,
- BFD_RELOC_XTENSA_SLOT11_OP,
- BFD_RELOC_XTENSA_SLOT12_OP,
- BFD_RELOC_XTENSA_SLOT13_OP,
- BFD_RELOC_XTENSA_SLOT14_OP,
-
-/* Alternate Xtensa relocations. Only the slot is encoded in the
-relocation. The meaning of these relocations is opcode-specific. */
- BFD_RELOC_XTENSA_SLOT0_ALT,
- BFD_RELOC_XTENSA_SLOT1_ALT,
- BFD_RELOC_XTENSA_SLOT2_ALT,
- BFD_RELOC_XTENSA_SLOT3_ALT,
- BFD_RELOC_XTENSA_SLOT4_ALT,
- BFD_RELOC_XTENSA_SLOT5_ALT,
- BFD_RELOC_XTENSA_SLOT6_ALT,
- BFD_RELOC_XTENSA_SLOT7_ALT,
- BFD_RELOC_XTENSA_SLOT8_ALT,
- BFD_RELOC_XTENSA_SLOT9_ALT,
- BFD_RELOC_XTENSA_SLOT10_ALT,
- BFD_RELOC_XTENSA_SLOT11_ALT,
- BFD_RELOC_XTENSA_SLOT12_ALT,
- BFD_RELOC_XTENSA_SLOT13_ALT,
- BFD_RELOC_XTENSA_SLOT14_ALT,
-
-/* Xtensa relocations for backward compatibility. These have all been
-replaced by BFD_RELOC_XTENSA_SLOT0_OP. */
- BFD_RELOC_XTENSA_OP0,
- BFD_RELOC_XTENSA_OP1,
- BFD_RELOC_XTENSA_OP2,
-
-/* Xtensa relocation to mark that the assembler expanded the
-instructions from an original target. The expansion size is
-encoded in the reloc size. */
- BFD_RELOC_XTENSA_ASM_EXPAND,
-
-/* Xtensa relocation to mark that the linker should simplify
-assembler-expanded instructions. This is commonly used
-internally by the linker after analysis of a
-BFD_RELOC_XTENSA_ASM_EXPAND. */
- BFD_RELOC_XTENSA_ASM_SIMPLIFY,
-
-/* Xtensa TLS relocations. */
- BFD_RELOC_XTENSA_TLSDESC_FN,
- BFD_RELOC_XTENSA_TLSDESC_ARG,
- BFD_RELOC_XTENSA_TLS_DTPOFF,
- BFD_RELOC_XTENSA_TLS_TPOFF,
- BFD_RELOC_XTENSA_TLS_FUNC,
- BFD_RELOC_XTENSA_TLS_ARG,
- BFD_RELOC_XTENSA_TLS_CALL,
-
-/* 8 bit signed offset in (ix+d) or (iy+d). */
- BFD_RELOC_Z80_DISP8,
-
-/* DJNZ offset. */
- BFD_RELOC_Z8K_DISP7,
-
-/* CALR offset. */
- BFD_RELOC_Z8K_CALLR,
-
-/* 4 bit value. */
- BFD_RELOC_Z8K_IMM4L,
-
-/* Lattice Mico32 relocations. */
- BFD_RELOC_LM32_CALL,
- BFD_RELOC_LM32_BRANCH,
- BFD_RELOC_LM32_16_GOT,
- BFD_RELOC_LM32_GOTOFF_HI16,
- BFD_RELOC_LM32_GOTOFF_LO16,
- BFD_RELOC_LM32_COPY,
- BFD_RELOC_LM32_GLOB_DAT,
- BFD_RELOC_LM32_JMP_SLOT,
- BFD_RELOC_LM32_RELATIVE,
-
-/* Difference between two section addreses. Must be followed by a
-BFD_RELOC_MACH_O_PAIR. */
- BFD_RELOC_MACH_O_SECTDIFF,
-
-/* Like BFD_RELOC_MACH_O_SECTDIFF but with a local symbol. */
- BFD_RELOC_MACH_O_LOCAL_SECTDIFF,
-
-/* Pair of relocation. Contains the first symbol. */
- BFD_RELOC_MACH_O_PAIR,
-
-/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */
- BFD_RELOC_MACH_O_SUBTRACTOR32,
-
-/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */
- BFD_RELOC_MACH_O_SUBTRACTOR64,
-
-/* PCREL relocations. They are marked as branch to create PLT entry if
-required. */
- BFD_RELOC_MACH_O_X86_64_BRANCH32,
- BFD_RELOC_MACH_O_X86_64_BRANCH8,
-
-/* Used when referencing a GOT entry. */
- BFD_RELOC_MACH_O_X86_64_GOT,
-
-/* Used when loading a GOT entry with movq. It is specially marked so that
-the linker could optimize the movq to a leaq if possible. */
- BFD_RELOC_MACH_O_X86_64_GOT_LOAD,
-
-/* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */
- BFD_RELOC_MACH_O_X86_64_PCREL32_1,
-
-/* Same as BFD_RELOC_32_PCREL but with an implicit -2 addend. */
- BFD_RELOC_MACH_O_X86_64_PCREL32_2,
-
-/* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */
- BFD_RELOC_MACH_O_X86_64_PCREL32_4,
-
-/* Used when referencing a TLV entry. */
- BFD_RELOC_MACH_O_X86_64_TLV,
-
-/* Addend for PAGE or PAGEOFF. */
- BFD_RELOC_MACH_O_ARM64_ADDEND,
-
-/* Relative offset to page of GOT slot. */
- BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21,
-
-/* Relative offset within page of GOT slot. */
- BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12,
-
-/* Address of a GOT entry. */
- BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT,
-
-/* This is a 32 bit reloc for the microblaze that stores the
-low 16 bits of a value */
- BFD_RELOC_MICROBLAZE_32_LO,
-
-/* This is a 32 bit pc-relative reloc for the microblaze that
-stores the low 16 bits of a value */
- BFD_RELOC_MICROBLAZE_32_LO_PCREL,
-
-/* This is a 32 bit reloc for the microblaze that stores a
-value relative to the read-only small data area anchor */
- BFD_RELOC_MICROBLAZE_32_ROSDA,
-
-/* This is a 32 bit reloc for the microblaze that stores a
-value relative to the read-write small data area anchor */
- BFD_RELOC_MICROBLAZE_32_RWSDA,
-
-/* This is a 32 bit reloc for the microblaze to handle
-expressions of the form "Symbol Op Symbol" */
- BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). No relocation is
-done here - only used for relaxing */
- BFD_RELOC_MICROBLAZE_64_NONE,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-PC-relative GOT offset */
- BFD_RELOC_MICROBLAZE_64_GOTPC,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-GOT offset */
- BFD_RELOC_MICROBLAZE_64_GOT,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-PC-relative offset into PLT */
- BFD_RELOC_MICROBLAZE_64_PLT,
-
-/* This is a 64 bit reloc that stores the 32 bit GOT relative
-value in two words (with an imm instruction). The relocation is
-relative offset from _GLOBAL_OFFSET_TABLE_ */
- BFD_RELOC_MICROBLAZE_64_GOTOFF,
-
-/* This is a 32 bit reloc that stores the 32 bit GOT relative
-value in a word. The relocation is relative offset from */
- BFD_RELOC_MICROBLAZE_32_GOTOFF,
-
-/* This is used to tell the dynamic linker to copy the value out of
-the dynamic object into the runtime process image. */
- BFD_RELOC_MICROBLAZE_COPY,
-
-/* Unused Reloc */
- BFD_RELOC_MICROBLAZE_64_TLS,
-
-/* This is a 64 bit reloc that stores the 32 bit GOT relative value
-of the GOT TLS GD info entry in two words (with an imm instruction). The
-relocation is GOT offset. */
- BFD_RELOC_MICROBLAZE_64_TLSGD,
-
-/* This is a 64 bit reloc that stores the 32 bit GOT relative value
-of the GOT TLS LD info entry in two words (with an imm instruction). The
-relocation is GOT offset. */
- BFD_RELOC_MICROBLAZE_64_TLSLD,
-
-/* This is a 32 bit reloc that stores the Module ID to GOT(n). */
- BFD_RELOC_MICROBLAZE_32_TLSDTPMOD,
-
-/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */
- BFD_RELOC_MICROBLAZE_32_TLSDTPREL,
-
-/* This is a 32 bit reloc for storing TLS offset to two words (uses imm
-instruction) */
- BFD_RELOC_MICROBLAZE_64_TLSDTPREL,
-
-/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
-to two words (uses imm instruction). */
- BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL,
-
-/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
-to two words (uses imm instruction). */
- BFD_RELOC_MICROBLAZE_64_TLSTPREL,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-PC-relative offset from start of TEXT. */
- BFD_RELOC_MICROBLAZE_64_TEXTPCREL,
-
-/* This is a 64 bit reloc that stores the 32 bit offset
-value in two words (with an imm instruction). The relocation is
-relative offset from start of TEXT. */
- BFD_RELOC_MICROBLAZE_64_TEXTREL,
-
-/* AArch64 pseudo relocation code to mark the start of the AArch64
-relocation enumerators. N.B. the order of the enumerators is
-important as several tables in the AArch64 bfd backend are indexed
-by these enumerators; make sure they are all synced. */
- BFD_RELOC_AARCH64_RELOC_START,
-
-/* Deprecated AArch64 null relocation code. */
- BFD_RELOC_AARCH64_NULL,
-
-/* AArch64 null relocation code. */
- BFD_RELOC_AARCH64_NONE,
-
-/* Basic absolute relocations of N bits. These are equivalent to
-BFD_RELOC_N and they were added to assist the indexing of the howto
-table. */
- BFD_RELOC_AARCH64_64,
- BFD_RELOC_AARCH64_32,
- BFD_RELOC_AARCH64_16,
-
-/* PC-relative relocations. These are equivalent to BFD_RELOC_N_PCREL
-and they were added to assist the indexing of the howto table. */
- BFD_RELOC_AARCH64_64_PCREL,
- BFD_RELOC_AARCH64_32_PCREL,
- BFD_RELOC_AARCH64_16_PCREL,
-
-/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15
-of an unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G0,
-
-/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of
-an address/value. No overflow checking. */
- BFD_RELOC_AARCH64_MOVW_G0_NC,
-
-/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31
-of an unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G1,
-
-/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31
-of an address/value. No overflow checking. */
- BFD_RELOC_AARCH64_MOVW_G1_NC,
-
-/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47
-of an unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G2,
-
-/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47
-of an address/value. No overflow checking. */
- BFD_RELOC_AARCH64_MOVW_G2_NC,
-
-/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64
-of a signed or unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G3,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_G0_S,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 16 to 31
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_G1_S,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 32 to 47
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_G2_S,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_PREL_G0,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
-
-/* AArch64 MOVK instruction with most significant bits 16 to 31
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G1,
-
-/* AArch64 MOVK instruction with most significant bits 16 to 31
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
-
-/* AArch64 MOVK instruction with most significant bits 32 to 47
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G2,
-
-/* AArch64 MOVK instruction with most significant bits 32 to 47
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
-
-/* AArch64 MOVK instruction with most significant bits 47 to 63
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G3,
-
-/* AArch64 Load Literal instruction, holding a 19 bit pc-relative word
-offset. The lowest two bits must be zero and are not stored in the
-instruction, giving a 21 bit signed byte offset. */
- BFD_RELOC_AARCH64_LD_LO19_PCREL,
-
-/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */
- BFD_RELOC_AARCH64_ADR_LO21_PCREL,
-
-/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
-offset, giving a 4KB aligned page base address. */
- BFD_RELOC_AARCH64_ADR_HI21_PCREL,
-
-/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
-offset, giving a 4KB aligned page base address, but with no overflow
-checking. */
- BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL,
-
-/* AArch64 ADD immediate instruction, holding bits 0 to 11 of the address.
-Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_ADD_LO12,
-
-/* AArch64 8-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST8_LO12,
-
-/* AArch64 14 bit pc-relative test bit and branch.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 16 bit signed byte offset. */
- BFD_RELOC_AARCH64_TSTBR14,
-
-/* AArch64 19 bit pc-relative conditional branch and compare & branch.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 21 bit signed byte offset. */
- BFD_RELOC_AARCH64_BRANCH19,
-
-/* AArch64 26 bit pc-relative unconditional branch.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 28 bit signed byte offset. */
- BFD_RELOC_AARCH64_JUMP26,
-
-/* AArch64 26 bit pc-relative unconditional branch and link.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 28 bit signed byte offset. */
- BFD_RELOC_AARCH64_CALL26,
-
-/* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST16_LO12,
-
-/* AArch64 32-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST32_LO12,
-
-/* AArch64 64-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST64_LO12,
-
-/* AArch64 128-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST128_LO12,
-
-/* AArch64 Load Literal instruction, holding a 19 bit PC relative word
-offset of the global offset table entry for a symbol. The lowest two
-bits must be zero and are not stored in the instruction, giving a 21
-bit signed byte offset. This relocation type requires signed overflow
-checking. */
- BFD_RELOC_AARCH64_GOT_LD_PREL19,
-
-/* Get to the page base of the global offset table entry for a symbol as
-part of an ADRP instruction using a 21 bit PC relative value.Used in
-conjunction with BFD_RELOC_AARCH64_LD64_GOT_LO12_NC. */
- BFD_RELOC_AARCH64_ADR_GOT_PAGE,
-
-/* Unsigned 12 bit byte offset for 64 bit load/store from the page of
-the GOT entry for this symbol. Used in conjunction with
-BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_LD64_GOT_LO12_NC,
-
-/* Unsigned 12 bit byte offset for 32 bit load/store from the page of
-the GOT entry for this symbol. Used in conjunction with
-BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in ILP32 ABI only. */
- BFD_RELOC_AARCH64_LD32_GOT_LO12_NC,
-
-/* Unsigned 16 bit byte offset for 64 bit load/store from the GOT entry
-for this symbol. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
-
-/* Unsigned 16 bit byte higher offset for 64 bit load/store from the GOT entry
-for this symbol. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_MOVW_GOTOFF_G1,
-
-/* Unsigned 15 bit byte offset for 64 bit load/store from the page of
-the GOT entry for this symbol. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_LD64_GOTOFF_LO15,
-
-/* Scaled 14 bit byte offset to the page base of the global offset table. */
- BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14,
-
-/* Scaled 15 bit byte offset to the page base of the global offset table. */
- BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15,
-
-/* Get to the page base of the global offset table entry for a symbols
-tls_index structure as part of an adrp instruction using a 21 bit PC
-relative value. Used in conjunction with
-BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */
- BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21,
-
-/* AArch64 TLS General Dynamic */
- BFD_RELOC_AARCH64_TLSGD_ADR_PREL21,
-
-/* Unsigned 12 bit byte offset to global offset table entry for a symbols
-tls_index structure. Used in conjunction with
-BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21. */
- BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC,
-
-/* AArch64 TLS General Dynamic relocation. */
- BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC,
-
-/* AArch64 TLS General Dynamic relocation. */
- BFD_RELOC_AARCH64_TLSGD_MOVW_G1,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1,
-
-/* bit[23:12] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
-
-/* Unsigned 12 bit byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12,
-
-/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */
- BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC,
-
-/* Unsigned 12 bit byte offset to global offset table entry for a symbols
-tls_index structure. Used in conjunction with
-BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21. */
- BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC,
-
-/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP
-instruction. */
- BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21,
-
-/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */
- BFD_RELOC_AARCH64_TLSLD_ADR_PREL21,
-
-/* bit[11:1] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
-
-/* bit[11:2] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
-
-/* bit[11:3] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
-
-/* bit[11:0] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
-
-/* bit[15:0] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
-
-/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
-
-/* bit[31:16] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
-
-/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
-
-/* bit[47:32] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC,
-
-/* bit[11:1] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
-
-/* bit[11:2] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
-
-/* bit[11:3] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
-
-/* bit[11:0] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LD_PREL19,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LD64_LO12,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADD_LO12,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_OFF_G1,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LDR,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADD,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_CALL,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_COPY,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_GLOB_DAT,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_JUMP_SLOT,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_RELATIVE,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLS_DTPMOD,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLS_DTPREL,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLS_TPREL,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLSDESC,
-
-/* AArch64 support for STT_GNU_IFUNC. */
- BFD_RELOC_AARCH64_IRELATIVE,
-
-/* AArch64 pseudo relocation code to mark the end of the AArch64
-relocation enumerators that have direct mapping to ELF reloc codes.
-There are a few more enumerators after this one; those are mainly
-used by the AArch64 assembler for the internal fixup or to select
-one of the above enumerators. */
- BFD_RELOC_AARCH64_RELOC_END,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP,
-
-/* AArch64 unspecified load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST_LO12,
-
-/* AArch64 pseudo relocation code for TLS local dynamic mode. It's to be
-used internally by the AArch64 assembler and not (currently) written to
-any object files. */
- BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC,
-
-/* AArch64 pseudo relocation code for TLS local exec mode. It's to be
-used internally by the AArch64 assembler and not (currently) written to
-any object files. */
- BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_LD_GOT_LO12_NC,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC,
-
-/* Tilera TILEPro Relocations. */
- BFD_RELOC_TILEPRO_COPY,
- BFD_RELOC_TILEPRO_GLOB_DAT,
- BFD_RELOC_TILEPRO_JMP_SLOT,
- BFD_RELOC_TILEPRO_RELATIVE,
- BFD_RELOC_TILEPRO_BROFF_X1,
- BFD_RELOC_TILEPRO_JOFFLONG_X1,
- BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT,
- BFD_RELOC_TILEPRO_IMM8_X0,
- BFD_RELOC_TILEPRO_IMM8_Y0,
- BFD_RELOC_TILEPRO_IMM8_X1,
- BFD_RELOC_TILEPRO_IMM8_Y1,
- BFD_RELOC_TILEPRO_DEST_IMM8_X1,
- BFD_RELOC_TILEPRO_MT_IMM15_X1,
- BFD_RELOC_TILEPRO_MF_IMM15_X1,
- BFD_RELOC_TILEPRO_IMM16_X0,
- BFD_RELOC_TILEPRO_IMM16_X1,
- BFD_RELOC_TILEPRO_IMM16_X0_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_HA,
- BFD_RELOC_TILEPRO_IMM16_X0_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA,
- BFD_RELOC_TILEPRO_MMSTART_X0,
- BFD_RELOC_TILEPRO_MMEND_X0,
- BFD_RELOC_TILEPRO_MMSTART_X1,
- BFD_RELOC_TILEPRO_MMEND_X1,
- BFD_RELOC_TILEPRO_SHAMT_X0,
- BFD_RELOC_TILEPRO_SHAMT_X1,
- BFD_RELOC_TILEPRO_SHAMT_Y0,
- BFD_RELOC_TILEPRO_SHAMT_Y1,
- BFD_RELOC_TILEPRO_TLS_GD_CALL,
- BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_TLS_IE_LOAD,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA,
- BFD_RELOC_TILEPRO_TLS_DTPMOD32,
- BFD_RELOC_TILEPRO_TLS_DTPOFF32,
- BFD_RELOC_TILEPRO_TLS_TPOFF32,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
-
-/* Tilera TILE-Gx Relocations. */
- BFD_RELOC_TILEGX_HW0,
- BFD_RELOC_TILEGX_HW1,
- BFD_RELOC_TILEGX_HW2,
- BFD_RELOC_TILEGX_HW3,
- BFD_RELOC_TILEGX_HW0_LAST,
- BFD_RELOC_TILEGX_HW1_LAST,
- BFD_RELOC_TILEGX_HW2_LAST,
- BFD_RELOC_TILEGX_COPY,
- BFD_RELOC_TILEGX_GLOB_DAT,
- BFD_RELOC_TILEGX_JMP_SLOT,
- BFD_RELOC_TILEGX_RELATIVE,
- BFD_RELOC_TILEGX_BROFF_X1,
- BFD_RELOC_TILEGX_JUMPOFF_X1,
- BFD_RELOC_TILEGX_JUMPOFF_X1_PLT,
- BFD_RELOC_TILEGX_IMM8_X0,
- BFD_RELOC_TILEGX_IMM8_Y0,
- BFD_RELOC_TILEGX_IMM8_X1,
- BFD_RELOC_TILEGX_IMM8_Y1,
- BFD_RELOC_TILEGX_DEST_IMM8_X1,
- BFD_RELOC_TILEGX_MT_IMM14_X1,
- BFD_RELOC_TILEGX_MF_IMM14_X1,
- BFD_RELOC_TILEGX_MMSTART_X0,
- BFD_RELOC_TILEGX_MMEND_X0,
- BFD_RELOC_TILEGX_SHAMT_X0,
- BFD_RELOC_TILEGX_SHAMT_X1,
- BFD_RELOC_TILEGX_SHAMT_Y0,
- BFD_RELOC_TILEGX_SHAMT_Y1,
- BFD_RELOC_TILEGX_IMM16_X0_HW0,
- BFD_RELOC_TILEGX_IMM16_X1_HW0,
- BFD_RELOC_TILEGX_IMM16_X0_HW1,
- BFD_RELOC_TILEGX_IMM16_X1_HW1,
- BFD_RELOC_TILEGX_IMM16_X0_HW2,
- BFD_RELOC_TILEGX_IMM16_X1_HW2,
- BFD_RELOC_TILEGX_IMM16_X0_HW3,
- BFD_RELOC_TILEGX_IMM16_X1_HW3,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE,
- BFD_RELOC_TILEGX_TLS_DTPMOD64,
- BFD_RELOC_TILEGX_TLS_DTPOFF64,
- BFD_RELOC_TILEGX_TLS_TPOFF64,
- BFD_RELOC_TILEGX_TLS_DTPMOD32,
- BFD_RELOC_TILEGX_TLS_DTPOFF32,
- BFD_RELOC_TILEGX_TLS_TPOFF32,
- BFD_RELOC_TILEGX_TLS_GD_CALL,
- BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
- BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
- BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
- BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD,
- BFD_RELOC_TILEGX_TLS_IE_LOAD,
- BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
- BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
- BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD,
- BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD,
-
-/* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */
- BFD_RELOC_EPIPHANY_SIMM8,
-
-/* Adapteva EPIPHANY - 24 bit signed pc-relative displacement */
- BFD_RELOC_EPIPHANY_SIMM24,
-
-/* Adapteva EPIPHANY - 16 most-significant bits of absolute address */
- BFD_RELOC_EPIPHANY_HIGH,
-
-/* Adapteva EPIPHANY - 16 least-significant bits of absolute address */
- BFD_RELOC_EPIPHANY_LOW,
-
-/* Adapteva EPIPHANY - 11 bit signed number - add/sub immediate */
- BFD_RELOC_EPIPHANY_SIMM11,
-
-/* Adapteva EPIPHANY - 11 bit sign-magnitude number (ld/st displacement) */
- BFD_RELOC_EPIPHANY_IMM11,
-
-/* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */
- BFD_RELOC_EPIPHANY_IMM8,
-
-/* Visium Relocations. */
- BFD_RELOC_VISIUM_HI16,
- BFD_RELOC_VISIUM_LO16,
- BFD_RELOC_VISIUM_IM16,
- BFD_RELOC_VISIUM_REL16,
- BFD_RELOC_VISIUM_HI16_PCREL,
- BFD_RELOC_VISIUM_LO16_PCREL,
- BFD_RELOC_VISIUM_IM16_PCREL,
-
-/* WebAssembly relocations. */
- BFD_RELOC_WASM32_LEB128,
- BFD_RELOC_WASM32_LEB128_GOT,
- BFD_RELOC_WASM32_LEB128_GOT_CODE,
- BFD_RELOC_WASM32_LEB128_PLT,
- BFD_RELOC_WASM32_PLT_INDEX,
- BFD_RELOC_WASM32_ABS32_CODE,
- BFD_RELOC_WASM32_COPY,
- BFD_RELOC_WASM32_CODE_POINTER,
- BFD_RELOC_WASM32_INDEX,
- BFD_RELOC_WASM32_PLT_SIG,
-
-/* C-SKY relocations. */
- BFD_RELOC_CKCORE_NONE,
- BFD_RELOC_CKCORE_ADDR32,
- BFD_RELOC_CKCORE_PCREL_IMM8BY4,
- BFD_RELOC_CKCORE_PCREL_IMM11BY2,
- BFD_RELOC_CKCORE_PCREL_IMM4BY2,
- BFD_RELOC_CKCORE_PCREL32,
- BFD_RELOC_CKCORE_PCREL_JSR_IMM11BY2,
- BFD_RELOC_CKCORE_GNU_VTINHERIT,
- BFD_RELOC_CKCORE_GNU_VTENTRY,
- BFD_RELOC_CKCORE_RELATIVE,
- BFD_RELOC_CKCORE_COPY,
- BFD_RELOC_CKCORE_GLOB_DAT,
- BFD_RELOC_CKCORE_JUMP_SLOT,
- BFD_RELOC_CKCORE_GOTOFF,
- BFD_RELOC_CKCORE_GOTPC,
- BFD_RELOC_CKCORE_GOT32,
- BFD_RELOC_CKCORE_PLT32,
- BFD_RELOC_CKCORE_ADDRGOT,
- BFD_RELOC_CKCORE_ADDRPLT,
- BFD_RELOC_CKCORE_PCREL_IMM26BY2,
- BFD_RELOC_CKCORE_PCREL_IMM16BY2,
- BFD_RELOC_CKCORE_PCREL_IMM16BY4,
- BFD_RELOC_CKCORE_PCREL_IMM10BY2,
- BFD_RELOC_CKCORE_PCREL_IMM10BY4,
- BFD_RELOC_CKCORE_ADDR_HI16,
- BFD_RELOC_CKCORE_ADDR_LO16,
- BFD_RELOC_CKCORE_GOTPC_HI16,
- BFD_RELOC_CKCORE_GOTPC_LO16,
- BFD_RELOC_CKCORE_GOTOFF_HI16,
- BFD_RELOC_CKCORE_GOTOFF_LO16,
- BFD_RELOC_CKCORE_GOT12,
- BFD_RELOC_CKCORE_GOT_HI16,
- BFD_RELOC_CKCORE_GOT_LO16,
- BFD_RELOC_CKCORE_PLT12,
- BFD_RELOC_CKCORE_PLT_HI16,
- BFD_RELOC_CKCORE_PLT_LO16,
- BFD_RELOC_CKCORE_ADDRGOT_HI16,
- BFD_RELOC_CKCORE_ADDRGOT_LO16,
- BFD_RELOC_CKCORE_ADDRPLT_HI16,
- BFD_RELOC_CKCORE_ADDRPLT_LO16,
- BFD_RELOC_CKCORE_PCREL_JSR_IMM26BY2,
- BFD_RELOC_CKCORE_TOFFSET_LO16,
- BFD_RELOC_CKCORE_DOFFSET_LO16,
- BFD_RELOC_CKCORE_PCREL_IMM18BY2,
- BFD_RELOC_CKCORE_DOFFSET_IMM18,
- BFD_RELOC_CKCORE_DOFFSET_IMM18BY2,
- BFD_RELOC_CKCORE_DOFFSET_IMM18BY4,
- BFD_RELOC_CKCORE_GOTOFF_IMM18,
- BFD_RELOC_CKCORE_GOT_IMM18BY4,
- BFD_RELOC_CKCORE_PLT_IMM18BY4,
- BFD_RELOC_CKCORE_PCREL_IMM7BY4,
- BFD_RELOC_CKCORE_TLS_LE32,
- BFD_RELOC_CKCORE_TLS_IE32,
- BFD_RELOC_CKCORE_TLS_GD32,
- BFD_RELOC_CKCORE_TLS_LDM32,
- BFD_RELOC_CKCORE_TLS_LDO32,
- BFD_RELOC_CKCORE_TLS_DTPMOD32,
- BFD_RELOC_CKCORE_TLS_DTPOFF32,
- BFD_RELOC_CKCORE_TLS_TPOFF32,
- BFD_RELOC_CKCORE_PCREL_FLRW_IMM8BY4,
- BFD_RELOC_CKCORE_NOJSRI,
- BFD_RELOC_CKCORE_CALLGRAPH,
- BFD_RELOC_CKCORE_IRELATIVE,
- BFD_RELOC_CKCORE_PCREL_BLOOP_IMM4BY4,
- BFD_RELOC_CKCORE_PCREL_BLOOP_IMM12BY4,
-
-/* S12Z relocations. */
- BFD_RELOC_S12Z_OPR,
- BFD_RELOC_UNUSED };
-
-typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
-reloc_howto_type *bfd_reloc_type_lookup
- (bfd *abfd, bfd_reloc_code_real_type code);
-reloc_howto_type *bfd_reloc_name_lookup
- (bfd *abfd, const char *reloc_name);
-
-const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
-
-/* Extracted from syms.c. */
-
-typedef struct bfd_symbol
-{
- /* A pointer to the BFD which owns the symbol. This information
- is necessary so that a back end can work out what additional
- information (invisible to the application writer) is carried
- with the symbol.
-
- This field is *almost* redundant, since you can use section->owner
- instead, except that some symbols point to the global sections
- bfd_{abs,com,und}_section. This could be fixed by making
- these globals be per-bfd (or per-target-flavor). FIXME. */
- struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
-
- /* The text of the symbol. The name is left alone, and not copied; the
- application may not alter it. */
- const char *name;
-
- /* The value of the symbol. This really should be a union of a
- numeric value with a pointer, since some flags indicate that
- a pointer to another symbol is stored here. */
- symvalue value;
-
- /* Attributes of a symbol. */
-#define BSF_NO_FLAGS 0
-
- /* The symbol has local scope; <> in <>. The value
- is the offset into the section of the data. */
-#define BSF_LOCAL (1 << 0)
-
- /* The symbol has global scope; initialized data in <>. The
- value is the offset into the section of the data. */
-#define BSF_GLOBAL (1 << 1)
-
- /* The symbol has global scope and is exported. The value is
- the offset into the section of the data. */
-#define BSF_EXPORT BSF_GLOBAL /* No real difference. */
-
- /* A normal C symbol would be one of:
- <>, <> or <>. */
-
- /* The symbol is a debugging record. The value has an arbitrary
- meaning, unless BSF_DEBUGGING_RELOC is also set. */
-#define BSF_DEBUGGING (1 << 2)
-
- /* The symbol denotes a function entry point. Used in ELF,
- perhaps others someday. */
-#define BSF_FUNCTION (1 << 3)
-
- /* Used by the linker. */
-#define BSF_KEEP (1 << 5)
-
- /* An ELF common symbol. */
-#define BSF_ELF_COMMON (1 << 6)
-
- /* A weak global symbol, overridable without warnings by
- a regular global symbol of the same name. */
-#define BSF_WEAK (1 << 7)
-
- /* This symbol was created to point to a section, e.g. ELF's
- STT_SECTION symbols. */
-#define BSF_SECTION_SYM (1 << 8)
-
- /* The symbol used to be a common symbol, but now it is
- allocated. */
-#define BSF_OLD_COMMON (1 << 9)
-
- /* In some files the type of a symbol sometimes alters its
- location in an output file - ie in coff a <> symbol
- which is also <> symbol appears where it was
- declared and not at the end of a section. This bit is set
- by the target BFD part to convey this information. */
-#define BSF_NOT_AT_END (1 << 10)
-
- /* Signal that the symbol is the label of constructor section. */
-#define BSF_CONSTRUCTOR (1 << 11)
-
- /* Signal that the symbol is a warning symbol. The name is a
- warning. The name of the next symbol is the one to warn about;
- if a reference is made to a symbol with the same name as the next
- symbol, a warning is issued by the linker. */
-#define BSF_WARNING (1 << 12)
-
- /* Signal that the symbol is indirect. This symbol is an indirect
- pointer to the symbol with the same name as the next symbol. */
-#define BSF_INDIRECT (1 << 13)
-
- /* BSF_FILE marks symbols that contain a file name. This is used
- for ELF STT_FILE symbols. */
-#define BSF_FILE (1 << 14)
-
- /* Symbol is from dynamic linking information. */
-#define BSF_DYNAMIC (1 << 15)
-
- /* The symbol denotes a data object. Used in ELF, and perhaps
- others someday. */
-#define BSF_OBJECT (1 << 16)
-
- /* This symbol is a debugging symbol. The value is the offset
- into the section of the data. BSF_DEBUGGING should be set
- as well. */
-#define BSF_DEBUGGING_RELOC (1 << 17)
-
- /* This symbol is thread local. Used in ELF. */
-#define BSF_THREAD_LOCAL (1 << 18)
-
- /* This symbol represents a complex relocation expression,
- with the expression tree serialized in the symbol name. */
-#define BSF_RELC (1 << 19)
-
- /* This symbol represents a signed complex relocation expression,
- with the expression tree serialized in the symbol name. */
-#define BSF_SRELC (1 << 20)
-
- /* This symbol was created by bfd_get_synthetic_symtab. */
-#define BSF_SYNTHETIC (1 << 21)
-
- /* This symbol is an indirect code object. Unrelated to BSF_INDIRECT.
- The dynamic linker will compute the value of this symbol by
- calling the function that it points to. BSF_FUNCTION must
- also be also set. */
-#define BSF_GNU_INDIRECT_FUNCTION (1 << 22)
- /* This symbol is a globally unique data object. The dynamic linker
- will make sure that in the entire process there is just one symbol
- with this name and type in use. BSF_OBJECT must also be set. */
-#define BSF_GNU_UNIQUE (1 << 23)
-
- flagword flags;
-
- /* A pointer to the section to which this symbol is
- relative. This will always be non NULL, there are special
- sections for undefined and absolute symbols. */
- struct bfd_section *section;
-
- /* Back end special data. */
- union
- {
- void *p;
- bfd_vma i;
- }
- udata;
-}
-asymbol;
-
-#define bfd_get_symtab_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
-
-bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
-
-bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
-
-#define bfd_is_local_label_name(abfd, name) \
- BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
-
-bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
-
-#define bfd_is_target_special_symbol(abfd, sym) \
- BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
-
-#define bfd_canonicalize_symtab(abfd, location) \
- BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
-
-bfd_boolean bfd_set_symtab
- (bfd *abfd, asymbol **location, unsigned int count);
-
-void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
-
-#define bfd_make_empty_symbol(abfd) \
- BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
-
-asymbol *_bfd_generic_make_empty_symbol (bfd *);
-
-#define bfd_make_debug_symbol(abfd,ptr,size) \
- BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
-
-int bfd_decode_symclass (asymbol *symbol);
-
-bfd_boolean bfd_is_undefined_symclass (int symclass);
-
-void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
-
-bfd_boolean bfd_copy_private_symbol_data
- (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
-
-#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
- BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
- (ibfd, isymbol, obfd, osymbol))
-
-/* Extracted from bfd.c. */
-
-enum bfd_direction
- {
- no_direction = 0,
- read_direction = 1,
- write_direction = 2,
- both_direction = 3
- };
-
-enum bfd_plugin_format
- {
- bfd_plugin_unknown = 0,
- bfd_plugin_yes = 1,
- bfd_plugin_no = 2
- };
-
-struct bfd_build_id
- {
- bfd_size_type size;
- bfd_byte data[1];
- };
-
-struct bfd
-{
- /* The filename the application opened the BFD with. */
- const char *filename;
-
- /* A pointer to the target jump table. */
- const struct bfd_target *xvec;
-
- /* The IOSTREAM, and corresponding IO vector that provide access
- to the file backing the BFD. */
- void *iostream;
- const struct bfd_iovec *iovec;
-
- /* The caching routines use these to maintain a
- least-recently-used list of BFDs. */
- struct bfd *lru_prev, *lru_next;
-
- /* Track current file position (or current buffer offset for
- in-memory BFDs). When a file is closed by the caching routines,
- BFD retains state information on the file here. */
- ufile_ptr where;
-
- /* File modified time, if mtime_set is TRUE. */
- long mtime;
-
- /* A unique identifier of the BFD */
- unsigned int id;
-
- /* The format which belongs to the BFD. (object, core, etc.) */
- ENUM_BITFIELD (bfd_format) format : 3;
-
- /* The direction with which the BFD was opened. */
- ENUM_BITFIELD (bfd_direction) direction : 2;
-
- /* Format_specific flags. */
- flagword flags : 20;
-
- /* Values that may appear in the flags field of a BFD. These also
- appear in the object_flags field of the bfd_target structure, where
- they indicate the set of flags used by that backend (not all flags
- are meaningful for all object file formats) (FIXME: at the moment,
- the object_flags values have mostly just been copied from backend
- to another, and are not necessarily correct). */
-
-#define BFD_NO_FLAGS 0x0
-
- /* BFD contains relocation entries. */
-#define HAS_RELOC 0x1
-
- /* BFD is directly executable. */
-#define EXEC_P 0x2
-
- /* BFD has line number information (basically used for F_LNNO in a
- COFF header). */
-#define HAS_LINENO 0x4
-
- /* BFD has debugging information. */
-#define HAS_DEBUG 0x08
-
- /* BFD has symbols. */
-#define HAS_SYMS 0x10
-
- /* BFD has local symbols (basically used for F_LSYMS in a COFF
- header). */
-#define HAS_LOCALS 0x20
-
- /* BFD is a dynamic object. */
-#define DYNAMIC 0x40
-
- /* Text section is write protected (if D_PAGED is not set, this is
- like an a.out NMAGIC file) (the linker sets this by default, but
- clears it for -r or -N). */
-#define WP_TEXT 0x80
-
- /* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the
- linker sets this by default, but clears it for -r or -n or -N). */
-#define D_PAGED 0x100
-
- /* BFD is relaxable (this means that bfd_relax_section may be able to
- do something) (sometimes bfd_relax_section can do something even if
- this is not set). */
-#define BFD_IS_RELAXABLE 0x200
-
- /* This may be set before writing out a BFD to request using a
- traditional format. For example, this is used to request that when
- writing out an a.out object the symbols not be hashed to eliminate
- duplicates. */
-#define BFD_TRADITIONAL_FORMAT 0x400
-
- /* This flag indicates that the BFD contents are actually cached
- in memory. If this is set, iostream points to a bfd_in_memory
- struct. */
-#define BFD_IN_MEMORY 0x800
-
- /* This BFD has been created by the linker and doesn't correspond
- to any input file. */
-#define BFD_LINKER_CREATED 0x1000
-
- /* This may be set before writing out a BFD to request that it
- be written using values for UIDs, GIDs, timestamps, etc. that
- will be consistent from run to run. */
-#define BFD_DETERMINISTIC_OUTPUT 0x2000
-
- /* Compress sections in this BFD. */
-#define BFD_COMPRESS 0x4000
-
- /* Decompress sections in this BFD. */
-#define BFD_DECOMPRESS 0x8000
-
- /* BFD is a dummy, for plugins. */
-#define BFD_PLUGIN 0x10000
-
- /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */
-#define BFD_COMPRESS_GABI 0x20000
-
- /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this
- BFD. */
-#define BFD_CONVERT_ELF_COMMON 0x40000
-
- /* Use the ELF STT_COMMON type in this BFD. */
-#define BFD_USE_ELF_STT_COMMON 0x80000
-
- /* Flags bits to be saved in bfd_preserve_save. */
-#define BFD_FLAGS_SAVED \
- (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
- | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \
- | BFD_USE_ELF_STT_COMMON)
-
- /* Flags bits which are for BFD use only. */
-#define BFD_FLAGS_FOR_BFD_USE_MASK \
- (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
- | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \
- | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON)
-
- /* Is the file descriptor being cached? That is, can it be closed as
- needed, and re-opened when accessed later? */
- unsigned int cacheable : 1;
-
- /* Marks whether there was a default target specified when the
- BFD was opened. This is used to select which matching algorithm
- to use to choose the back end. */
- unsigned int target_defaulted : 1;
-
- /* ... and here: (``once'' means at least once). */
- unsigned int opened_once : 1;
-
- /* Set if we have a locally maintained mtime value, rather than
- getting it from the file each time. */
- unsigned int mtime_set : 1;
-
- /* Flag set if symbols from this BFD should not be exported. */
- unsigned int no_export : 1;
-
- /* Remember when output has begun, to stop strange things
- from happening. */
- unsigned int output_has_begun : 1;
-
- /* Have archive map. */
- unsigned int has_armap : 1;
-
- /* Set if this is a thin archive. */
- unsigned int is_thin_archive : 1;
-
- /* Set if only required symbols should be added in the link hash table for
- this object. Used by VMS linkers. */
- unsigned int selective_search : 1;
-
- /* Set if this is the linker output BFD. */
- unsigned int is_linker_output : 1;
-
- /* Set if this is the linker input BFD. */
- unsigned int is_linker_input : 1;
-
- /* If this is an input for a compiler plug-in library. */
- ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2;
-
- /* Set if this is a plugin output file. */
- unsigned int lto_output : 1;
-
- /* Set to dummy BFD created when claimed by a compiler plug-in
- library. */
- bfd *plugin_dummy_bfd;
-
- /* Currently my_archive is tested before adding origin to
- anything. I believe that this can become always an add of
- origin, with origin set to 0 for non archive files. */
- ufile_ptr origin;
-
- /* The origin in the archive of the proxy entry. This will
- normally be the same as origin, except for thin archives,
- when it will contain the current offset of the proxy in the
- thin archive rather than the offset of the bfd in its actual
- container. */
- ufile_ptr proxy_origin;
-
- /* A hash table for section names. */
- struct bfd_hash_table section_htab;
-
- /* Pointer to linked list of sections. */
- struct bfd_section *sections;
-
- /* The last section on the section list. */
- struct bfd_section *section_last;
-
- /* The number of sections. */
- unsigned int section_count;
-
- /* A field used by _bfd_generic_link_add_archive_symbols. This will
- be used only for archive elements. */
- int archive_pass;
-
- /* Stuff only useful for object files:
- The start address. */
- bfd_vma start_address;
-
- /* Symbol table for output BFD (with symcount entries).
- Also used by the linker to cache input BFD symbols. */
- struct bfd_symbol **outsymbols;
-
- /* Used for input and output. */
- unsigned int symcount;
-
- /* Used for slurped dynamic symbol tables. */
- unsigned int dynsymcount;
-
- /* Pointer to structure which contains architecture information. */
- const struct bfd_arch_info *arch_info;
-
- /* Stuff only useful for archives. */
- void *arelt_data;
- struct bfd *my_archive; /* The containing archive BFD. */
- struct bfd *archive_next; /* The next BFD in the archive. */
- struct bfd *archive_head; /* The first BFD in the archive. */
- struct bfd *nested_archives; /* List of nested archive in a flattened
- thin archive. */
-
- union {
- /* For input BFDs, a chain of BFDs involved in a link. */
- struct bfd *next;
- /* For output BFD, the linker hash table. */
- struct bfd_link_hash_table *hash;
- } link;
-
- /* Used by the back end to hold private data. */
- union
- {
- struct aout_data_struct *aout_data;
- struct artdata *aout_ar_data;
- struct coff_tdata *coff_obj_data;
- struct pe_tdata *pe_obj_data;
- struct xcoff_tdata *xcoff_obj_data;
- struct ecoff_tdata *ecoff_obj_data;
- struct srec_data_struct *srec_data;
- struct verilog_data_struct *verilog_data;
- struct ihex_data_struct *ihex_data;
- struct tekhex_data_struct *tekhex_data;
- struct elf_obj_tdata *elf_obj_data;
- struct mmo_data_struct *mmo_data;
- struct sun_core_struct *sun_core_data;
- struct sco5_core_struct *sco5_core_data;
- struct trad_core_struct *trad_core_data;
- struct som_data_struct *som_data;
- struct hpux_core_struct *hpux_core_data;
- struct hppabsd_core_struct *hppabsd_core_data;
- struct sgi_core_struct *sgi_core_data;
- struct lynx_core_struct *lynx_core_data;
- struct osf_core_struct *osf_core_data;
- struct cisco_core_struct *cisco_core_data;
- struct versados_data_struct *versados_data;
- struct netbsd_core_struct *netbsd_core_data;
- struct mach_o_data_struct *mach_o_data;
- struct mach_o_fat_data_struct *mach_o_fat_data;
- struct plugin_data_struct *plugin_data;
- struct bfd_pef_data_struct *pef_data;
- struct bfd_pef_xlib_data_struct *pef_xlib_data;
- struct bfd_sym_data_struct *sym_data;
- void *any;
- }
- tdata;
-
- /* Used by the application to hold private data. */
- void *usrdata;
-
- /* Where all the allocated stuff under this BFD goes. This is a
- struct objalloc *, but we use void * to avoid requiring the inclusion
- of objalloc.h. */
- void *memory;
-
- /* For input BFDs, the build ID, if the object has one. */
- const struct bfd_build_id *build_id;
-};
-
-/* See note beside bfd_set_section_userdata. */
-static inline bfd_boolean
-bfd_set_cacheable (bfd * abfd, bfd_boolean val)
-{
- abfd->cacheable = val;
- return TRUE;
-}
-
-
-typedef enum bfd_error
-{
- bfd_error_no_error = 0,
- bfd_error_system_call,
- bfd_error_invalid_target,
- bfd_error_wrong_format,
- bfd_error_wrong_object_format,
- bfd_error_invalid_operation,
- bfd_error_no_memory,
- bfd_error_no_symbols,
- bfd_error_no_armap,
- bfd_error_no_more_archived_files,
- bfd_error_malformed_archive,
- bfd_error_missing_dso,
- bfd_error_file_not_recognized,
- bfd_error_file_ambiguously_recognized,
- bfd_error_no_contents,
- bfd_error_nonrepresentable_section,
- bfd_error_no_debug_section,
- bfd_error_bad_value,
- bfd_error_file_truncated,
- bfd_error_file_too_big,
- bfd_error_on_input,
- bfd_error_invalid_error_code
-}
-bfd_error_type;
-
-bfd_error_type bfd_get_error (void);
-
-void bfd_set_error (bfd_error_type error_tag);
-
-void bfd_set_input_error (bfd *input, bfd_error_type error_tag);
-
-const char *bfd_errmsg (bfd_error_type error_tag);
-
-void bfd_perror (const char *message);
-
-
-typedef void (*bfd_error_handler_type) (const char *, va_list);
-
-void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1;
-
-bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
-
-void bfd_set_error_program_name (const char *);
-
-
-typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg,
- const char *bfd_version,
- const char *bfd_file,
- int bfd_line);
-
-bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type);
-
-long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
-
-long bfd_canonicalize_reloc
- (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
-
-void bfd_set_reloc
- (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
-
-#define bfd_set_reloc(abfd, asect, location, count) \
- BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count))
-bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
-
-int bfd_get_arch_size (bfd *abfd);
-
-int bfd_get_sign_extend_vma (bfd *abfd);
-
-bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
-
-unsigned int bfd_get_gp_size (bfd *abfd);
-
-void bfd_set_gp_size (bfd *abfd, unsigned int i);
-
-bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
-
-bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
-
-#define bfd_copy_private_header_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_copy_private_header_data, \
- (ibfd, obfd))
-bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
-
-#define bfd_copy_private_bfd_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
- (ibfd, obfd))
-bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
-
-#define bfd_set_private_flags(abfd, flags) \
- BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
-#define bfd_sizeof_headers(abfd, info) \
- BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info))
-
-#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
- BFD_SEND (abfd, _bfd_find_nearest_line, \
- (abfd, syms, sec, off, file, func, line, NULL))
-
-#define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \
- line, disc) \
- BFD_SEND (abfd, _bfd_find_nearest_line, \
- (abfd, syms, sec, off, file, func, line, disc))
-
-#define bfd_find_line(abfd, syms, sym, file, line) \
- BFD_SEND (abfd, _bfd_find_line, \
- (abfd, syms, sym, file, line))
-
-#define bfd_find_inliner_info(abfd, file, func, line) \
- BFD_SEND (abfd, _bfd_find_inliner_info, \
- (abfd, file, func, line))
-
-#define bfd_debug_info_start(abfd) \
- BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
-
-#define bfd_debug_info_end(abfd) \
- BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
-
-#define bfd_debug_info_accumulate(abfd, section) \
- BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
-
-#define bfd_stat_arch_elt(abfd, stat) \
- BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
-
-#define bfd_update_armap_timestamp(abfd) \
- BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
-
-#define bfd_set_arch_mach(abfd, arch, mach)\
- BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
-
-#define bfd_relax_section(abfd, section, link_info, again) \
- BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
-
-#define bfd_gc_sections(abfd, link_info) \
- BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
-
-#define bfd_lookup_section_flags(link_info, flag_info, section) \
- BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info, section))
-
-#define bfd_merge_sections(abfd, link_info) \
- BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
-
-#define bfd_is_group_section(abfd, sec) \
- BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
-
-#define bfd_discard_group(abfd, sec) \
- BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
-
-#define bfd_link_hash_table_create(abfd) \
- BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
-
-#define bfd_link_add_symbols(abfd, info) \
- BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
-
-#define bfd_link_just_syms(abfd, sec, info) \
- BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
-
-#define bfd_final_link(abfd, info) \
- BFD_SEND (abfd, _bfd_final_link, (abfd, info))
-
-#define bfd_free_cached_info(abfd) \
- BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
-
-#define bfd_get_dynamic_symtab_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
-
-#define bfd_print_private_bfd_data(abfd, file)\
- BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
-
-#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
- BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
-
-#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
- BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
- dyncount, dynsyms, ret))
-
-#define bfd_get_dynamic_reloc_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
-
-#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
- BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
-
-extern bfd_byte *bfd_get_relocated_section_contents
- (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
- bfd_boolean, asymbol **);
-
-bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
-
-bfd_vma bfd_emul_get_maxpagesize (const char *);
-
-void bfd_emul_set_maxpagesize (const char *, bfd_vma);
-
-bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean);
-
-void bfd_emul_set_commonpagesize (const char *, bfd_vma);
-
-char *bfd_demangle (bfd *, const char *, int);
-
-void bfd_update_compression_header
- (bfd *abfd, bfd_byte *contents, asection *sec);
-
-bfd_boolean bfd_check_compression_header
- (bfd *abfd, bfd_byte *contents, asection *sec,
- bfd_size_type *uncompressed_size,
- unsigned int *uncompressed_alignment_power);
-
-int bfd_get_compression_header_size (bfd *abfd, asection *sec);
-
-bfd_size_type bfd_convert_section_size
- (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size);
-
-bfd_boolean bfd_convert_section_contents
- (bfd *ibfd, asection *isec, bfd *obfd,
- bfd_byte **ptr, bfd_size_type *ptr_size);
-
-/* Extracted from archive.c. */
-symindex bfd_get_next_mapent
- (bfd *abfd, symindex previous, carsym **sym);
-
-bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
-
-bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
-
-/* Extracted from corefile.c. */
-const char *bfd_core_file_failing_command (bfd *abfd);
-
-int bfd_core_file_failing_signal (bfd *abfd);
-
-int bfd_core_file_pid (bfd *abfd);
-
-bfd_boolean core_file_matches_executable_p
- (bfd *core_bfd, bfd *exec_bfd);
-
-bfd_boolean generic_core_file_matches_executable_p
- (bfd *core_bfd, bfd *exec_bfd);
-
-/* Extracted from targets.c. */
-#define BFD_SEND(bfd, message, arglist) \
- ((*((bfd)->xvec->message)) arglist)
-
-#ifdef DEBUG_BFD_SEND
-#undef BFD_SEND
-#define BFD_SEND(bfd, message, arglist) \
- (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
- ((*((bfd)->xvec->message)) arglist) : \
- (bfd_assert (__FILE__,__LINE__), NULL))
-#endif
-#define BFD_SEND_FMT(bfd, message, arglist) \
- (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
-
-#ifdef DEBUG_BFD_SEND
-#undef BFD_SEND_FMT
-#define BFD_SEND_FMT(bfd, message, arglist) \
- (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
- (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
- (bfd_assert (__FILE__,__LINE__), NULL))
-#endif
-
-enum bfd_flavour
-{
- /* N.B. Update bfd_flavour_name if you change this. */
- bfd_target_unknown_flavour,
- bfd_target_aout_flavour,
- bfd_target_coff_flavour,
- bfd_target_ecoff_flavour,
- bfd_target_xcoff_flavour,
- bfd_target_elf_flavour,
- bfd_target_tekhex_flavour,
- bfd_target_srec_flavour,
- bfd_target_verilog_flavour,
- bfd_target_ihex_flavour,
- bfd_target_som_flavour,
- bfd_target_os9k_flavour,
- bfd_target_versados_flavour,
- bfd_target_msdos_flavour,
- bfd_target_ovax_flavour,
- bfd_target_evax_flavour,
- bfd_target_mmo_flavour,
- bfd_target_mach_o_flavour,
- bfd_target_pef_flavour,
- bfd_target_pef_xlib_flavour,
- bfd_target_sym_flavour
-};
-
-enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
-
-/* Forward declaration. */
-typedef struct bfd_link_info _bfd_link_info;
-
-/* Forward declaration. */
-typedef struct flag_info flag_info;
-
-typedef struct bfd_target
-{
- /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */
- char *name;
-
- /* The "flavour" of a back end is a general indication about
- the contents of a file. */
- enum bfd_flavour flavour;
-
- /* The order of bytes within the data area of a file. */
- enum bfd_endian byteorder;
-
- /* The order of bytes within the header parts of a file. */
- enum bfd_endian header_byteorder;
-
- /* A mask of all the flags which an executable may have set -
- from the set <>, <>, ...<>. */
- flagword object_flags;
-
- /* A mask of all the flags which a section may have set - from
- the set <>, <>, ...<>. */
- flagword section_flags;
-
- /* The character normally found at the front of a symbol.
- (if any), perhaps `_'. */
- char symbol_leading_char;
-
- /* The pad character for file names within an archive header. */
- char ar_pad_char;
-
- /* The maximum number of characters in an archive header. */
- unsigned char ar_max_namelen;
-
- /* How well this target matches, used to select between various
- possible targets when more than one target matches. */
- unsigned char match_priority;
-
- /* Entries for byte swapping for data. These are different from the
- other entry points, since they don't take a BFD as the first argument.
- Certain other handlers could do the same. */
- bfd_uint64_t (*bfd_getx64) (const void *);
- bfd_int64_t (*bfd_getx_signed_64) (const void *);
- void (*bfd_putx64) (bfd_uint64_t, void *);
- bfd_vma (*bfd_getx32) (const void *);
- bfd_signed_vma (*bfd_getx_signed_32) (const void *);
- void (*bfd_putx32) (bfd_vma, void *);
- bfd_vma (*bfd_getx16) (const void *);
- bfd_signed_vma (*bfd_getx_signed_16) (const void *);
- void (*bfd_putx16) (bfd_vma, void *);
-
- /* Byte swapping for the headers. */
- bfd_uint64_t (*bfd_h_getx64) (const void *);
- bfd_int64_t (*bfd_h_getx_signed_64) (const void *);
- void (*bfd_h_putx64) (bfd_uint64_t, void *);
- bfd_vma (*bfd_h_getx32) (const void *);
- bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
- void (*bfd_h_putx32) (bfd_vma, void *);
- bfd_vma (*bfd_h_getx16) (const void *);
- bfd_signed_vma (*bfd_h_getx_signed_16) (const void *);
- void (*bfd_h_putx16) (bfd_vma, void *);
-
- /* Format dependent routines: these are vectors of entry points
- within the target vector structure, one for each format to check. */
-
- /* Check the format of a file being read. Return a <> or zero. */
- const struct bfd_target *
- (*_bfd_check_format[bfd_type_end]) (bfd *);
-
- /* Set the format of a file being written. */
- bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
-
- /* Write cached information into a file being written, at <>. */
- bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
-
-
- /* Generic entry points. */
-#define BFD_JUMP_TABLE_GENERIC(NAME) \
- NAME##_close_and_cleanup, \
- NAME##_bfd_free_cached_info, \
- NAME##_new_section_hook, \
- NAME##_get_section_contents, \
- NAME##_get_section_contents_in_window
-
- /* Called when the BFD is being closed to do any necessary cleanup. */
- bfd_boolean (*_close_and_cleanup) (bfd *);
- /* Ask the BFD to free all cached information. */
- bfd_boolean (*_bfd_free_cached_info) (bfd *);
- /* Called when a new section is created. */
- bfd_boolean (*_new_section_hook) (bfd *, sec_ptr);
- /* Read the contents of a section. */
- bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr,
- bfd_size_type);
- bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr,
- bfd_window *, file_ptr,
- bfd_size_type);
-
- /* Entry points to copy private data. */
-#define BFD_JUMP_TABLE_COPY(NAME) \
- NAME##_bfd_copy_private_bfd_data, \
- NAME##_bfd_merge_private_bfd_data, \
- _bfd_generic_init_private_section_data, \
- NAME##_bfd_copy_private_section_data, \
- NAME##_bfd_copy_private_symbol_data, \
- NAME##_bfd_copy_private_header_data, \
- NAME##_bfd_set_private_flags, \
- NAME##_bfd_print_private_bfd_data
-
- /* Called to copy BFD general private data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
- /* Called to merge BFD general private data from one object file
- to a common output file when linking. */
- bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *);
- /* Called to initialize BFD private section data from one object file
- to another. */
-#define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
- BFD_SEND (obfd, _bfd_init_private_section_data, \
- (ibfd, isec, obfd, osec, link_info))
- bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *,
- sec_ptr,
- struct bfd_link_info *);
- /* Called to copy BFD private section data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *,
- sec_ptr);
- /* Called to copy BFD private symbol data from one symbol
- to another. */
- bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *,
- asymbol *);
- /* Called to copy BFD private header data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *);
- /* Called to set private backend flags. */
- bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
-
- /* Called to print private BFD data. */
- bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *);
-
- /* Core file entry points. */
-#define BFD_JUMP_TABLE_CORE(NAME) \
- NAME##_core_file_failing_command, \
- NAME##_core_file_failing_signal, \
- NAME##_core_file_matches_executable_p, \
- NAME##_core_file_pid
-
- char * (*_core_file_failing_command) (bfd *);
- int (*_core_file_failing_signal) (bfd *);
- bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *);
- int (*_core_file_pid) (bfd *);
-
- /* Archive entry points. */
-#define BFD_JUMP_TABLE_ARCHIVE(NAME) \
- NAME##_slurp_armap, \
- NAME##_slurp_extended_name_table, \
- NAME##_construct_extended_name_table, \
- NAME##_truncate_arname, \
- NAME##_write_armap, \
- NAME##_read_ar_hdr, \
- NAME##_write_ar_hdr, \
- NAME##_openr_next_archived_file, \
- NAME##_get_elt_at_index, \
- NAME##_generic_stat_arch_elt, \
- NAME##_update_armap_timestamp
-
- bfd_boolean (*_bfd_slurp_armap) (bfd *);
- bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *);
- bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **,
- bfd_size_type *,
- const char **);
- void (*_bfd_truncate_arname) (bfd *, const char *, char *);
- bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *,
- unsigned int, int);
- void * (*_bfd_read_ar_hdr_fn) (bfd *);
- bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *);
- bfd * (*openr_next_archived_file) (bfd *, bfd *);
-#define bfd_get_elt_at_index(b,i) \
- BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
- bfd * (*_bfd_get_elt_at_index) (bfd *, symindex);
- int (*_bfd_stat_arch_elt) (bfd *, struct stat *);
- bfd_boolean (*_bfd_update_armap_timestamp) (bfd *);
-
- /* Entry points used for symbols. */
-#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
- NAME##_get_symtab_upper_bound, \
- NAME##_canonicalize_symtab, \
- NAME##_make_empty_symbol, \
- NAME##_print_symbol, \
- NAME##_get_symbol_info, \
- NAME##_get_symbol_version_string, \
- NAME##_bfd_is_local_label_name, \
- NAME##_bfd_is_target_special_symbol, \
- NAME##_get_lineno, \
- NAME##_find_nearest_line, \
- NAME##_find_line, \
- NAME##_find_inliner_info, \
- NAME##_bfd_make_debug_symbol, \
- NAME##_read_minisymbols, \
- NAME##_minisymbol_to_symbol
-
- long (*_bfd_get_symtab_upper_bound) (bfd *);
- long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **);
- struct bfd_symbol *
- (*_bfd_make_empty_symbol) (bfd *);
- void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *,
- bfd_print_symbol_type);
-#define bfd_print_symbol(b,p,s,e) \
- BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
- void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *,
- symbol_info *);
-#define bfd_get_symbol_info(b,p,e) \
- BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
- const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *,
- bfd_boolean *);
-#define bfd_get_symbol_version_string(b,s,h) \
- BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h))
- bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
- bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
- alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
- bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **,
- struct bfd_section *, bfd_vma,
- const char **, const char **,
- unsigned int *, unsigned int *);
- bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **,
- struct bfd_symbol *, const char **,
- unsigned int *);
- bfd_boolean (*_bfd_find_inliner_info)
- (bfd *, const char **, const char **, unsigned int *);
- /* Back-door to allow format-aware applications to create debug symbols
- while using BFD for everything else. Currently used by the assembler
- when creating COFF files. */
- asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size);
-#define bfd_read_minisymbols(b, d, m, s) \
- BFD_SEND (b, _read_minisymbols, (b, d, m, s))
- long (*_read_minisymbols) (bfd *, bfd_boolean, void **,
- unsigned int *);
-#define bfd_minisymbol_to_symbol(b, d, m, f) \
- BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
- asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *,
- asymbol *);
-
- /* Routines for relocs. */
-#define BFD_JUMP_TABLE_RELOCS(NAME) \
- NAME##_get_reloc_upper_bound, \
- NAME##_canonicalize_reloc, \
- NAME##_set_reloc, \
- NAME##_bfd_reloc_type_lookup, \
- NAME##_bfd_reloc_name_lookup
-
- long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
- long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **,
- struct bfd_symbol **);
- void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int);
- /* See documentation on reloc types. */
- reloc_howto_type *
- (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
- reloc_howto_type *
- (*reloc_name_lookup) (bfd *, const char *);
-
- /* Routines used when writing an object file. */
-#define BFD_JUMP_TABLE_WRITE(NAME) \
- NAME##_set_arch_mach, \
- NAME##_set_section_contents
-
- bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture,
- unsigned long);
- bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *,
- file_ptr, bfd_size_type);
-
- /* Routines used by the linker. */
-#define BFD_JUMP_TABLE_LINK(NAME) \
- NAME##_sizeof_headers, \
- NAME##_bfd_get_relocated_section_contents, \
- NAME##_bfd_relax_section, \
- NAME##_bfd_link_hash_table_create, \
- NAME##_bfd_link_add_symbols, \
- NAME##_bfd_link_just_syms, \
- NAME##_bfd_copy_link_hash_symbol_type, \
- NAME##_bfd_final_link, \
- NAME##_bfd_link_split_section, \
- NAME##_bfd_link_check_relocs, \
- NAME##_bfd_gc_sections, \
- NAME##_bfd_lookup_section_flags, \
- NAME##_bfd_merge_sections, \
- NAME##_bfd_is_group_section, \
- NAME##_bfd_discard_group, \
- NAME##_section_already_linked, \
- NAME##_bfd_define_common_symbol, \
- NAME##_bfd_link_hide_symbol, \
- NAME##_bfd_define_start_stop
-
- int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
- bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *,
- struct bfd_link_info *,
- struct bfd_link_order *,
- bfd_byte *, bfd_boolean,
- struct bfd_symbol **);
-
- bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *,
- struct bfd_link_info *, bfd_boolean *);
-
- /* Create a hash table for the linker. Different backends store
- different information in this table. */
- struct bfd_link_hash_table *
- (*_bfd_link_hash_table_create) (bfd *);
-
- /* Add symbols from this object file into the hash table. */
- bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
-
- /* Indicate that we are only retrieving symbol values from this section. */
- void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
-
- /* Copy the symbol type and other attributes for a linker script
- assignment of one symbol to another. */
-#define bfd_copy_link_hash_symbol_type(b, t, f) \
- BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f))
- void (*_bfd_copy_link_hash_symbol_type) (bfd *,
- struct bfd_link_hash_entry *,
- struct bfd_link_hash_entry *);
-
- /* Do a link based on the link_order structures attached to each
- section of the BFD. */
- bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
-
- /* Should this section be split up into smaller pieces during linking. */
- bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
-
- /* Check the relocations in the bfd for validity. */
- bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *);
-
- /* Remove sections that are not referenced from the output. */
- bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
-
- /* Sets the bitmask of allowed and disallowed section flags. */
- bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *,
- struct flag_info *, asection *);
-
- /* Attempt to merge SEC_MERGE sections. */
- bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
-
- /* Is this section a member of a group? */
- bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
-
- /* Discard members of a group. */
- bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
-
- /* Check if SEC has been already linked during a reloceatable or
- final link. */
- bfd_boolean (*_section_already_linked) (bfd *, asection *,
- struct bfd_link_info *);
-
- /* Define a common symbol. */
- bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *,
- struct bfd_link_hash_entry *);
-
- /* Hide a symbol. */
- void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *,
- struct bfd_link_hash_entry *);
-
- /* Define a __start, __stop, .startof. or .sizeof. symbol. */
- struct bfd_link_hash_entry *
- (*_bfd_define_start_stop) (struct bfd_link_info *, const char *,
- asection *);
-
- /* Routines to handle dynamic symbols and relocs. */
-#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
- NAME##_get_dynamic_symtab_upper_bound, \
- NAME##_canonicalize_dynamic_symtab, \
- NAME##_get_synthetic_symtab, \
- NAME##_get_dynamic_reloc_upper_bound, \
- NAME##_canonicalize_dynamic_reloc
-
- /* Get the amount of memory required to hold the dynamic symbols. */
- long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
- /* Read in the dynamic symbols. */
- long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **);
- /* Create synthetized symbols. */
- long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **,
- long, struct bfd_symbol **,
- struct bfd_symbol **);
- /* Get the amount of memory required to hold the dynamic relocs. */
- long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
- /* Read in the dynamic relocs. */
- long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **,
- struct bfd_symbol **);
-
- /* Opposite endian version of this target. */
- const struct bfd_target *alternative_target;
-
- /* Data for use by back-end routines, which isn't
- generic enough to belong in this structure. */
- const void *backend_data;
-
-} bfd_target;
-
-bfd_boolean bfd_set_default_target (const char *name);
-
-const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
-
-const bfd_target *bfd_get_target_info (const char *target_name,
- bfd *abfd,
- bfd_boolean *is_bigendian,
- int *underscoring,
- const char **def_target_arch);
-const char ** bfd_target_list (void);
-
-const bfd_target *bfd_iterate_over_targets
- (int (*func) (const bfd_target *, void *),
- void *data);
-
-const char *bfd_flavour_name (enum bfd_flavour flavour);
-
-/* Extracted from format.c. */
-bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
-
-bfd_boolean bfd_check_format_matches
- (bfd *abfd, bfd_format format, char ***matching);
-
-bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
-
-const char *bfd_format_string (bfd_format format);
-
-/* Extracted from linker.c. */
-/* Return TRUE if the symbol described by a linker hash entry H
- is going to be absolute. Linker-script defined symbols can be
- converted from absolute to section-relative ones late in the
- link. Use this macro to correctly determine whether the symbol
- will actually end up absolute in output. */
-#define bfd_is_abs_symbol(H) \
- (((H)->type == bfd_link_hash_defined \
- || (H)->type == bfd_link_hash_defweak) \
- && bfd_is_abs_section ((H)->u.def.section) \
- && !(H)->rel_from_abs)
-
-bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
-
-#define bfd_link_split_section(abfd, sec) \
- BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
-
-bfd_boolean bfd_section_already_linked (bfd *abfd,
- asection *sec,
- struct bfd_link_info *info);
-
-#define bfd_section_already_linked(abfd, sec, info) \
- BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
-
-bfd_boolean bfd_generic_define_common_symbol
- (bfd *output_bfd, struct bfd_link_info *info,
- struct bfd_link_hash_entry *h);
-
-#define bfd_define_common_symbol(output_bfd, info, h) \
- BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h))
-
-void _bfd_generic_link_hide_symbol
- (bfd *output_bfd, struct bfd_link_info *info,
- struct bfd_link_hash_entry *h);
-
-#define bfd_link_hide_symbol(output_bfd, info, h) \
- BFD_SEND (output_bfd, _bfd_link_hide_symbol, (output_bfd, info, h))
-
-struct bfd_link_hash_entry *bfd_generic_define_start_stop
- (struct bfd_link_info *info,
- const char *symbol, asection *sec);
-
-#define bfd_define_start_stop(output_bfd, info, symbol, sec) \
- BFD_SEND (output_bfd, _bfd_define_start_stop, (info, symbol, sec))
-
-struct bfd_elf_version_tree * bfd_find_version_for_sym
- (struct bfd_elf_version_tree *verdefs,
- const char *sym_name, bfd_boolean *hide);
-
-bfd_boolean bfd_hide_sym_by_version
- (struct bfd_elf_version_tree *verdefs, const char *sym_name);
-
-bfd_boolean bfd_link_check_relocs
- (bfd *abfd, struct bfd_link_info *info);
-
-bfd_boolean _bfd_generic_link_check_relocs
- (bfd *abfd, struct bfd_link_info *info);
-
-bfd_boolean bfd_merge_private_bfd_data
- (bfd *ibfd, struct bfd_link_info *info);
-
-#define bfd_merge_private_bfd_data(ibfd, info) \
- BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \
- (ibfd, info))
-/* Extracted from simple.c. */
-bfd_byte *bfd_simple_get_relocated_section_contents
- (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
-
-/* Extracted from compress.c. */
-bfd_boolean bfd_get_full_section_contents
- (bfd *abfd, asection *section, bfd_byte **ptr);
-
-void bfd_cache_section_contents
- (asection *sec, void *contents);
-
-bfd_boolean bfd_is_section_compressed_with_header
- (bfd *abfd, asection *section,
- int *compression_header_size_p,
- bfd_size_type *uncompressed_size_p,
- unsigned int *uncompressed_alignment_power_p);
-
-bfd_boolean bfd_is_section_compressed
- (bfd *abfd, asection *section);
-
-bfd_boolean bfd_init_section_decompress_status
- (bfd *abfd, asection *section);
-
-bfd_boolean bfd_init_section_compress_status
- (bfd *abfd, asection *section);
-
-bfd_boolean bfd_compress_section
- (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabi/bfd_stdint.h b/lib/libc/include/armeb-linux-musleabi/bfd_stdint.h
deleted file mode 100644
index 2d3c802d27ba08f4ddeefc21b1d93dbe294a60df..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabi/bfd_stdint.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* generated for armeb-linux-musleabi-gcc (GCC) 8.3.0 */
-
-#ifndef GCC_GENERATED_STDINT_H
-#define GCC_GENERATED_STDINT_H 1
-
-#include
-#include
-/* glibc uses these symbols as guards to prevent redefinitions. */
-#ifdef __int8_t_defined
-#define _INT8_T
-#define _INT16_T
-#define _INT32_T
-#endif
-#ifdef __uint32_t_defined
-#define _UINT32_T
-#endif
-
-
-/* Some systems have guard macros to prevent redefinitions, define them. */
-#ifndef _INT8_T
-#define _INT8_T
-#endif
-#ifndef _INT16_T
-#define _INT16_T
-#endif
-#ifndef _INT32_T
-#define _INT32_T
-#endif
-#ifndef _UINT8_T
-#define _UINT8_T
-#endif
-#ifndef _UINT16_T
-#define _UINT16_T
-#endif
-#ifndef _UINT32_T
-#define _UINT32_T
-#endif
-
-/* system headers have good uint64_t and int64_t */
-#ifndef _INT64_T
-#define _INT64_T
-#endif
-#ifndef _UINT64_T
-#define _UINT64_T
-#endif
-
-#endif /* GCC_GENERATED_STDINT_H */
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabi/bits/fcntl.h b/lib/libc/include/armeb-linux-musleabi/bits/fcntl.h
deleted file mode 100644
index 2408640910a08a79b5dc06ebb934bff061d6f89f..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabi/bits/fcntl.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#define O_CREAT 0100
-#define O_EXCL 0200
-#define O_NOCTTY 0400
-#define O_TRUNC 01000
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
-#define O_DSYNC 010000
-#define O_SYNC 04010000
-#define O_RSYNC 04010000
-#define O_DIRECTORY 040000
-#define O_NOFOLLOW 0100000
-#define O_CLOEXEC 02000000
-
-#define O_ASYNC 020000
-#define O_DIRECT 0200000
-#define O_LARGEFILE 0400000
-#define O_NOATIME 01000000
-#define O_PATH 010000000
-#define O_TMPFILE 020040000
-#define O_NDELAY O_NONBLOCK
-
-#define F_DUPFD 0
-#define F_GETFD 1
-#define F_SETFD 2
-#define F_GETFL 3
-#define F_SETFL 4
-
-#define F_SETOWN 8
-#define F_GETOWN 9
-#define F_SETSIG 10
-#define F_GETSIG 11
-
-#define F_GETLK 12
-#define F_SETLK 13
-#define F_SETLKW 14
-
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-
-#define F_GETOWNER_UIDS 17
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabi/bits/hwcap.h b/lib/libc/include/armeb-linux-musleabi/bits/hwcap.h
deleted file mode 100644
index c1c1fb1683d7710287af82ec59c42e27149eebf0..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabi/bits/hwcap.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#define HWCAP_SWP (1 << 0)
-#define HWCAP_HALF (1 << 1)
-#define HWCAP_THUMB (1 << 2)
-#define HWCAP_26BIT (1 << 3)
-#define HWCAP_FAST_MULT (1 << 4)
-#define HWCAP_FPA (1 << 5)
-#define HWCAP_VFP (1 << 6)
-#define HWCAP_EDSP (1 << 7)
-#define HWCAP_JAVA (1 << 8)
-#define HWCAP_IWMMXT (1 << 9)
-#define HWCAP_CRUNCH (1 << 10)
-#define HWCAP_THUMBEE (1 << 11)
-#define HWCAP_NEON (1 << 12)
-#define HWCAP_VFPv3 (1 << 13)
-#define HWCAP_VFPv3D16 (1 << 14)
-#define HWCAP_TLS (1 << 15)
-#define HWCAP_VFPv4 (1 << 16)
-#define HWCAP_IDIVA (1 << 17)
-#define HWCAP_IDIVT (1 << 18)
-#define HWCAP_VFPD32 (1 << 19)
-#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)
-#define HWCAP_LPAE (1 << 20)
-#define HWCAP_EVTSTRM (1 << 21)
-
-#define HWCAP2_AES (1 << 0)
-#define HWCAP2_PMULL (1 << 1)
-#define HWCAP2_SHA1 (1 << 2)
-#define HWCAP2_SHA2 (1 << 3)
-#define HWCAP2_CRC32 (1 << 4)
-
-#define HWCAP_ARM_SWP (1 << 0)
-#define HWCAP_ARM_HALF (1 << 1)
-#define HWCAP_ARM_THUMB (1 << 2)
-#define HWCAP_ARM_26BIT (1 << 3)
-#define HWCAP_ARM_FAST_MULT (1 << 4)
-#define HWCAP_ARM_FPA (1 << 5)
-#define HWCAP_ARM_VFP (1 << 6)
-#define HWCAP_ARM_EDSP (1 << 7)
-#define HWCAP_ARM_JAVA (1 << 8)
-#define HWCAP_ARM_IWMMXT (1 << 9)
-#define HWCAP_ARM_CRUNCH (1 << 10)
-#define HWCAP_ARM_THUMBEE (1 << 11)
-#define HWCAP_ARM_NEON (1 << 12)
-#define HWCAP_ARM_VFPv3 (1 << 13)
-#define HWCAP_ARM_VFPv3D16 (1 << 14)
-#define HWCAP_ARM_TLS (1 << 15)
-#define HWCAP_ARM_VFPv4 (1 << 16)
-#define HWCAP_ARM_IDIVA (1 << 17)
-#define HWCAP_ARM_IDIVT (1 << 18)
-#define HWCAP_ARM_VFPD32 (1 << 19)
-#define HWCAP_ARM_IDIV (HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT)
-#define HWCAP_ARM_LPAE (1 << 20)
-#define HWCAP_ARM_EVTSTRM (1 << 21)
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabi/bits/ioctl_fix.h b/lib/libc/include/armeb-linux-musleabi/bits/ioctl_fix.h
deleted file mode 100644
index 9c177f7679e4ddf3a89e03a984cc3cd45476d773..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabi/bits/ioctl_fix.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#undef FIOQSIZE
-#define FIOQSIZE 0x545e
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabi/bits/msg.h b/lib/libc/include/armeb-linux-musleabi/bits/msg.h
deleted file mode 100644
index e5c8ba75208c2ed80da66995f1afe78fdab39893..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabi/bits/msg.h
+++ /dev/null
@@ -1,15 +0,0 @@
-struct msqid_ds {
- struct ipc_perm msg_perm;
- time_t msg_stime;
- int __unused1;
- time_t msg_rtime;
- int __unused2;
- time_t msg_ctime;
- int __unused3;
- unsigned long msg_cbytes;
- msgqnum_t msg_qnum;
- msglen_t msg_qbytes;
- pid_t msg_lspid;
- pid_t msg_lrpid;
- unsigned long __unused[2];
-};
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabi/bits/ptrace.h b/lib/libc/include/armeb-linux-musleabi/bits/ptrace.h
deleted file mode 100644
index cd96d836f1fdae143f8b0faa5ea72695152b995f..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabi/bits/ptrace.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#define PTRACE_GETWMMXREGS 18
-#define PTRACE_SETWMMXREGS 19
-#define PTRACE_GET_THREAD_AREA 22
-#define PTRACE_SET_SYSCALL 23
-#define PTRACE_GETCRUNCHREGS 25
-#define PTRACE_SETCRUNCHREGS 26
-#define PTRACE_GETVFPREGS 27
-#define PTRACE_SETVFPREGS 28
-#define PTRACE_GETHBPREGS 29
-#define PTRACE_SETHBPREGS 30
-#define PTRACE_GETFDPIC 31
-#define PTRACE_GETFDPIC_EXEC 0
-#define PTRACE_GETFDPIC_INTERP 1
-
-#define PT_GETWMMXREGS PTRACE_GETWMMXREGS
-#define PT_SETWMMXREGS PTRACE_SETWMMXREGS
-#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
-#define PT_SET_SYSCALL PTRACE_SET_SYSCALL
-#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS
-#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS
-#define PT_GETVFPREGS PTRACE_GETVFPREGS
-#define PT_SETVFPREGS PTRACE_SETVFPREGS
-#define PT_GETHBPREGS PTRACE_GETHBPREGS
-#define PT_SETHBPREGS PTRACE_SETHBPREGS
-#define PT_GETFDPIC PTRACE_GETFDPIC
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabi/bits/shm.h b/lib/libc/include/armeb-linux-musleabi/bits/shm.h
deleted file mode 100644
index aa5587127ab24a71b87e7bef5946234c46a9c916..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabi/bits/shm.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#define SHMLBA 4096
-
-struct shmid_ds {
- struct ipc_perm shm_perm;
- size_t shm_segsz;
- time_t shm_atime;
- int __unused1;
- time_t shm_dtime;
- int __unused2;
- time_t shm_ctime;
- int __unused3;
- pid_t shm_cpid;
- pid_t shm_lpid;
- unsigned long shm_nattch;
- unsigned long __pad1;
- unsigned long __pad2;
-};
-
-struct shminfo {
- unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-};
-
-struct shm_info {
- int __used_ids;
- unsigned long shm_tot, shm_rss, shm_swp;
- unsigned long __swap_attempts, __swap_successes;
-};
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabi/bits/stdint.h b/lib/libc/include/armeb-linux-musleabi/bits/stdint.h
deleted file mode 100644
index b70a87dc9d5868de097ab14ec47980f3980e9e65..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabi/bits/stdint.h
+++ /dev/null
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN INT32_MIN
-#define INT_FAST32_MIN INT32_MIN
-
-#define INT_FAST16_MAX INT32_MAX
-#define INT_FAST32_MAX INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-
-#define INTPTR_MIN INT32_MIN
-#define INTPTR_MAX INT32_MAX
-#define UINTPTR_MAX UINT32_MAX
-#define PTRDIFF_MIN INT32_MIN
-#define PTRDIFF_MAX INT32_MAX
-#define SIZE_MAX UINT32_MAX
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabihf/bfd.h b/lib/libc/include/armeb-linux-musleabihf/bfd.h
deleted file mode 100644
index 73d2dccfe27dcdd2c636e967e661b2ff7a035116..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabihf/bfd.h
+++ /dev/null
@@ -1,8034 +0,0 @@
-/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
- generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
- "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
- "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
- "linker.c", "simple.c" and "compress.c".
- Run "make headers" in your build bfd/ to regenerate. */
-
-/* Main header file for the bfd library -- portable access to object files.
-
- Copyright (C) 1990-2019 Free Software Foundation, Inc.
-
- Contributed by Cygnus Support.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef __BFD_H_SEEN__
-#define __BFD_H_SEEN__
-
-/* PR 14072: Ensure that config.h is included first. */
-#if !defined PACKAGE && !defined PACKAGE_VERSION
-#error config.h must be included before this header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ansidecl.h"
-#include "symcat.h"
-#include "bfd_stdint.h"
-#include "diagnostics.h"
-#include
-#include
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#ifndef SABER
-/* This hack is to avoid a problem with some strict ANSI C preprocessors.
- The problem is, "32_" is not a valid preprocessing token, and we don't
- want extra underscores (e.g., "nlm_32_"). The XCONCAT2 macro will
- cause the inner CONCAT2 macros to be evaluated first, producing
- still-valid pp-tokens. Then the final concatenation can be done. */
-#undef CONCAT4
-#define CONCAT4(a,b,c,d) XCONCAT2(CONCAT2(a,b),CONCAT2(c,d))
-#endif
-#endif
-
-/* This is a utility macro to handle the situation where the code
- wants to place a constant string into the code, followed by a
- comma and then the length of the string. Doing this by hand
- is error prone, so using this macro is safer. */
-#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
-/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
- to create the arguments to another macro, since the preprocessor
- will mis-count the number of arguments to the outer macro (by not
- evaluating STRING_COMMA_LEN and so missing the comma). This is a
- problem for example when trying to use STRING_COMMA_LEN to build
- the arguments to the strncmp() macro. Hence this alternative
- definition of strncmp is provided here.
-
- Note - these macros do NOT work if STR2 is not a constant string. */
-#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
- /* strcpy() can have a similar problem, but since we know we are
- copying a constant string, we can use memcpy which will be faster
- since there is no need to check for a NUL byte inside STR. We
- can also save time if we do not need to copy the terminating NUL. */
-#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
-#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
-
-
-#define BFD_SUPPORTS_PLUGINS 1
-
-/* The word size used by BFD on the host. This may be 64 with a 32
- bit target if the host is 64 bit, or if other 64 bit targets have
- been selected with --enable-targets, or if --enable-64-bit-bfd. */
-#define BFD_ARCH_SIZE 32
-
-/* The word size of the default bfd target. */
-#define BFD_DEFAULT_TARGET_SIZE 32
-
-#define BFD_HOST_64BIT_LONG 0
-#define BFD_HOST_64BIT_LONG_LONG 1
-#if 1
-#define BFD_HOST_64_BIT long long
-#define BFD_HOST_U_64_BIT unsigned long long
-typedef BFD_HOST_64_BIT bfd_int64_t;
-typedef BFD_HOST_U_64_BIT bfd_uint64_t;
-#endif
-
-#ifdef HAVE_INTTYPES_H
-# include
-#else
-# if BFD_HOST_64BIT_LONG
-# define BFD_PRI64 "l"
-# elif defined (__MSVCRT__)
-# define BFD_PRI64 "I64"
-# else
-# define BFD_PRI64 "ll"
-# endif
-# undef PRId64
-# define PRId64 BFD_PRI64 "d"
-# undef PRIu64
-# define PRIu64 BFD_PRI64 "u"
-# undef PRIx64
-# define PRIx64 BFD_PRI64 "x"
-#endif
-
-#if BFD_ARCH_SIZE >= 64
-#define BFD64
-#endif
-
-#ifndef INLINE
-#if __GNUC__ >= 2
-#define INLINE __inline__
-#else
-#define INLINE
-#endif
-#endif
-
-/* Declaring a type wide enough to hold a host long and a host pointer. */
-#define BFD_HOSTPTR_T unsigned long
-typedef BFD_HOSTPTR_T bfd_hostptr_t;
-
-/* Forward declaration. */
-typedef struct bfd bfd;
-
-/* Boolean type used in bfd. Too many systems define their own
- versions of "boolean" for us to safely typedef a "boolean" of
- our own. Using an enum for "bfd_boolean" has its own set of
- problems, with strange looking casts required to avoid warnings
- on some older compilers. Thus we just use an int.
-
- General rule: Functions which are bfd_boolean return TRUE on
- success and FALSE on failure (unless they're a predicate). */
-
-typedef int bfd_boolean;
-#undef FALSE
-#undef TRUE
-#define FALSE 0
-#define TRUE 1
-
-#ifdef BFD64
-
-#ifndef BFD_HOST_64_BIT
- #error No 64 bit integer type available
-#endif /* ! defined (BFD_HOST_64_BIT) */
-
-typedef BFD_HOST_U_64_BIT bfd_vma;
-typedef BFD_HOST_64_BIT bfd_signed_vma;
-typedef BFD_HOST_U_64_BIT bfd_size_type;
-typedef BFD_HOST_U_64_BIT symvalue;
-
-#if BFD_HOST_64BIT_LONG
-#define BFD_VMA_FMT "l"
-#elif defined (__MSVCRT__)
-#define BFD_VMA_FMT "I64"
-#else
-#define BFD_VMA_FMT "ll"
-#endif
-
-#ifndef fprintf_vma
-#define sprintf_vma(s,x) sprintf (s, "%016" BFD_VMA_FMT "x", x)
-#define fprintf_vma(f,x) fprintf (f, "%016" BFD_VMA_FMT "x", x)
-#endif
-
-#else /* not BFD64 */
-
-/* Represent a target address. Also used as a generic unsigned type
- which is guaranteed to be big enough to hold any arithmetic types
- we need to deal with. */
-typedef unsigned long bfd_vma;
-
-/* A generic signed type which is guaranteed to be big enough to hold any
- arithmetic types we need to deal with. Can be assumed to be compatible
- with bfd_vma in the same way that signed and unsigned ints are compatible
- (as parameters, in assignment, etc). */
-typedef long bfd_signed_vma;
-
-typedef unsigned long symvalue;
-typedef unsigned long bfd_size_type;
-
-/* Print a bfd_vma x on stream s. */
-#define BFD_VMA_FMT "l"
-#define fprintf_vma(s,x) fprintf (s, "%08" BFD_VMA_FMT "x", x)
-#define sprintf_vma(s,x) sprintf (s, "%08" BFD_VMA_FMT "x", x)
-
-#endif /* not BFD64 */
-
-#define HALF_BFD_SIZE_TYPE \
- (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2))
-
-#ifndef BFD_HOST_64_BIT
-/* Fall back on a 32 bit type. The idea is to make these types always
- available for function return types, but in the case that
- BFD_HOST_64_BIT is undefined such a function should abort or
- otherwise signal an error. */
-typedef bfd_signed_vma bfd_int64_t;
-typedef bfd_vma bfd_uint64_t;
-#endif
-
-/* An offset into a file. BFD always uses the largest possible offset
- based on the build time availability of fseek, fseeko, or fseeko64. */
-typedef BFD_HOST_64_BIT file_ptr;
-typedef unsigned BFD_HOST_64_BIT ufile_ptr;
-
-extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
-extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
-
-#define printf_vma(x) fprintf_vma(stdout,x)
-#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
-
-typedef unsigned int flagword; /* 32 bits of flags */
-typedef unsigned char bfd_byte;
-
-/* File formats. */
-
-typedef enum bfd_format
-{
- bfd_unknown = 0, /* File format is unknown. */
- bfd_object, /* Linker/assembler/compiler output. */
- bfd_archive, /* Object archive file. */
- bfd_core, /* Core dump. */
- bfd_type_end /* Marks the end; don't use it! */
-}
-bfd_format;
-
-/* Symbols and relocation. */
-
-/* A count of carsyms (canonical archive symbols). */
-typedef unsigned long symindex;
-
-#define BFD_NO_MORE_SYMBOLS ((symindex) ~0)
-
-/* General purpose part of a symbol X;
- target specific parts are in libcoff.h, libaout.h, etc. */
-
-#define bfd_get_section(x) ((x)->section)
-#define bfd_get_output_section(x) ((x)->section->output_section)
-#define bfd_set_section(x,y) ((x)->section) = (y)
-#define bfd_asymbol_base(x) ((x)->section->vma)
-#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value)
-#define bfd_asymbol_name(x) ((x)->name)
-/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/
-#define bfd_asymbol_bfd(x) ((x)->the_bfd)
-#define bfd_asymbol_flavour(x) \
- (((x)->flags & BSF_SYNTHETIC) != 0 \
- ? bfd_target_unknown_flavour \
- : bfd_asymbol_bfd (x)->xvec->flavour)
-
-/* A canonical archive symbol. */
-/* This is a type pun with struct ranlib on purpose! */
-typedef struct carsym
-{
- char *name;
- file_ptr file_offset; /* Look here to find the file. */
-}
-carsym; /* To make these you call a carsymogen. */
-
-/* Used in generating armaps (archive tables of contents).
- Perhaps just a forward definition would do? */
-struct orl /* Output ranlib. */
-{
- char **name; /* Symbol name. */
- union
- {
- file_ptr pos;
- bfd *abfd;
- } u; /* bfd* or file position. */
- int namidx; /* Index into string table. */
-};
-
-/* Linenumber stuff. */
-typedef struct lineno_cache_entry
-{
- unsigned int line_number; /* Linenumber from start of function. */
- union
- {
- struct bfd_symbol *sym; /* Function name. */
- bfd_vma offset; /* Offset into section. */
- } u;
-}
-alent;
-
-/* Object and core file sections. */
-typedef struct bfd_section *sec_ptr;
-
-#define align_power(addr, align) \
- (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align))))
-
-/* Align an address upward to a boundary, expressed as a number of bytes.
- E.g. align to an 8-byte boundary with argument of 8. Take care never
- to wrap around if the address is within boundary-1 of the end of the
- address space. */
-#define BFD_ALIGN(this, boundary) \
- ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
- ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \
- : ~ (bfd_vma) 0)
-
-#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name)
-#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma)
-#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma)
-#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \
- (ptr)->alignment_power)
-#define bfd_section_name(bfd, ptr) ((ptr)->name)
-#define bfd_section_size(bfd, ptr) ((ptr)->size)
-#define bfd_get_section_size(ptr) ((ptr)->size)
-#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
-#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
-#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
-#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags)
-#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata)
-
-#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
-
-#define bfd_get_section_limit_octets(bfd, sec) \
- ((bfd)->direction != write_direction && (sec)->rawsize != 0 \
- ? (sec)->rawsize : (sec)->size)
-
-/* Find the address one past the end of SEC. */
-#define bfd_get_section_limit(bfd, sec) \
- (bfd_get_section_limit_octets(bfd, sec) / bfd_octets_per_byte (bfd))
-
-/* Return TRUE if input section SEC has been discarded. */
-#define discarded_section(sec) \
- (!bfd_is_abs_section (sec) \
- && bfd_is_abs_section ((sec)->output_section) \
- && (sec)->sec_info_type != SEC_INFO_TYPE_MERGE \
- && (sec)->sec_info_type != SEC_INFO_TYPE_JUST_SYMS)
-
-typedef enum bfd_print_symbol
-{
- bfd_print_symbol_name,
- bfd_print_symbol_more,
- bfd_print_symbol_all
-} bfd_print_symbol_type;
-
-/* Information about a symbol that nm needs. */
-
-typedef struct _symbol_info
-{
- symvalue value;
- char type;
- const char *name; /* Symbol name. */
- unsigned char stab_type; /* Stab type. */
- char stab_other; /* Stab other. */
- short stab_desc; /* Stab desc. */
- const char *stab_name; /* String for stab type. */
-} symbol_info;
-
-/* Get the name of a stabs type code. */
-
-extern const char *bfd_get_stab_name (int);
-
-/* Hash table routines. There is no way to free up a hash table. */
-
-/* An element in the hash table. Most uses will actually use a larger
- structure, and an instance of this will be the first field. */
-
-struct bfd_hash_entry
-{
- /* Next entry for this hash code. */
- struct bfd_hash_entry *next;
- /* String being hashed. */
- const char *string;
- /* Hash code. This is the full hash code, not the index into the
- table. */
- unsigned long hash;
-};
-
-/* A hash table. */
-
-struct bfd_hash_table
-{
- /* The hash array. */
- struct bfd_hash_entry **table;
- /* A function used to create new elements in the hash table. The
- first entry is itself a pointer to an element. When this
- function is first invoked, this pointer will be NULL. However,
- having the pointer permits a hierarchy of method functions to be
- built each of which calls the function in the superclass. Thus
- each function should be written to allocate a new block of memory
- only if the argument is NULL. */
- struct bfd_hash_entry *(*newfunc)
- (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
- /* An objalloc for this hash table. This is a struct objalloc *,
- but we use void * to avoid requiring the inclusion of objalloc.h. */
- void *memory;
- /* The number of slots in the hash table. */
- unsigned int size;
- /* The number of entries in the hash table. */
- unsigned int count;
- /* The size of elements. */
- unsigned int entsize;
- /* If non-zero, don't grow the hash table. */
- unsigned int frozen:1;
-};
-
-/* Initialize a hash table. */
-extern bfd_boolean bfd_hash_table_init
- (struct bfd_hash_table *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *),
- unsigned int);
-
-/* Initialize a hash table specifying a size. */
-extern bfd_boolean bfd_hash_table_init_n
- (struct bfd_hash_table *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *),
- unsigned int, unsigned int);
-
-/* Free up a hash table. */
-extern void bfd_hash_table_free
- (struct bfd_hash_table *);
-
-/* Look up a string in a hash table. If CREATE is TRUE, a new entry
- will be created for this string if one does not already exist. The
- COPY argument must be TRUE if this routine should copy the string
- into newly allocated memory when adding an entry. */
-extern struct bfd_hash_entry *bfd_hash_lookup
- (struct bfd_hash_table *, const char *, bfd_boolean create,
- bfd_boolean copy);
-
-/* Insert an entry in a hash table. */
-extern struct bfd_hash_entry *bfd_hash_insert
- (struct bfd_hash_table *, const char *, unsigned long);
-
-/* Rename an entry in a hash table. */
-extern void bfd_hash_rename
- (struct bfd_hash_table *, const char *, struct bfd_hash_entry *);
-
-/* Replace an entry in a hash table. */
-extern void bfd_hash_replace
- (struct bfd_hash_table *, struct bfd_hash_entry *old,
- struct bfd_hash_entry *nw);
-
-/* Base method for creating a hash table entry. */
-extern struct bfd_hash_entry *bfd_hash_newfunc
- (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
-
-/* Grab some space for a hash table entry. */
-extern void *bfd_hash_allocate
- (struct bfd_hash_table *, unsigned int);
-
-/* Traverse a hash table in a random order, calling a function on each
- element. If the function returns FALSE, the traversal stops. The
- INFO argument is passed to the function. */
-extern void bfd_hash_traverse
- (struct bfd_hash_table *,
- bfd_boolean (*) (struct bfd_hash_entry *, void *),
- void *info);
-
-/* Allows the default size of a hash table to be configured. New hash
- tables allocated using bfd_hash_table_init will be created with
- this size. */
-extern unsigned long bfd_hash_set_default_size (unsigned long);
-
-/* Types of compressed DWARF debug sections. We currently support
- zlib. */
-enum compressed_debug_section_type
-{
- COMPRESS_DEBUG_NONE = 0,
- COMPRESS_DEBUG = 1 << 0,
- COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1,
- COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2
-};
-
-/* This structure is used to keep track of stabs in sections
- information while linking. */
-
-struct stab_info
-{
- /* A hash table used to hold stabs strings. */
- struct bfd_strtab_hash *strings;
- /* The header file hash table. */
- struct bfd_hash_table includes;
- /* The first .stabstr section. */
- struct bfd_section *stabstr;
-};
-
-#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table
-
-/* User program access to BFD facilities. */
-
-/* Direct I/O routines, for programs which know more about the object
- file than BFD does. Use higher level routines if possible. */
-
-extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *);
-extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *);
-extern int bfd_seek (bfd *, file_ptr, int);
-extern file_ptr bfd_tell (bfd *);
-extern int bfd_flush (bfd *);
-extern int bfd_stat (bfd *, struct stat *);
-
-/* Deprecated old routines. */
-#if __GNUC__
-#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \
- bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \
- bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#else
-#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
- bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
- bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#endif
-extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
-
-/* Cast from const char * to char * so that caller can assign to
- a char * without a warning. */
-#define bfd_get_filename(abfd) ((char *) (abfd)->filename)
-#define bfd_get_cacheable(abfd) ((abfd)->cacheable)
-#define bfd_get_format(abfd) ((abfd)->format)
-#define bfd_get_target(abfd) ((abfd)->xvec->name)
-#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
-#define bfd_family_coff(abfd) \
- (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \
- bfd_get_flavour (abfd) == bfd_target_xcoff_flavour)
-#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
-#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
-#define bfd_header_big_endian(abfd) \
- ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG)
-#define bfd_header_little_endian(abfd) \
- ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE)
-#define bfd_get_file_flags(abfd) ((abfd)->flags)
-#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
-#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
-#define bfd_has_map(abfd) ((abfd)->has_armap)
-#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive)
-
-#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types)
-#define bfd_usrdata(abfd) ((abfd)->usrdata)
-
-#define bfd_get_start_address(abfd) ((abfd)->start_address)
-#define bfd_get_symcount(abfd) ((abfd)->symcount)
-#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols)
-#define bfd_count_sections(abfd) ((abfd)->section_count)
-
-#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount)
-
-#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
-
-extern bfd_boolean bfd_cache_close
- (bfd *abfd);
-/* NB: This declaration should match the autogenerated one in libbfd.h. */
-
-extern bfd_boolean bfd_cache_close_all (void);
-
-extern bfd_boolean bfd_record_phdr
- (bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
- bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
-
-/* Byte swapping routines. */
-
-bfd_uint64_t bfd_getb64 (const void *);
-bfd_uint64_t bfd_getl64 (const void *);
-bfd_int64_t bfd_getb_signed_64 (const void *);
-bfd_int64_t bfd_getl_signed_64 (const void *);
-bfd_vma bfd_getb32 (const void *);
-bfd_vma bfd_getl32 (const void *);
-bfd_signed_vma bfd_getb_signed_32 (const void *);
-bfd_signed_vma bfd_getl_signed_32 (const void *);
-bfd_vma bfd_getb16 (const void *);
-bfd_vma bfd_getl16 (const void *);
-bfd_signed_vma bfd_getb_signed_16 (const void *);
-bfd_signed_vma bfd_getl_signed_16 (const void *);
-void bfd_putb64 (bfd_uint64_t, void *);
-void bfd_putl64 (bfd_uint64_t, void *);
-void bfd_putb32 (bfd_vma, void *);
-void bfd_putl32 (bfd_vma, void *);
-void bfd_putb24 (bfd_vma, void *);
-void bfd_putl24 (bfd_vma, void *);
-void bfd_putb16 (bfd_vma, void *);
-void bfd_putl16 (bfd_vma, void *);
-
-/* Byte swapping routines which take size and endiannes as arguments. */
-
-bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
-void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
-
-#if defined(__STDC__) || defined(ALMOST_STDC)
-struct ecoff_debug_info;
-struct ecoff_debug_swap;
-struct ecoff_extr;
-struct bfd_symbol;
-struct bfd_link_info;
-struct bfd_link_hash_entry;
-struct bfd_section_already_linked;
-struct bfd_elf_version_tree;
-#endif
-
-extern bfd_boolean bfd_section_already_linked_table_init (void);
-extern void bfd_section_already_linked_table_free (void);
-extern bfd_boolean _bfd_handle_already_linked
- (struct bfd_section *, struct bfd_section_already_linked *,
- struct bfd_link_info *);
-
-/* Externally visible ECOFF routines. */
-
-extern bfd_boolean bfd_ecoff_set_gp_value
- (bfd *abfd, bfd_vma gp_value);
-extern bfd_boolean bfd_ecoff_set_regmasks
- (bfd *abfd, unsigned long gprmask, unsigned long fprmask,
- unsigned long *cprmask);
-extern void *bfd_ecoff_debug_init
- (bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
-extern void bfd_ecoff_debug_free
- (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_accumulate
- (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
- struct ecoff_debug_info *input_debug,
- const struct ecoff_debug_swap *input_swap, struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_accumulate_other
- (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
- struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_externals
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap, bfd_boolean relocatable,
- bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *),
- void (*set_index) (struct bfd_symbol *, bfd_size_type));
-extern bfd_boolean bfd_ecoff_debug_one_external
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap, const char *name,
- struct ecoff_extr *esym);
-extern bfd_size_type bfd_ecoff_debug_size
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap);
-extern bfd_boolean bfd_ecoff_write_debug
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap, file_ptr where);
-extern bfd_boolean bfd_ecoff_write_accumulated_debug
- (void *handle, bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap,
- struct bfd_link_info *info, file_ptr where);
-
-/* Externally visible ELF routines. */
-
-struct bfd_link_needed_list
-{
- struct bfd_link_needed_list *next;
- bfd *by;
- const char *name;
-};
-
-enum dynamic_lib_link_class {
- DYN_NORMAL = 0,
- DYN_AS_NEEDED = 1,
- DYN_DT_NEEDED = 2,
- DYN_NO_ADD_NEEDED = 4,
- DYN_NO_NEEDED = 8
-};
-
-enum notice_asneeded_action {
- notice_as_needed,
- notice_not_needed,
- notice_needed
-};
-
-extern bfd_boolean bfd_elf_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
- bfd_boolean);
-extern struct bfd_link_needed_list *bfd_elf_get_needed_list
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_elf_get_bfd_needed_list
- (bfd *, struct bfd_link_needed_list **);
-extern bfd_boolean bfd_elf_stack_segment_size (bfd *, struct bfd_link_info *,
- const char *, bfd_vma);
-extern bfd_boolean bfd_elf_size_dynamic_sections
- (bfd *, const char *, const char *, const char *, const char *, const char *,
- const char * const *, struct bfd_link_info *, struct bfd_section **);
-extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr
- (bfd *, struct bfd_link_info *);
-extern void bfd_elf_set_dt_needed_name
- (bfd *, const char *);
-extern const char *bfd_elf_get_dt_soname
- (bfd *);
-extern void bfd_elf_set_dyn_lib_class
- (bfd *, enum dynamic_lib_link_class);
-extern int bfd_elf_get_dyn_lib_class
- (bfd *);
-extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
- (bfd *, struct bfd_link_info *);
-extern int bfd_elf_discard_info
- (bfd *, struct bfd_link_info *);
-extern unsigned int _bfd_elf_default_action_discarded
- (struct bfd_section *);
-
-/* Return an upper bound on the number of bytes required to store a
- copy of ABFD's program header table entries. Return -1 if an error
- occurs; bfd_get_error will return an appropriate code. */
-extern long bfd_get_elf_phdr_upper_bound
- (bfd *abfd);
-
-/* Copy ABFD's program header table entries to *PHDRS. The entries
- will be stored as an array of Elf_Internal_Phdr structures, as
- defined in include/elf/internal.h. To find out how large the
- buffer needs to be, call bfd_get_elf_phdr_upper_bound.
-
- Return the number of program header table entries read, or -1 if an
- error occurs; bfd_get_error will return an appropriate code. */
-extern int bfd_get_elf_phdrs
- (bfd *abfd, void *phdrs);
-
-/* Create a new BFD as if by bfd_openr. Rather than opening a file,
- reconstruct an ELF file by reading the segments out of remote
- memory based on the ELF file header at EHDR_VMA and the ELF program
- headers it points to. If non-zero, SIZE is the known extent of the
- object. If not null, *LOADBASEP is filled in with the difference
- between the VMAs from which the segments were read, and the VMAs
- the file headers (and hence BFD's idea of each section's VMA) put
- them at.
-
- The function TARGET_READ_MEMORY is called to copy LEN bytes from
- the remote memory at target address VMA into the local buffer at
- MYADDR; it should return zero on success or an `errno' code on
- failure. TEMPL must be a BFD for a target with the word size and
- byte order found in the remote memory. */
-extern bfd *bfd_elf_bfd_from_remote_memory
- (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr,
- bfd_size_type len));
-
-extern struct bfd_section *_bfd_elf_tls_setup
- (bfd *, struct bfd_link_info *);
-
-extern struct bfd_section *
-_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma);
-
-extern void _bfd_fix_excluded_sec_syms
- (bfd *, struct bfd_link_info *);
-
-extern unsigned bfd_m68k_mach_to_features (int);
-
-extern int bfd_m68k_features_to_mach (unsigned);
-
-extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
- char **);
-
-extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
- char **);
-
-extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
- char **);
-
-/* SunOS shared library support routines for the linker. */
-
-extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_sunos_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_sunos_size_dynamic_sections
- (bfd *, struct bfd_link_info *, struct bfd_section **,
- struct bfd_section **, struct bfd_section **);
-
-/* Linux shared library support routines for the linker. */
-
-extern bfd_boolean bfd_i386linux_size_dynamic_sections
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_sparclinux_size_dynamic_sections
- (bfd *, struct bfd_link_info *);
-
-/* mmap hacks */
-
-struct _bfd_window_internal;
-typedef struct _bfd_window_internal bfd_window_internal;
-
-typedef struct _bfd_window
-{
- /* What the user asked for. */
- void *data;
- bfd_size_type size;
- /* The actual window used by BFD. Small user-requested read-only
- regions sharing a page may share a single window into the object
- file. Read-write versions shouldn't until I've fixed things to
- keep track of which portions have been claimed by the
- application; don't want to give the same region back when the
- application wants two writable copies! */
- struct _bfd_window_internal *i;
-}
-bfd_window;
-
-extern void bfd_init_window
- (bfd_window *);
-extern void bfd_free_window
- (bfd_window *);
-extern bfd_boolean bfd_get_file_window
- (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean);
-
-/* XCOFF support routines for the linker. */
-
-extern bfd_boolean bfd_xcoff_split_import_path
- (bfd *, const char *, const char **, const char **);
-extern bfd_boolean bfd_xcoff_set_archive_import_path
- (struct bfd_link_info *, bfd *, const char *);
-extern bfd_boolean bfd_xcoff_link_record_set
- (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
-extern bfd_boolean bfd_xcoff_import_symbol
- (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
- const char *, const char *, const char *, unsigned int);
-extern bfd_boolean bfd_xcoff_export_symbol
- (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
-extern bfd_boolean bfd_xcoff_link_count_reloc
- (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_xcoff_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_xcoff_size_dynamic_sections
- (bfd *, struct bfd_link_info *, const char *, const char *,
- unsigned long, unsigned long, unsigned long, bfd_boolean,
- int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean);
-extern bfd_boolean bfd_xcoff_link_generate_rtinit
- (bfd *, const char *, const char *, bfd_boolean);
-
-/* XCOFF support routines for ar. */
-extern bfd_boolean bfd_xcoff_ar_archive_set_magic
- (bfd *, char *);
-
-/* Externally visible COFF routines. */
-
-#if defined(__STDC__) || defined(ALMOST_STDC)
-struct internal_syment;
-union internal_auxent;
-#endif
-
-extern bfd_boolean bfd_coff_set_symbol_class
- (bfd *, struct bfd_symbol *, unsigned int);
-
-/* ARM VFP11 erratum workaround support. */
-typedef enum
-{
- BFD_ARM_VFP11_FIX_DEFAULT,
- BFD_ARM_VFP11_FIX_NONE,
- BFD_ARM_VFP11_FIX_SCALAR,
- BFD_ARM_VFP11_FIX_VECTOR
-} bfd_arm_vfp11_fix;
-
-extern void bfd_elf32_arm_init_maps
- (bfd *);
-
-extern void bfd_elf32_arm_set_vfp11_fix
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_set_cortex_a8_fix
- (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_vfp11_fix_veneer_locations
- (bfd *, struct bfd_link_info *);
-
-/* ARM STM STM32L4XX erratum workaround support. */
-typedef enum
-{
- BFD_ARM_STM32L4XX_FIX_NONE,
- BFD_ARM_STM32L4XX_FIX_DEFAULT,
- BFD_ARM_STM32L4XX_FIX_ALL
-} bfd_arm_stm32l4xx_fix;
-
-extern void bfd_elf32_arm_set_stm32l4xx_fix
- (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations
- (bfd *, struct bfd_link_info *);
-
-/* ARM Interworking support. Called from linker. */
-extern bfd_boolean bfd_arm_allocate_interworking_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean bfd_arm_process_before_allocation
- (bfd *, struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_arm_get_bfd_for_interworking
- (bfd *, struct bfd_link_info *);
-
-/* PE ARM Interworking support. Called from linker. */
-extern bfd_boolean bfd_arm_pe_allocate_interworking_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean bfd_arm_pe_process_before_allocation
- (bfd *, struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking
- (bfd *, struct bfd_link_info *);
-
-/* ELF ARM Interworking support. Called from linker. */
-extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_process_before_allocation
- (bfd *, struct bfd_link_info *);
-
-struct elf32_arm_params {
- char *thumb_entry_symbol;
- int byteswap_code;
- int target1_is_rel;
- char * target2_type;
- int fix_v4bx;
- int use_blx;
- bfd_arm_vfp11_fix vfp11_denorm_fix;
- bfd_arm_stm32l4xx_fix stm32l4xx_fix;
- int no_enum_size_warning;
- int no_wchar_size_warning;
- int pic_veneer;
- int fix_cortex_a8;
- int fix_arm1176;
- int merge_exidx_entries;
- int cmse_implib;
- bfd *in_implib_bfd;
-};
-
-void bfd_elf32_arm_set_target_params
- (bfd *, struct bfd_link_info *, struct elf32_arm_params *);
-
-extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
- (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_keep_private_stub_output_sections
- (struct bfd_link_info *);
-
-/* ELF ARM mapping symbol support. */
-#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0)
-#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1)
-#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2)
-#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0)
-
-extern bfd_boolean bfd_is_arm_special_symbol_name
- (const char *, int);
-
-extern void bfd_elf32_arm_set_byteswap_code
- (struct bfd_link_info *, int);
-
-extern void bfd_elf32_arm_use_long_plt (void);
-
-/* ARM Note section processing. */
-extern bfd_boolean bfd_arm_merge_machines
- (bfd *, bfd *);
-
-extern bfd_boolean bfd_arm_update_notes
- (bfd *, const char *);
-
-extern unsigned int bfd_arm_get_mach_from_notes
- (bfd *, const char *);
-
-/* ARM stub generation support. Called from the linker. */
-extern int elf32_arm_setup_section_lists
- (bfd *, struct bfd_link_info *);
-extern void elf32_arm_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf32_arm_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *,
- struct bfd_section *, unsigned int),
- void (*) (void));
-extern bfd_boolean elf32_arm_build_stubs
- (struct bfd_link_info *);
-
-/* ARM unwind section editing support. */
-extern bfd_boolean elf32_arm_fix_exidx_coverage
-(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
-
-/* C6x unwind section editing support. */
-extern bfd_boolean elf32_tic6x_fix_exidx_coverage
-(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
-
-extern void bfd_elf64_aarch64_init_maps
- (bfd *);
-
-extern void bfd_elf32_aarch64_init_maps
- (bfd *);
-
-extern void bfd_elf64_aarch64_set_options
- (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
-
-extern void bfd_elf32_aarch64_set_options
- (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
-
-/* ELF AArch64 mapping symbol support. */
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0)
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1)
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2)
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0)
-extern bfd_boolean bfd_is_aarch64_special_symbol_name
- (const char * name, int type);
-
-/* AArch64 stub generation support for ELF64. Called from the linker. */
-extern int elf64_aarch64_setup_section_lists
- (bfd *, struct bfd_link_info *);
-extern void elf64_aarch64_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf64_aarch64_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *),
- void (*) (void));
-extern bfd_boolean elf64_aarch64_build_stubs
- (struct bfd_link_info *);
-/* AArch64 stub generation support for ELF32. Called from the linker. */
-extern int elf32_aarch64_setup_section_lists
- (bfd *, struct bfd_link_info *);
-extern void elf32_aarch64_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf32_aarch64_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *),
- void (*) (void));
-extern bfd_boolean elf32_aarch64_build_stubs
- (struct bfd_link_info *);
-
-
-/* TI COFF load page support. */
-extern void bfd_ticoff_set_section_load_page
- (struct bfd_section *, int);
-
-extern int bfd_ticoff_get_section_load_page
- (struct bfd_section *);
-
-/* H8/300 functions. */
-extern bfd_vma bfd_h8300_pad_address
- (bfd *, bfd_vma);
-
-/* IA64 Itanium code generation. Called from linker. */
-extern void bfd_elf32_ia64_after_parse
- (int);
-
-extern void bfd_elf64_ia64_after_parse
- (int);
-
-/* V850 Note manipulation routines. */
-extern bfd_boolean v850_elf_create_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean v850_elf_set_note
- (bfd *, unsigned int, unsigned int);
-
-/* MIPS ABI flags data access. For the disassembler. */
-struct elf_internal_abiflags_v0;
-extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *);
-
-/* C-SKY functions. */
-extern bfd_boolean elf32_csky_build_stubs
- (struct bfd_link_info *);
-extern bfd_boolean elf32_csky_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section *(*) (const char*, struct bfd_section*),
- void (*) (void));
-extern void elf32_csky_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern int elf32_csky_setup_section_lists
- (bfd *, struct bfd_link_info *);
-/* Extracted from init.c. */
-unsigned int bfd_init (void);
-
-
-/* Value returned by bfd_init. */
-
-#define BFD_INIT_MAGIC (sizeof (struct bfd_section))
-/* Extracted from opncls.c. */
-/* Set to N to open the next N BFDs using an alternate id space. */
-extern unsigned int bfd_use_reserved_id;
-bfd *bfd_fopen (const char *filename, const char *target,
- const char *mode, int fd);
-
-bfd *bfd_openr (const char *filename, const char *target);
-
-bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
-
-bfd *bfd_openstreamr (const char * filename, const char * target,
- void * stream);
-
-bfd *bfd_openr_iovec (const char *filename, const char *target,
- void *(*open_func) (struct bfd *nbfd,
- void *open_closure),
- void *open_closure,
- file_ptr (*pread_func) (struct bfd *nbfd,
- void *stream,
- void *buf,
- file_ptr nbytes,
- file_ptr offset),
- int (*close_func) (struct bfd *nbfd,
- void *stream),
- int (*stat_func) (struct bfd *abfd,
- void *stream,
- struct stat *sb));
-
-bfd *bfd_openw (const char *filename, const char *target);
-
-bfd_boolean bfd_close (bfd *abfd);
-
-bfd_boolean bfd_close_all_done (bfd *);
-
-bfd *bfd_create (const char *filename, bfd *templ);
-
-bfd_boolean bfd_make_writable (bfd *abfd);
-
-bfd_boolean bfd_make_readable (bfd *abfd);
-
-void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
-
-void *bfd_zalloc (bfd *abfd, bfd_size_type wanted);
-
-unsigned long bfd_calc_gnu_debuglink_crc32
- (unsigned long crc, const unsigned char *buf, bfd_size_type len);
-
-char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
-
-char *bfd_get_alt_debug_link_info (bfd * abfd,
- bfd_size_type *buildid_len,
- bfd_byte **buildid_out);
-
-char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
-
-char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir);
-
-struct bfd_section *bfd_create_gnu_debuglink_section
- (bfd *abfd, const char *filename);
-
-bfd_boolean bfd_fill_in_gnu_debuglink_section
- (bfd *abfd, struct bfd_section *sect, const char *filename);
-
-char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir);
-
-/* Extracted from libbfd.c. */
-
-/* Byte swapping macros for user section data. */
-
-#define bfd_put_8(abfd, val, ptr) \
- ((void) (*((unsigned char *) (ptr)) = (val) & 0xff))
-#define bfd_put_signed_8 \
- bfd_put_8
-#define bfd_get_8(abfd, ptr) \
- (*(const unsigned char *) (ptr) & 0xff)
-#define bfd_get_signed_8(abfd, ptr) \
- (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
-
-#define bfd_put_16(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
-#define bfd_put_signed_16 \
- bfd_put_16
-#define bfd_get_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx16, (ptr))
-#define bfd_get_signed_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
-
-#define bfd_put_24(abfd, val, ptr) \
- do \
- if (bfd_big_endian (abfd)) \
- bfd_putb24 ((val), (ptr)); \
- else \
- bfd_putl24 ((val), (ptr)); \
- while (0)
-
-bfd_vma bfd_getb24 (const void *p);
-bfd_vma bfd_getl24 (const void *p);
-
-#define bfd_get_24(abfd, ptr) \
- (bfd_big_endian (abfd) ? bfd_getb24 (ptr) : bfd_getl24 (ptr))
-
-#define bfd_put_32(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
-#define bfd_put_signed_32 \
- bfd_put_32
-#define bfd_get_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx32, (ptr))
-#define bfd_get_signed_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_32, (ptr))
-
-#define bfd_put_64(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx64, ((val), (ptr)))
-#define bfd_put_signed_64 \
- bfd_put_64
-#define bfd_get_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx64, (ptr))
-#define bfd_get_signed_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
-
-#define bfd_get(bits, abfd, ptr) \
- ((bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr) \
- : (bits) == 16 ? bfd_get_16 (abfd, ptr) \
- : (bits) == 32 ? bfd_get_32 (abfd, ptr) \
- : (bits) == 64 ? bfd_get_64 (abfd, ptr) \
- : (abort (), (bfd_vma) - 1))
-
-#define bfd_put(bits, abfd, val, ptr) \
- ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
- : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
- : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
- : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
- : (abort (), (void) 0))
-
-
-/* Byte swapping macros for file header data. */
-
-#define bfd_h_put_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
-#define bfd_h_put_signed_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
-#define bfd_h_get_8(abfd, ptr) \
- bfd_get_8 (abfd, ptr)
-#define bfd_h_get_signed_8(abfd, ptr) \
- bfd_get_signed_8 (abfd, ptr)
-
-#define bfd_h_put_16(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
-#define bfd_h_put_signed_16 \
- bfd_h_put_16
-#define bfd_h_get_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx16, (ptr))
-#define bfd_h_get_signed_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
-
-#define bfd_h_put_32(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
-#define bfd_h_put_signed_32 \
- bfd_h_put_32
-#define bfd_h_get_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx32, (ptr))
-#define bfd_h_get_signed_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
-
-#define bfd_h_put_64(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
-#define bfd_h_put_signed_64 \
- bfd_h_put_64
-#define bfd_h_get_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx64, (ptr))
-#define bfd_h_get_signed_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
-
-/* Aliases for the above, which should eventually go away. */
-
-#define H_PUT_64 bfd_h_put_64
-#define H_PUT_32 bfd_h_put_32
-#define H_PUT_16 bfd_h_put_16
-#define H_PUT_8 bfd_h_put_8
-#define H_PUT_S64 bfd_h_put_signed_64
-#define H_PUT_S32 bfd_h_put_signed_32
-#define H_PUT_S16 bfd_h_put_signed_16
-#define H_PUT_S8 bfd_h_put_signed_8
-#define H_GET_64 bfd_h_get_64
-#define H_GET_32 bfd_h_get_32
-#define H_GET_16 bfd_h_get_16
-#define H_GET_8 bfd_h_get_8
-#define H_GET_S64 bfd_h_get_signed_64
-#define H_GET_S32 bfd_h_get_signed_32
-#define H_GET_S16 bfd_h_get_signed_16
-#define H_GET_S8 bfd_h_get_signed_8
-
-
-/* Extracted from bfdio.c. */
-long bfd_get_mtime (bfd *abfd);
-
-ufile_ptr bfd_get_size (bfd *abfd);
-
-ufile_ptr bfd_get_file_size (bfd *abfd);
-
-void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
- int prot, int flags, file_ptr offset,
- void **map_addr, bfd_size_type *map_len);
-
-/* Extracted from bfdwin.c. */
-/* Extracted from section.c. */
-
-typedef struct bfd_section
-{
- /* The name of the section; the name isn't a copy, the pointer is
- the same as that passed to bfd_make_section. */
- const char *name;
-
- /* A unique sequence number. */
- unsigned int id;
-
- /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
- unsigned int index;
-
- /* The next section in the list belonging to the BFD, or NULL. */
- struct bfd_section *next;
-
- /* The previous section in the list belonging to the BFD, or NULL. */
- struct bfd_section *prev;
-
- /* The field flags contains attributes of the section. Some
- flags are read in from the object file, and some are
- synthesized from other information. */
- flagword flags;
-
-#define SEC_NO_FLAGS 0x0
-
- /* Tells the OS to allocate space for this section when loading.
- This is clear for a section containing debug information only. */
-#define SEC_ALLOC 0x1
-
- /* Tells the OS to load the section from the file when loading.
- This is clear for a .bss section. */
-#define SEC_LOAD 0x2
-
- /* The section contains data still to be relocated, so there is
- some relocation information too. */
-#define SEC_RELOC 0x4
-
- /* A signal to the OS that the section contains read only data. */
-#define SEC_READONLY 0x8
-
- /* The section contains code only. */
-#define SEC_CODE 0x10
-
- /* The section contains data only. */
-#define SEC_DATA 0x20
-
- /* The section will reside in ROM. */
-#define SEC_ROM 0x40
-
- /* The section contains constructor information. This section
- type is used by the linker to create lists of constructors and
- destructors used by <>. When a back end sees a symbol
- which should be used in a constructor list, it creates a new
- section for the type of name (e.g., <<__CTOR_LIST__>>), attaches
- the symbol to it, and builds a relocation. To build the lists
- of constructors, all the linker has to do is catenate all the
- sections called <<__CTOR_LIST__>> and relocate the data
- contained within - exactly the operations it would peform on
- standard data. */
-#define SEC_CONSTRUCTOR 0x80
-
- /* The section has contents - a data section could be
- <> | <>; a debug section could be
- <> */
-#define SEC_HAS_CONTENTS 0x100
-
- /* An instruction to the linker to not output the section
- even if it has information which would normally be written. */
-#define SEC_NEVER_LOAD 0x200
-
- /* The section contains thread local data. */
-#define SEC_THREAD_LOCAL 0x400
-
- /* The section's size is fixed. Generic linker code will not
- recalculate it and it is up to whoever has set this flag to
- get the size right. */
-#define SEC_FIXED_SIZE 0x800
-
- /* The section contains common symbols (symbols may be defined
- multiple times, the value of a symbol is the amount of
- space it requires, and the largest symbol value is the one
- used). Most targets have exactly one of these (which we
- translate to bfd_com_section_ptr), but ECOFF has two. */
-#define SEC_IS_COMMON 0x1000
-
- /* The section contains only debugging information. For
- example, this is set for ELF .debug and .stab sections.
- strip tests this flag to see if a section can be
- discarded. */
-#define SEC_DEBUGGING 0x2000
-
- /* The contents of this section are held in memory pointed to
- by the contents field. This is checked by bfd_get_section_contents,
- and the data is retrieved from memory if appropriate. */
-#define SEC_IN_MEMORY 0x4000
-
- /* The contents of this section are to be excluded by the
- linker for executable and shared objects unless those
- objects are to be further relocated. */
-#define SEC_EXCLUDE 0x8000
-
- /* The contents of this section are to be sorted based on the sum of
- the symbol and addend values specified by the associated relocation
- entries. Entries without associated relocation entries will be
- appended to the end of the section in an unspecified order. */
-#define SEC_SORT_ENTRIES 0x10000
-
- /* When linking, duplicate sections of the same name should be
- discarded, rather than being combined into a single section as
- is usually done. This is similar to how common symbols are
- handled. See SEC_LINK_DUPLICATES below. */
-#define SEC_LINK_ONCE 0x20000
-
- /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
- should handle duplicate sections. */
-#define SEC_LINK_DUPLICATES 0xc0000
-
- /* This value for SEC_LINK_DUPLICATES means that duplicate
- sections with the same name should simply be discarded. */
-#define SEC_LINK_DUPLICATES_DISCARD 0x0
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if there are any duplicate sections, although
- it should still only link one copy. */
-#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections are a different size. */
-#define SEC_LINK_DUPLICATES_SAME_SIZE 0x80000
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections contain different
- contents. */
-#define SEC_LINK_DUPLICATES_SAME_CONTENTS \
- (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
-
- /* This section was created by the linker as part of dynamic
- relocation or other arcane processing. It is skipped when
- going through the first-pass output, trusting that someone
- else up the line will take care of it later. */
-#define SEC_LINKER_CREATED 0x100000
-
- /* This section should not be subject to garbage collection.
- Also set to inform the linker that this section should not be
- listed in the link map as discarded. */
-#define SEC_KEEP 0x200000
-
- /* This section contains "short" data, and should be placed
- "near" the GP. */
-#define SEC_SMALL_DATA 0x400000
-
- /* Attempt to merge identical entities in the section.
- Entity size is given in the entsize field. */
-#define SEC_MERGE 0x800000
-
- /* If given with SEC_MERGE, entities to merge are zero terminated
- strings where entsize specifies character size instead of fixed
- size entries. */
-#define SEC_STRINGS 0x1000000
-
- /* This section contains data about section groups. */
-#define SEC_GROUP 0x2000000
-
- /* The section is a COFF shared library section. This flag is
- only for the linker. If this type of section appears in
- the input file, the linker must copy it to the output file
- without changing the vma or size. FIXME: Although this
- was originally intended to be general, it really is COFF
- specific (and the flag was renamed to indicate this). It
- might be cleaner to have some more general mechanism to
- allow the back end to control what the linker does with
- sections. */
-#define SEC_COFF_SHARED_LIBRARY 0x4000000
-
- /* This input section should be copied to output in reverse order
- as an array of pointers. This is for ELF linker internal use
- only. */
-#define SEC_ELF_REVERSE_COPY 0x4000000
-
- /* This section contains data which may be shared with other
- executables or shared objects. This is for COFF only. */
-#define SEC_COFF_SHARED 0x8000000
-
- /* This section should be compressed. This is for ELF linker
- internal use only. */
-#define SEC_ELF_COMPRESS 0x8000000
-
- /* When a section with this flag is being linked, then if the size of
- the input section is less than a page, it should not cross a page
- boundary. If the size of the input section is one page or more,
- it should be aligned on a page boundary. This is for TI
- TMS320C54X only. */
-#define SEC_TIC54X_BLOCK 0x10000000
-
- /* This section should be renamed. This is for ELF linker
- internal use only. */
-#define SEC_ELF_RENAME 0x10000000
-
- /* Conditionally link this section; do not link if there are no
- references found to any symbol in the section. This is for TI
- TMS320C54X only. */
-#define SEC_TIC54X_CLINK 0x20000000
-
- /* This section contains vliw code. This is for Toshiba MeP only. */
-#define SEC_MEP_VLIW 0x20000000
-
- /* Indicate that section has the no read flag set. This happens
- when memory read flag isn't set. */
-#define SEC_COFF_NOREAD 0x40000000
-
- /* Indicate that section has the purecode flag set. */
-#define SEC_ELF_PURECODE 0x80000000
-
- /* End of section flags. */
-
- /* Some internal packed boolean fields. */
-
- /* See the vma field. */
- unsigned int user_set_vma : 1;
-
- /* A mark flag used by some of the linker backends. */
- unsigned int linker_mark : 1;
-
- /* Another mark flag used by some of the linker backends. Set for
- output sections that have an input section. */
- unsigned int linker_has_input : 1;
-
- /* Mark flag used by some linker backends for garbage collection. */
- unsigned int gc_mark : 1;
-
- /* Section compression status. */
- unsigned int compress_status : 2;
-#define COMPRESS_SECTION_NONE 0
-#define COMPRESS_SECTION_DONE 1
-#define DECOMPRESS_SECTION_SIZED 2
-
- /* The following flags are used by the ELF linker. */
-
- /* Mark sections which have been allocated to segments. */
- unsigned int segment_mark : 1;
-
- /* Type of sec_info information. */
- unsigned int sec_info_type:3;
-#define SEC_INFO_TYPE_NONE 0
-#define SEC_INFO_TYPE_STABS 1
-#define SEC_INFO_TYPE_MERGE 2
-#define SEC_INFO_TYPE_EH_FRAME 3
-#define SEC_INFO_TYPE_JUST_SYMS 4
-#define SEC_INFO_TYPE_TARGET 5
-#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6
-
- /* Nonzero if this section uses RELA relocations, rather than REL. */
- unsigned int use_rela_p:1;
-
- /* Bits used by various backends. The generic code doesn't touch
- these fields. */
-
- unsigned int sec_flg0:1;
- unsigned int sec_flg1:1;
- unsigned int sec_flg2:1;
- unsigned int sec_flg3:1;
- unsigned int sec_flg4:1;
- unsigned int sec_flg5:1;
-
- /* End of internal packed boolean fields. */
-
- /* The virtual memory address of the section - where it will be
- at run time. The symbols are relocated against this. The
- user_set_vma flag is maintained by bfd; if it's not set, the
- backend can assign addresses (for example, in <>, where
- the default address for <<.data>> is dependent on the specific
- target and various flags). */
- bfd_vma vma;
-
- /* The load address of the section - where it would be in a
- rom image; really only used for writing section header
- information. */
- bfd_vma lma;
-
- /* The size of the section in *octets*, as it will be output.
- Contains a value even if the section has no contents (e.g., the
- size of <<.bss>>). */
- bfd_size_type size;
-
- /* For input sections, the original size on disk of the section, in
- octets. This field should be set for any section whose size is
- changed by linker relaxation. It is required for sections where
- the linker relaxation scheme doesn't cache altered section and
- reloc contents (stabs, eh_frame, SEC_MERGE, some coff relaxing
- targets), and thus the original size needs to be kept to read the
- section multiple times. For output sections, rawsize holds the
- section size calculated on a previous linker relaxation pass. */
- bfd_size_type rawsize;
-
- /* The compressed size of the section in octets. */
- bfd_size_type compressed_size;
-
- /* Relaxation table. */
- struct relax_table *relax;
-
- /* Count of used relaxation table entries. */
- int relax_count;
-
-
- /* If this section is going to be output, then this value is the
- offset in *bytes* into the output section of the first byte in the
- input section (byte ==> smallest addressable unit on the
- target). In most cases, if this was going to start at the
- 100th octet (8-bit quantity) in the output section, this value
- would be 100. However, if the target byte size is 16 bits
- (bfd_octets_per_byte is "2"), this value would be 50. */
- bfd_vma output_offset;
-
- /* The output section through which to map on output. */
- struct bfd_section *output_section;
-
- /* The alignment requirement of the section, as an exponent of 2 -
- e.g., 3 aligns to 2^3 (or 8). */
- unsigned int alignment_power;
-
- /* If an input section, a pointer to a vector of relocation
- records for the data in this section. */
- struct reloc_cache_entry *relocation;
-
- /* If an output section, a pointer to a vector of pointers to
- relocation records for the data in this section. */
- struct reloc_cache_entry **orelocation;
-
- /* The number of relocation records in one of the above. */
- unsigned reloc_count;
-
- /* Information below is back end specific - and not always used
- or updated. */
-
- /* File position of section data. */
- file_ptr filepos;
-
- /* File position of relocation info. */
- file_ptr rel_filepos;
-
- /* File position of line data. */
- file_ptr line_filepos;
-
- /* Pointer to data for applications. */
- void *userdata;
-
- /* If the SEC_IN_MEMORY flag is set, this points to the actual
- contents. */
- unsigned char *contents;
-
- /* Attached line number information. */
- alent *lineno;
-
- /* Number of line number records. */
- unsigned int lineno_count;
-
- /* Entity size for merging purposes. */
- unsigned int entsize;
-
- /* Points to the kept section if this section is a link-once section,
- and is discarded. */
- struct bfd_section *kept_section;
-
- /* When a section is being output, this value changes as more
- linenumbers are written out. */
- file_ptr moving_line_filepos;
-
- /* What the section number is in the target world. */
- int target_index;
-
- void *used_by_bfd;
-
- /* If this is a constructor section then here is a list of the
- relocations created to relocate items within it. */
- struct relent_chain *constructor_chain;
-
- /* The BFD which owns the section. */
- bfd *owner;
-
- /* A symbol which points at this section only. */
- struct bfd_symbol *symbol;
- struct bfd_symbol **symbol_ptr_ptr;
-
- /* Early in the link process, map_head and map_tail are used to build
- a list of input sections attached to an output section. Later,
- output sections use these fields for a list of bfd_link_order
- structs. */
- union {
- struct bfd_link_order *link_order;
- struct bfd_section *s;
- } map_head, map_tail;
-} asection;
-
-/* Relax table contains information about instructions which can
- be removed by relaxation -- replacing a long address with a
- short address. */
-struct relax_table {
- /* Address where bytes may be deleted. */
- bfd_vma addr;
-
- /* Number of bytes to be deleted. */
- int size;
-};
-
-/* Note: the following are provided as inline functions rather than macros
- because not all callers use the return value. A macro implementation
- would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
- compilers will complain about comma expressions that have no effect. */
-static inline bfd_boolean
-bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr,
- void * val)
-{
- ptr->userdata = val;
- return TRUE;
-}
-
-static inline bfd_boolean
-bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
-{
- ptr->vma = ptr->lma = val;
- ptr->user_set_vma = TRUE;
- return TRUE;
-}
-
-static inline bfd_boolean
-bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr,
- unsigned int val)
-{
- ptr->alignment_power = val;
- return TRUE;
-}
-
-/* These sections are global, and are managed by BFD. The application
- and target back end are not permitted to change the values in
- these sections. */
-extern asection _bfd_std_section[4];
-
-#define BFD_ABS_SECTION_NAME "*ABS*"
-#define BFD_UND_SECTION_NAME "*UND*"
-#define BFD_COM_SECTION_NAME "*COM*"
-#define BFD_IND_SECTION_NAME "*IND*"
-
-/* Pointer to the common section. */
-#define bfd_com_section_ptr (&_bfd_std_section[0])
-/* Pointer to the undefined section. */
-#define bfd_und_section_ptr (&_bfd_std_section[1])
-/* Pointer to the absolute section. */
-#define bfd_abs_section_ptr (&_bfd_std_section[2])
-/* Pointer to the indirect section. */
-#define bfd_ind_section_ptr (&_bfd_std_section[3])
-
-#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
-#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
-#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
-
-#define bfd_is_const_section(SEC) \
- ( ((SEC) == bfd_abs_section_ptr) \
- || ((SEC) == bfd_und_section_ptr) \
- || ((SEC) == bfd_com_section_ptr) \
- || ((SEC) == bfd_ind_section_ptr))
-
-/* Macros to handle insertion and deletion of a bfd's sections. These
- only handle the list pointers, ie. do not adjust section_count,
- target_index etc. */
-#define bfd_section_list_remove(ABFD, S) \
- do \
- { \
- asection *_s = S; \
- asection *_next = _s->next; \
- asection *_prev = _s->prev; \
- if (_prev) \
- _prev->next = _next; \
- else \
- (ABFD)->sections = _next; \
- if (_next) \
- _next->prev = _prev; \
- else \
- (ABFD)->section_last = _prev; \
- } \
- while (0)
-#define bfd_section_list_append(ABFD, S) \
- do \
- { \
- asection *_s = S; \
- bfd *_abfd = ABFD; \
- _s->next = NULL; \
- if (_abfd->section_last) \
- { \
- _s->prev = _abfd->section_last; \
- _abfd->section_last->next = _s; \
- } \
- else \
- { \
- _s->prev = NULL; \
- _abfd->sections = _s; \
- } \
- _abfd->section_last = _s; \
- } \
- while (0)
-#define bfd_section_list_prepend(ABFD, S) \
- do \
- { \
- asection *_s = S; \
- bfd *_abfd = ABFD; \
- _s->prev = NULL; \
- if (_abfd->sections) \
- { \
- _s->next = _abfd->sections; \
- _abfd->sections->prev = _s; \
- } \
- else \
- { \
- _s->next = NULL; \
- _abfd->section_last = _s; \
- } \
- _abfd->sections = _s; \
- } \
- while (0)
-#define bfd_section_list_insert_after(ABFD, A, S) \
- do \
- { \
- asection *_a = A; \
- asection *_s = S; \
- asection *_next = _a->next; \
- _s->next = _next; \
- _s->prev = _a; \
- _a->next = _s; \
- if (_next) \
- _next->prev = _s; \
- else \
- (ABFD)->section_last = _s; \
- } \
- while (0)
-#define bfd_section_list_insert_before(ABFD, B, S) \
- do \
- { \
- asection *_b = B; \
- asection *_s = S; \
- asection *_prev = _b->prev; \
- _s->prev = _prev; \
- _s->next = _b; \
- _b->prev = _s; \
- if (_prev) \
- _prev->next = _s; \
- else \
- (ABFD)->sections = _s; \
- } \
- while (0)
-#define bfd_section_removed_from_list(ABFD, S) \
- ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
-
-#define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS) \
- /* name, id, index, next, prev, flags, user_set_vma, */ \
- { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \
- \
- /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \
- 0, 0, 1, 0, \
- \
- /* segment_mark, sec_info_type, use_rela_p, */ \
- 0, 0, 0, \
- \
- /* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5, */ \
- 0, 0, 0, 0, 0, 0, \
- \
- /* vma, lma, size, rawsize, compressed_size, relax, relax_count, */ \
- 0, 0, 0, 0, 0, 0, 0, \
- \
- /* output_offset, output_section, alignment_power, */ \
- 0, &SEC, 0, \
- \
- /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
- NULL, NULL, 0, 0, 0, \
- \
- /* line_filepos, userdata, contents, lineno, lineno_count, */ \
- 0, NULL, NULL, NULL, 0, \
- \
- /* entsize, kept_section, moving_line_filepos, */ \
- 0, NULL, 0, \
- \
- /* target_index, used_by_bfd, constructor_chain, owner, */ \
- 0, NULL, NULL, NULL, \
- \
- /* symbol, symbol_ptr_ptr, */ \
- (struct bfd_symbol *) SYM, &SEC.symbol, \
- \
- /* map_head, map_tail */ \
- { NULL }, { NULL } \
- }
-
-/* We use a macro to initialize the static asymbol structures because
- traditional C does not permit us to initialize a union member while
- gcc warns if we don't initialize it.
- the_bfd, name, value, attr, section [, udata] */
-#ifdef __STDC__
-#define GLOBAL_SYM_INIT(NAME, SECTION) \
- { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }}
-#else
-#define GLOBAL_SYM_INIT(NAME, SECTION) \
- { 0, NAME, 0, BSF_SECTION_SYM, SECTION }
-#endif
-
-void bfd_section_list_clear (bfd *);
-
-asection *bfd_get_section_by_name (bfd *abfd, const char *name);
-
-asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec);
-
-asection *bfd_get_linker_section (bfd *abfd, const char *name);
-
-asection *bfd_get_section_by_name_if
- (bfd *abfd,
- const char *name,
- bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-
-char *bfd_get_unique_section_name
- (bfd *abfd, const char *templat, int *count);
-
-asection *bfd_make_section_old_way (bfd *abfd, const char *name);
-
-asection *bfd_make_section_anyway_with_flags
- (bfd *abfd, const char *name, flagword flags);
-
-asection *bfd_make_section_anyway (bfd *abfd, const char *name);
-
-asection *bfd_make_section_with_flags
- (bfd *, const char *name, flagword flags);
-
-asection *bfd_make_section (bfd *, const char *name);
-
-bfd_boolean bfd_set_section_flags
- (bfd *abfd, asection *sec, flagword flags);
-
-void bfd_rename_section
- (bfd *abfd, asection *sec, const char *newname);
-
-void bfd_map_over_sections
- (bfd *abfd,
- void (*func) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-
-asection *bfd_sections_find_if
- (bfd *abfd,
- bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-
-bfd_boolean bfd_set_section_size
- (bfd *abfd, asection *sec, bfd_size_type val);
-
-bfd_boolean bfd_set_section_contents
- (bfd *abfd, asection *section, const void *data,
- file_ptr offset, bfd_size_type count);
-
-bfd_boolean bfd_get_section_contents
- (bfd *abfd, asection *section, void *location, file_ptr offset,
- bfd_size_type count);
-
-bfd_boolean bfd_malloc_and_get_section
- (bfd *abfd, asection *section, bfd_byte **buf);
-
-bfd_boolean bfd_copy_private_section_data
- (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
-
-#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
- BFD_SEND (obfd, _bfd_copy_private_section_data, \
- (ibfd, isection, obfd, osection))
-bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
-
-bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
-
-/* Extracted from archures.c. */
-enum bfd_architecture
-{
- bfd_arch_unknown, /* File arch not known. */
- bfd_arch_obscure, /* Arch known, not one of these. */
- bfd_arch_m68k, /* Motorola 68xxx. */
-#define bfd_mach_m68000 1
-#define bfd_mach_m68008 2
-#define bfd_mach_m68010 3
-#define bfd_mach_m68020 4
-#define bfd_mach_m68030 5
-#define bfd_mach_m68040 6
-#define bfd_mach_m68060 7
-#define bfd_mach_cpu32 8
-#define bfd_mach_fido 9
-#define bfd_mach_mcf_isa_a_nodiv 10
-#define bfd_mach_mcf_isa_a 11
-#define bfd_mach_mcf_isa_a_mac 12
-#define bfd_mach_mcf_isa_a_emac 13
-#define bfd_mach_mcf_isa_aplus 14
-#define bfd_mach_mcf_isa_aplus_mac 15
-#define bfd_mach_mcf_isa_aplus_emac 16
-#define bfd_mach_mcf_isa_b_nousp 17
-#define bfd_mach_mcf_isa_b_nousp_mac 18
-#define bfd_mach_mcf_isa_b_nousp_emac 19
-#define bfd_mach_mcf_isa_b 20
-#define bfd_mach_mcf_isa_b_mac 21
-#define bfd_mach_mcf_isa_b_emac 22
-#define bfd_mach_mcf_isa_b_float 23
-#define bfd_mach_mcf_isa_b_float_mac 24
-#define bfd_mach_mcf_isa_b_float_emac 25
-#define bfd_mach_mcf_isa_c 26
-#define bfd_mach_mcf_isa_c_mac 27
-#define bfd_mach_mcf_isa_c_emac 28
-#define bfd_mach_mcf_isa_c_nodiv 29
-#define bfd_mach_mcf_isa_c_nodiv_mac 30
-#define bfd_mach_mcf_isa_c_nodiv_emac 31
- bfd_arch_vax, /* DEC Vax. */
-
- bfd_arch_or1k, /* OpenRISC 1000. */
-#define bfd_mach_or1k 1
-#define bfd_mach_or1knd 2
-
- bfd_arch_sparc, /* SPARC. */
-#define bfd_mach_sparc 1
-/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
-#define bfd_mach_sparc_sparclet 2
-#define bfd_mach_sparc_sparclite 3
-#define bfd_mach_sparc_v8plus 4
-#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */
-#define bfd_mach_sparc_sparclite_le 6
-#define bfd_mach_sparc_v9 7
-#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */
-#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */
-#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */
-#define bfd_mach_sparc_v8plusc 11 /* with UA2005 and T1 add'ns. */
-#define bfd_mach_sparc_v9c 12 /* with UA2005 and T1 add'ns. */
-#define bfd_mach_sparc_v8plusd 13 /* with UA2007 and T3 add'ns. */
-#define bfd_mach_sparc_v9d 14 /* with UA2007 and T3 add'ns. */
-#define bfd_mach_sparc_v8pluse 15 /* with OSA2001 and T4 add'ns (no IMA). */
-#define bfd_mach_sparc_v9e 16 /* with OSA2001 and T4 add'ns (no IMA). */
-#define bfd_mach_sparc_v8plusv 17 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
-#define bfd_mach_sparc_v9v 18 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
-#define bfd_mach_sparc_v8plusm 19 /* with OSA2015 and M7 add'ns. */
-#define bfd_mach_sparc_v9m 20 /* with OSA2015 and M7 add'ns. */
-#define bfd_mach_sparc_v8plusm8 21 /* with OSA2017 and M8 add'ns. */
-#define bfd_mach_sparc_v9m8 22 /* with OSA2017 and M8 add'ns. */
-/* Nonzero if MACH has the v9 instruction set. */
-#define bfd_mach_sparc_v9_p(mach) \
- ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9m8 \
- && (mach) != bfd_mach_sparc_sparclite_le)
-/* Nonzero if MACH is a 64 bit sparc architecture. */
-#define bfd_mach_sparc_64bit_p(mach) \
- ((mach) >= bfd_mach_sparc_v9 \
- && (mach) != bfd_mach_sparc_v8plusb \
- && (mach) != bfd_mach_sparc_v8plusc \
- && (mach) != bfd_mach_sparc_v8plusd \
- && (mach) != bfd_mach_sparc_v8pluse \
- && (mach) != bfd_mach_sparc_v8plusv \
- && (mach) != bfd_mach_sparc_v8plusm \
- && (mach) != bfd_mach_sparc_v8plusm8)
- bfd_arch_spu, /* PowerPC SPU. */
-#define bfd_mach_spu 256
- bfd_arch_mips, /* MIPS Rxxxx. */
-#define bfd_mach_mips3000 3000
-#define bfd_mach_mips3900 3900
-#define bfd_mach_mips4000 4000
-#define bfd_mach_mips4010 4010
-#define bfd_mach_mips4100 4100
-#define bfd_mach_mips4111 4111
-#define bfd_mach_mips4120 4120
-#define bfd_mach_mips4300 4300
-#define bfd_mach_mips4400 4400
-#define bfd_mach_mips4600 4600
-#define bfd_mach_mips4650 4650
-#define bfd_mach_mips5000 5000
-#define bfd_mach_mips5400 5400
-#define bfd_mach_mips5500 5500
-#define bfd_mach_mips5900 5900
-#define bfd_mach_mips6000 6000
-#define bfd_mach_mips7000 7000
-#define bfd_mach_mips8000 8000
-#define bfd_mach_mips9000 9000
-#define bfd_mach_mips10000 10000
-#define bfd_mach_mips12000 12000
-#define bfd_mach_mips14000 14000
-#define bfd_mach_mips16000 16000
-#define bfd_mach_mips16 16
-#define bfd_mach_mips5 5
-#define bfd_mach_mips_loongson_2e 3001
-#define bfd_mach_mips_loongson_2f 3002
-#define bfd_mach_mips_gs464 3003
-#define bfd_mach_mips_gs464e 3004
-#define bfd_mach_mips_gs264e 3005
-#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01. */
-#define bfd_mach_mips_octeon 6501
-#define bfd_mach_mips_octeonp 6601
-#define bfd_mach_mips_octeon2 6502
-#define bfd_mach_mips_octeon3 6503
-#define bfd_mach_mips_xlr 887682 /* decimal 'XLR'. */
-#define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2'. */
-#define bfd_mach_mipsisa32 32
-#define bfd_mach_mipsisa32r2 33
-#define bfd_mach_mipsisa32r3 34
-#define bfd_mach_mipsisa32r5 36
-#define bfd_mach_mipsisa32r6 37
-#define bfd_mach_mipsisa64 64
-#define bfd_mach_mipsisa64r2 65
-#define bfd_mach_mipsisa64r3 66
-#define bfd_mach_mipsisa64r5 68
-#define bfd_mach_mipsisa64r6 69
-#define bfd_mach_mips_micromips 96
- bfd_arch_i386, /* Intel 386. */
-#define bfd_mach_i386_intel_syntax (1 << 0)
-#define bfd_mach_i386_i8086 (1 << 1)
-#define bfd_mach_i386_i386 (1 << 2)
-#define bfd_mach_x86_64 (1 << 3)
-#define bfd_mach_x64_32 (1 << 4)
-#define bfd_mach_i386_i386_intel_syntax (bfd_mach_i386_i386 | bfd_mach_i386_intel_syntax)
-#define bfd_mach_x86_64_intel_syntax (bfd_mach_x86_64 | bfd_mach_i386_intel_syntax)
-#define bfd_mach_x64_32_intel_syntax (bfd_mach_x64_32 | bfd_mach_i386_intel_syntax)
- bfd_arch_l1om, /* Intel L1OM. */
-#define bfd_mach_l1om (1 << 5)
-#define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax)
- bfd_arch_k1om, /* Intel K1OM. */
-#define bfd_mach_k1om (1 << 6)
-#define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax)
-#define bfd_mach_i386_nacl (1 << 7)
-#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl)
-#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl)
-#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl)
- bfd_arch_iamcu, /* Intel MCU. */
-#define bfd_mach_iamcu (1 << 8)
-#define bfd_mach_i386_iamcu (bfd_mach_i386_i386 | bfd_mach_iamcu)
-#define bfd_mach_i386_iamcu_intel_syntax (bfd_mach_i386_iamcu | bfd_mach_i386_intel_syntax)
- bfd_arch_romp, /* IBM ROMP PC/RT. */
- bfd_arch_convex, /* Convex. */
- bfd_arch_m98k, /* Motorola 98xxx. */
- bfd_arch_pyramid, /* Pyramid Technology. */
- bfd_arch_h8300, /* Renesas H8/300 (formerly Hitachi H8/300). */
-#define bfd_mach_h8300 1
-#define bfd_mach_h8300h 2
-#define bfd_mach_h8300s 3
-#define bfd_mach_h8300hn 4
-#define bfd_mach_h8300sn 5
-#define bfd_mach_h8300sx 6
-#define bfd_mach_h8300sxn 7
- bfd_arch_pdp11, /* DEC PDP-11. */
- bfd_arch_plugin,
- bfd_arch_powerpc, /* PowerPC. */
-#define bfd_mach_ppc 32
-#define bfd_mach_ppc64 64
-#define bfd_mach_ppc_403 403
-#define bfd_mach_ppc_403gc 4030
-#define bfd_mach_ppc_405 405
-#define bfd_mach_ppc_505 505
-#define bfd_mach_ppc_601 601
-#define bfd_mach_ppc_602 602
-#define bfd_mach_ppc_603 603
-#define bfd_mach_ppc_ec603e 6031
-#define bfd_mach_ppc_604 604
-#define bfd_mach_ppc_620 620
-#define bfd_mach_ppc_630 630
-#define bfd_mach_ppc_750 750
-#define bfd_mach_ppc_860 860
-#define bfd_mach_ppc_a35 35
-#define bfd_mach_ppc_rs64ii 642
-#define bfd_mach_ppc_rs64iii 643
-#define bfd_mach_ppc_7400 7400
-#define bfd_mach_ppc_e500 500
-#define bfd_mach_ppc_e500mc 5001
-#define bfd_mach_ppc_e500mc64 5005
-#define bfd_mach_ppc_e5500 5006
-#define bfd_mach_ppc_e6500 5007
-#define bfd_mach_ppc_titan 83
-#define bfd_mach_ppc_vle 84
- bfd_arch_rs6000, /* IBM RS/6000. */
-#define bfd_mach_rs6k 6000
-#define bfd_mach_rs6k_rs1 6001
-#define bfd_mach_rs6k_rsc 6003
-#define bfd_mach_rs6k_rs2 6002
- bfd_arch_hppa, /* HP PA RISC. */
-#define bfd_mach_hppa10 10
-#define bfd_mach_hppa11 11
-#define bfd_mach_hppa20 20
-#define bfd_mach_hppa20w 25
- bfd_arch_d10v, /* Mitsubishi D10V. */
-#define bfd_mach_d10v 1
-#define bfd_mach_d10v_ts2 2
-#define bfd_mach_d10v_ts3 3
- bfd_arch_d30v, /* Mitsubishi D30V. */
- bfd_arch_dlx, /* DLX. */
- bfd_arch_m68hc11, /* Motorola 68HC11. */
- bfd_arch_m68hc12, /* Motorola 68HC12. */
-#define bfd_mach_m6812_default 0
-#define bfd_mach_m6812 1
-#define bfd_mach_m6812s 2
- bfd_arch_m9s12x, /* Freescale S12X. */
- bfd_arch_m9s12xg, /* Freescale XGATE. */
- bfd_arch_s12z, /* Freescale S12Z. */
-#define bfd_mach_s12z_default 0
- bfd_arch_z8k, /* Zilog Z8000. */
-#define bfd_mach_z8001 1
-#define bfd_mach_z8002 2
- bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */
-#define bfd_mach_sh 1
-#define bfd_mach_sh2 0x20
-#define bfd_mach_sh_dsp 0x2d
-#define bfd_mach_sh2a 0x2a
-#define bfd_mach_sh2a_nofpu 0x2b
-#define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
-#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2
-#define bfd_mach_sh2a_or_sh4 0x2a3
-#define bfd_mach_sh2a_or_sh3e 0x2a4
-#define bfd_mach_sh2e 0x2e
-#define bfd_mach_sh3 0x30
-#define bfd_mach_sh3_nommu 0x31
-#define bfd_mach_sh3_dsp 0x3d
-#define bfd_mach_sh3e 0x3e
-#define bfd_mach_sh4 0x40
-#define bfd_mach_sh4_nofpu 0x41
-#define bfd_mach_sh4_nommu_nofpu 0x42
-#define bfd_mach_sh4a 0x4a
-#define bfd_mach_sh4a_nofpu 0x4b
-#define bfd_mach_sh4al_dsp 0x4d
- bfd_arch_alpha, /* Dec Alpha. */
-#define bfd_mach_alpha_ev4 0x10
-#define bfd_mach_alpha_ev5 0x20
-#define bfd_mach_alpha_ev6 0x30
- bfd_arch_arm, /* Advanced Risc Machines ARM. */
-#define bfd_mach_arm_unknown 0
-#define bfd_mach_arm_2 1
-#define bfd_mach_arm_2a 2
-#define bfd_mach_arm_3 3
-#define bfd_mach_arm_3M 4
-#define bfd_mach_arm_4 5
-#define bfd_mach_arm_4T 6
-#define bfd_mach_arm_5 7
-#define bfd_mach_arm_5T 8
-#define bfd_mach_arm_5TE 9
-#define bfd_mach_arm_XScale 10
-#define bfd_mach_arm_ep9312 11
-#define bfd_mach_arm_iWMMXt 12
-#define bfd_mach_arm_iWMMXt2 13
-#define bfd_mach_arm_5TEJ 14
-#define bfd_mach_arm_6 15
-#define bfd_mach_arm_6KZ 16
-#define bfd_mach_arm_6T2 17
-#define bfd_mach_arm_6K 18
-#define bfd_mach_arm_7 19
-#define bfd_mach_arm_6M 20
-#define bfd_mach_arm_6SM 21
-#define bfd_mach_arm_7EM 22
-#define bfd_mach_arm_8 23
-#define bfd_mach_arm_8R 24
-#define bfd_mach_arm_8M_BASE 25
-#define bfd_mach_arm_8M_MAIN 26
- bfd_arch_nds32, /* Andes NDS32. */
-#define bfd_mach_n1 1
-#define bfd_mach_n1h 2
-#define bfd_mach_n1h_v2 3
-#define bfd_mach_n1h_v3 4
-#define bfd_mach_n1h_v3m 5
- bfd_arch_ns32k, /* National Semiconductors ns32000. */
- bfd_arch_tic30, /* Texas Instruments TMS320C30. */
- bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */
-#define bfd_mach_tic3x 30
-#define bfd_mach_tic4x 40
- bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */
- bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */
- bfd_arch_tic80, /* TI TMS320c80 (MVP). */
- bfd_arch_v850, /* NEC V850. */
- bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */
-#define bfd_mach_v850 1
-#define bfd_mach_v850e 'E'
-#define bfd_mach_v850e1 '1'
-#define bfd_mach_v850e2 0x4532
-#define bfd_mach_v850e2v3 0x45325633
-#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */
- bfd_arch_arc, /* ARC Cores. */
-#define bfd_mach_arc_a4 0
-#define bfd_mach_arc_a5 1
-#define bfd_mach_arc_arc600 2
-#define bfd_mach_arc_arc601 4
-#define bfd_mach_arc_arc700 3
-#define bfd_mach_arc_arcv2 5
- bfd_arch_m32c, /* Renesas M16C/M32C. */
-#define bfd_mach_m16c 0x75
-#define bfd_mach_m32c 0x78
- bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */
-#define bfd_mach_m32r 1 /* For backwards compatibility. */
-#define bfd_mach_m32rx 'x'
-#define bfd_mach_m32r2 '2'
- bfd_arch_mn10200, /* Matsushita MN10200. */
- bfd_arch_mn10300, /* Matsushita MN10300. */
-#define bfd_mach_mn10300 300
-#define bfd_mach_am33 330
-#define bfd_mach_am33_2 332
- bfd_arch_fr30,
-#define bfd_mach_fr30 0x46523330
- bfd_arch_frv,
-#define bfd_mach_frv 1
-#define bfd_mach_frvsimple 2
-#define bfd_mach_fr300 300
-#define bfd_mach_fr400 400
-#define bfd_mach_fr450 450
-#define bfd_mach_frvtomcat 499 /* fr500 prototype. */
-#define bfd_mach_fr500 500
-#define bfd_mach_fr550 550
- bfd_arch_moxie, /* The moxie processor. */
-#define bfd_mach_moxie 1
- bfd_arch_ft32, /* The ft32 processor. */
-#define bfd_mach_ft32 1
-#define bfd_mach_ft32b 2
- bfd_arch_mcore,
- bfd_arch_mep,
-#define bfd_mach_mep 1
-#define bfd_mach_mep_h1 0x6831
-#define bfd_mach_mep_c5 0x6335
- bfd_arch_metag,
-#define bfd_mach_metag 1
- bfd_arch_ia64, /* HP/Intel ia64. */
-#define bfd_mach_ia64_elf64 64
-#define bfd_mach_ia64_elf32 32
- bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */
-#define bfd_mach_ip2022 1
-#define bfd_mach_ip2022ext 2
- bfd_arch_iq2000, /* Vitesse IQ2000. */
-#define bfd_mach_iq2000 1
-#define bfd_mach_iq10 2
- bfd_arch_epiphany, /* Adapteva EPIPHANY. */
-#define bfd_mach_epiphany16 1
-#define bfd_mach_epiphany32 2
- bfd_arch_mt,
-#define bfd_mach_ms1 1
-#define bfd_mach_mrisc2 2
-#define bfd_mach_ms2 3
- bfd_arch_pj,
- bfd_arch_avr, /* Atmel AVR microcontrollers. */
-#define bfd_mach_avr1 1
-#define bfd_mach_avr2 2
-#define bfd_mach_avr25 25
-#define bfd_mach_avr3 3
-#define bfd_mach_avr31 31
-#define bfd_mach_avr35 35
-#define bfd_mach_avr4 4
-#define bfd_mach_avr5 5
-#define bfd_mach_avr51 51
-#define bfd_mach_avr6 6
-#define bfd_mach_avrtiny 100
-#define bfd_mach_avrxmega1 101
-#define bfd_mach_avrxmega2 102
-#define bfd_mach_avrxmega3 103
-#define bfd_mach_avrxmega4 104
-#define bfd_mach_avrxmega5 105
-#define bfd_mach_avrxmega6 106
-#define bfd_mach_avrxmega7 107
- bfd_arch_bfin, /* ADI Blackfin. */
-#define bfd_mach_bfin 1
- bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */
-#define bfd_mach_cr16 1
- bfd_arch_cr16c, /* National Semiconductor CompactRISC. */
-#define bfd_mach_cr16c 1
- bfd_arch_crx, /* National Semiconductor CRX. */
-#define bfd_mach_crx 1
- bfd_arch_cris, /* Axis CRIS. */
-#define bfd_mach_cris_v0_v10 255
-#define bfd_mach_cris_v32 32
-#define bfd_mach_cris_v10_v32 1032
- bfd_arch_riscv,
-#define bfd_mach_riscv32 132
-#define bfd_mach_riscv64 164
- bfd_arch_rl78,
-#define bfd_mach_rl78 0x75
- bfd_arch_rx, /* Renesas RX. */
-#define bfd_mach_rx 0x75
-#define bfd_mach_rx_v2 0x76
-#define bfd_mach_rx_v3 0x77
- bfd_arch_s390, /* IBM s390. */
-#define bfd_mach_s390_31 31
-#define bfd_mach_s390_64 64
- bfd_arch_score, /* Sunplus score. */
-#define bfd_mach_score3 3
-#define bfd_mach_score7 7
- bfd_arch_mmix, /* Donald Knuth's educational processor. */
- bfd_arch_xstormy16,
-#define bfd_mach_xstormy16 1
- bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */
-#define bfd_mach_msp11 11
-#define bfd_mach_msp110 110
-#define bfd_mach_msp12 12
-#define bfd_mach_msp13 13
-#define bfd_mach_msp14 14
-#define bfd_mach_msp15 15
-#define bfd_mach_msp16 16
-#define bfd_mach_msp20 20
-#define bfd_mach_msp21 21
-#define bfd_mach_msp22 22
-#define bfd_mach_msp23 23
-#define bfd_mach_msp24 24
-#define bfd_mach_msp26 26
-#define bfd_mach_msp31 31
-#define bfd_mach_msp32 32
-#define bfd_mach_msp33 33
-#define bfd_mach_msp41 41
-#define bfd_mach_msp42 42
-#define bfd_mach_msp43 43
-#define bfd_mach_msp44 44
-#define bfd_mach_msp430x 45
-#define bfd_mach_msp46 46
-#define bfd_mach_msp47 47
-#define bfd_mach_msp54 54
- bfd_arch_xc16x, /* Infineon's XC16X Series. */
-#define bfd_mach_xc16x 1
-#define bfd_mach_xc16xl 2
-#define bfd_mach_xc16xs 3
- bfd_arch_xgate, /* Freescale XGATE. */
-#define bfd_mach_xgate 1
- bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
-#define bfd_mach_xtensa 1
- bfd_arch_z80,
-#define bfd_mach_z80strict 1 /* No undocumented opcodes. */
-#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */
-#define bfd_mach_z80full 7 /* All undocumented instructions. */
-#define bfd_mach_r800 11 /* R800: successor with multiplication. */
- bfd_arch_lm32, /* Lattice Mico32. */
-#define bfd_mach_lm32 1
- bfd_arch_microblaze,/* Xilinx MicroBlaze. */
- bfd_arch_tilepro, /* Tilera TILEPro. */
- bfd_arch_tilegx, /* Tilera TILE-Gx. */
-#define bfd_mach_tilepro 1
-#define bfd_mach_tilegx 1
-#define bfd_mach_tilegx32 2
- bfd_arch_aarch64, /* AArch64. */
-#define bfd_mach_aarch64 0
-#define bfd_mach_aarch64_ilp32 32
- bfd_arch_nios2, /* Nios II. */
-#define bfd_mach_nios2 0
-#define bfd_mach_nios2r1 1
-#define bfd_mach_nios2r2 2
- bfd_arch_visium, /* Visium. */
-#define bfd_mach_visium 1
- bfd_arch_wasm32, /* WebAssembly. */
-#define bfd_mach_wasm32 1
- bfd_arch_pru, /* PRU. */
-#define bfd_mach_pru 0
- bfd_arch_nfp, /* Netronome Flow Processor */
-#define bfd_mach_nfp3200 0x3200
-#define bfd_mach_nfp6000 0x6000
- bfd_arch_csky, /* C-SKY. */
-#define bfd_mach_ck_unknown 0
-#define bfd_mach_ck510 1
-#define bfd_mach_ck610 2
-#define bfd_mach_ck801 3
-#define bfd_mach_ck802 4
-#define bfd_mach_ck803 5
-#define bfd_mach_ck807 6
-#define bfd_mach_ck810 7
- bfd_arch_last
- };
-
-typedef struct bfd_arch_info
-{
- int bits_per_word;
- int bits_per_address;
- int bits_per_byte;
- enum bfd_architecture arch;
- unsigned long mach;
- const char *arch_name;
- const char *printable_name;
- unsigned int section_align_power;
- /* TRUE if this is the default machine for the architecture.
- The default arch should be the first entry for an arch so that
- all the entries for that arch can be accessed via <>. */
- bfd_boolean the_default;
- const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *,
- const struct bfd_arch_info *);
-
- bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
-
- /* Allocate via bfd_malloc and return a fill buffer of size COUNT. If
- IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is
- TRUE, the buffer contains code. */
- void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian,
- bfd_boolean code);
-
- const struct bfd_arch_info *next;
-}
-bfd_arch_info_type;
-
-const char *bfd_printable_name (bfd *abfd);
-
-const bfd_arch_info_type *bfd_scan_arch (const char *string);
-
-const char **bfd_arch_list (void);
-
-const bfd_arch_info_type *bfd_arch_get_compatible
- (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
-
-void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
-
-bfd_boolean bfd_default_set_arch_mach
- (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
-
-enum bfd_architecture bfd_get_arch (bfd *abfd);
-
-unsigned long bfd_get_mach (bfd *abfd);
-
-unsigned int bfd_arch_bits_per_byte (bfd *abfd);
-
-unsigned int bfd_arch_bits_per_address (bfd *abfd);
-
-const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
-
-const bfd_arch_info_type *bfd_lookup_arch
- (enum bfd_architecture arch, unsigned long machine);
-
-const char *bfd_printable_arch_mach
- (enum bfd_architecture arch, unsigned long machine);
-
-unsigned int bfd_octets_per_byte (bfd *abfd);
-
-unsigned int bfd_arch_mach_octets_per_byte
- (enum bfd_architecture arch, unsigned long machine);
-
-/* Extracted from reloc.c. */
-
-typedef enum bfd_reloc_status
-{
- /* No errors detected. Note - the value 2 is used so that it
- will not be mistaken for the boolean TRUE or FALSE values. */
- bfd_reloc_ok = 2,
-
- /* The relocation was performed, but there was an overflow. */
- bfd_reloc_overflow,
-
- /* The address to relocate was not within the section supplied. */
- bfd_reloc_outofrange,
-
- /* Used by special functions. */
- bfd_reloc_continue,
-
- /* Unsupported relocation size requested. */
- bfd_reloc_notsupported,
-
- /* Unused. */
- bfd_reloc_other,
-
- /* The symbol to relocate against was undefined. */
- bfd_reloc_undefined,
-
- /* The relocation was performed, but may not be ok. If this type is
- returned, the error_message argument to bfd_perform_relocation
- will be set. */
- bfd_reloc_dangerous
- }
- bfd_reloc_status_type;
-
-typedef const struct reloc_howto_struct reloc_howto_type;
-
-typedef struct reloc_cache_entry
-{
- /* A pointer into the canonical table of pointers. */
- struct bfd_symbol **sym_ptr_ptr;
-
- /* offset in section. */
- bfd_size_type address;
-
- /* addend for relocation value. */
- bfd_vma addend;
-
- /* Pointer to how to perform the required relocation. */
- reloc_howto_type *howto;
-
-}
-arelent;
-
-
-enum complain_overflow
-{
- /* Do not complain on overflow. */
- complain_overflow_dont,
-
- /* Complain if the value overflows when considered as a signed
- number one bit larger than the field. ie. A bitfield of N bits
- is allowed to represent -2**n to 2**n-1. */
- complain_overflow_bitfield,
-
- /* Complain if the value overflows when considered as a signed
- number. */
- complain_overflow_signed,
-
- /* Complain if the value overflows when considered as an
- unsigned number. */
- complain_overflow_unsigned
-};
-struct reloc_howto_struct
-{
- /* The type field has mainly a documentary use - the back end can
- do what it wants with it, though normally the back end's idea of
- an external reloc number is stored in this field. */
- unsigned int type;
-
- /* The encoded size of the item to be relocated. This is *not* a
- power-of-two measure. Use bfd_get_reloc_size to find the size
- of the item in bytes. */
- unsigned int size:3;
-
- /* The number of bits in the field to be relocated. This is used
- when doing overflow checking. */
- unsigned int bitsize:7;
-
- /* The value the final relocation is shifted right by. This drops
- unwanted data from the relocation. */
- unsigned int rightshift:6;
-
- /* The bit position of the reloc value in the destination.
- The relocated value is left shifted by this amount. */
- unsigned int bitpos:6;
-
- /* What type of overflow error should be checked for when
- relocating. */
- ENUM_BITFIELD (complain_overflow) complain_on_overflow:2;
-
- /* The relocation value should be negated before applying. */
- unsigned int negate:1;
-
- /* The relocation is relative to the item being relocated. */
- unsigned int pc_relative:1;
-
- /* Some formats record a relocation addend in the section contents
- rather than with the relocation. For ELF formats this is the
- distinction between USE_REL and USE_RELA (though the code checks
- for USE_REL == 1/0). The value of this field is TRUE if the
- addend is recorded with the section contents; when performing a
- partial link (ld -r) the section contents (the data) will be
- modified. The value of this field is FALSE if addends are
- recorded with the relocation (in arelent.addend); when performing
- a partial link the relocation will be modified.
- All relocations for all ELF USE_RELA targets should set this field
- to FALSE (values of TRUE should be looked on with suspicion).
- However, the converse is not true: not all relocations of all ELF
- USE_REL targets set this field to TRUE. Why this is so is peculiar
- to each particular target. For relocs that aren't used in partial
- links (e.g. GOT stuff) it doesn't matter what this is set to. */
- unsigned int partial_inplace:1;
-
- /* When some formats create PC relative instructions, they leave
- the value of the pc of the place being relocated in the offset
- slot of the instruction, so that a PC relative relocation can
- be made just by adding in an ordinary offset (e.g., sun3 a.out).
- Some formats leave the displacement part of an instruction
- empty (e.g., ELF); this flag signals the fact. */
- unsigned int pcrel_offset:1;
-
- /* src_mask selects the part of the instruction (or data) to be used
- in the relocation sum. If the target relocations don't have an
- addend in the reloc, eg. ELF USE_REL, src_mask will normally equal
- dst_mask to extract the addend from the section contents. If
- relocations do have an addend in the reloc, eg. ELF USE_RELA, this
- field should normally be zero. Non-zero values for ELF USE_RELA
- targets should be viewed with suspicion as normally the value in
- the dst_mask part of the section contents should be ignored. */
- bfd_vma src_mask;
-
- /* dst_mask selects which parts of the instruction (or data) are
- replaced with a relocated value. */
- bfd_vma dst_mask;
-
- /* If this field is non null, then the supplied function is
- called rather than the normal function. This allows really
- strange relocation methods to be accommodated. */
- bfd_reloc_status_type (*special_function)
- (bfd *, arelent *, struct bfd_symbol *, void *, asection *,
- bfd *, char **);
-
- /* The textual name of the relocation type. */
- char *name;
-};
-
-#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \
- inplace, src_mask, dst_mask, pcrel_off) \
- { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \
- size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name }
-#define EMPTY_HOWTO(C) \
- HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \
- NULL, FALSE, 0, 0, FALSE)
-
-unsigned int bfd_get_reloc_size (reloc_howto_type *);
-
-typedef struct relent_chain
-{
- arelent relent;
- struct relent_chain *next;
-}
-arelent_chain;
-
-bfd_reloc_status_type bfd_check_overflow
- (enum complain_overflow how,
- unsigned int bitsize,
- unsigned int rightshift,
- unsigned int addrsize,
- bfd_vma relocation);
-
-bfd_boolean bfd_reloc_offset_in_range
- (reloc_howto_type *howto,
- bfd *abfd,
- asection *section,
- bfd_size_type offset);
-
-bfd_reloc_status_type bfd_perform_relocation
- (bfd *abfd,
- arelent *reloc_entry,
- void *data,
- asection *input_section,
- bfd *output_bfd,
- char **error_message);
-
-bfd_reloc_status_type bfd_install_relocation
- (bfd *abfd,
- arelent *reloc_entry,
- void *data, bfd_vma data_start,
- asection *input_section,
- char **error_message);
-
-enum bfd_reloc_code_real {
- _dummy_first_bfd_reloc_code_real,
-
-
-/* Basic absolute relocations of N bits. */
- BFD_RELOC_64,
- BFD_RELOC_32,
- BFD_RELOC_26,
- BFD_RELOC_24,
- BFD_RELOC_16,
- BFD_RELOC_14,
- BFD_RELOC_8,
-
-/* PC-relative relocations. Sometimes these are relative to the address
-of the relocation itself; sometimes they are relative to the start of
-the section containing the relocation. It depends on the specific target. */
- BFD_RELOC_64_PCREL,
- BFD_RELOC_32_PCREL,
- BFD_RELOC_24_PCREL,
- BFD_RELOC_16_PCREL,
- BFD_RELOC_12_PCREL,
- BFD_RELOC_8_PCREL,
-
-/* Section relative relocations. Some targets need this for DWARF2. */
- BFD_RELOC_32_SECREL,
-
-/* For ELF. */
- BFD_RELOC_32_GOT_PCREL,
- BFD_RELOC_16_GOT_PCREL,
- BFD_RELOC_8_GOT_PCREL,
- BFD_RELOC_32_GOTOFF,
- BFD_RELOC_16_GOTOFF,
- BFD_RELOC_LO16_GOTOFF,
- BFD_RELOC_HI16_GOTOFF,
- BFD_RELOC_HI16_S_GOTOFF,
- BFD_RELOC_8_GOTOFF,
- BFD_RELOC_64_PLT_PCREL,
- BFD_RELOC_32_PLT_PCREL,
- BFD_RELOC_24_PLT_PCREL,
- BFD_RELOC_16_PLT_PCREL,
- BFD_RELOC_8_PLT_PCREL,
- BFD_RELOC_64_PLTOFF,
- BFD_RELOC_32_PLTOFF,
- BFD_RELOC_16_PLTOFF,
- BFD_RELOC_LO16_PLTOFF,
- BFD_RELOC_HI16_PLTOFF,
- BFD_RELOC_HI16_S_PLTOFF,
- BFD_RELOC_8_PLTOFF,
-
-/* Size relocations. */
- BFD_RELOC_SIZE32,
- BFD_RELOC_SIZE64,
-
-/* Relocations used by 68K ELF. */
- BFD_RELOC_68K_GLOB_DAT,
- BFD_RELOC_68K_JMP_SLOT,
- BFD_RELOC_68K_RELATIVE,
- BFD_RELOC_68K_TLS_GD32,
- BFD_RELOC_68K_TLS_GD16,
- BFD_RELOC_68K_TLS_GD8,
- BFD_RELOC_68K_TLS_LDM32,
- BFD_RELOC_68K_TLS_LDM16,
- BFD_RELOC_68K_TLS_LDM8,
- BFD_RELOC_68K_TLS_LDO32,
- BFD_RELOC_68K_TLS_LDO16,
- BFD_RELOC_68K_TLS_LDO8,
- BFD_RELOC_68K_TLS_IE32,
- BFD_RELOC_68K_TLS_IE16,
- BFD_RELOC_68K_TLS_IE8,
- BFD_RELOC_68K_TLS_LE32,
- BFD_RELOC_68K_TLS_LE16,
- BFD_RELOC_68K_TLS_LE8,
-
-/* Linkage-table relative. */
- BFD_RELOC_32_BASEREL,
- BFD_RELOC_16_BASEREL,
- BFD_RELOC_LO16_BASEREL,
- BFD_RELOC_HI16_BASEREL,
- BFD_RELOC_HI16_S_BASEREL,
- BFD_RELOC_8_BASEREL,
- BFD_RELOC_RVA,
-
-/* Absolute 8-bit relocation, but used to form an address like 0xFFnn. */
- BFD_RELOC_8_FFnn,
-
-/* These PC-relative relocations are stored as word displacements --
-i.e., byte displacements shifted right two bits. The 30-bit word
-displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the
-SPARC. (SPARC tools generally refer to this as <>.) The
-signed 16-bit displacement is used on the MIPS, and the 23-bit
-displacement is used on the Alpha. */
- BFD_RELOC_32_PCREL_S2,
- BFD_RELOC_16_PCREL_S2,
- BFD_RELOC_23_PCREL_S2,
-
-/* High 22 bits and low 10 bits of 32-bit value, placed into lower bits of
-the target word. These are used on the SPARC. */
- BFD_RELOC_HI22,
- BFD_RELOC_LO10,
-
-/* For systems that allocate a Global Pointer register, these are
-displacements off that register. These relocation types are
-handled specially, because the value the register will have is
-decided relatively late. */
- BFD_RELOC_GPREL16,
- BFD_RELOC_GPREL32,
-
-/* SPARC ELF relocations. There is probably some overlap with other
-relocation types already defined. */
- BFD_RELOC_NONE,
- BFD_RELOC_SPARC_WDISP22,
- BFD_RELOC_SPARC22,
- BFD_RELOC_SPARC13,
- BFD_RELOC_SPARC_GOT10,
- BFD_RELOC_SPARC_GOT13,
- BFD_RELOC_SPARC_GOT22,
- BFD_RELOC_SPARC_PC10,
- BFD_RELOC_SPARC_PC22,
- BFD_RELOC_SPARC_WPLT30,
- BFD_RELOC_SPARC_COPY,
- BFD_RELOC_SPARC_GLOB_DAT,
- BFD_RELOC_SPARC_JMP_SLOT,
- BFD_RELOC_SPARC_RELATIVE,
- BFD_RELOC_SPARC_UA16,
- BFD_RELOC_SPARC_UA32,
- BFD_RELOC_SPARC_UA64,
- BFD_RELOC_SPARC_GOTDATA_HIX22,
- BFD_RELOC_SPARC_GOTDATA_LOX10,
- BFD_RELOC_SPARC_GOTDATA_OP_HIX22,
- BFD_RELOC_SPARC_GOTDATA_OP_LOX10,
- BFD_RELOC_SPARC_GOTDATA_OP,
- BFD_RELOC_SPARC_JMP_IREL,
- BFD_RELOC_SPARC_IRELATIVE,
-
-/* I think these are specific to SPARC a.out (e.g., Sun 4). */
- BFD_RELOC_SPARC_BASE13,
- BFD_RELOC_SPARC_BASE22,
-
-/* SPARC64 relocations */
-#define BFD_RELOC_SPARC_64 BFD_RELOC_64
- BFD_RELOC_SPARC_10,
- BFD_RELOC_SPARC_11,
- BFD_RELOC_SPARC_OLO10,
- BFD_RELOC_SPARC_HH22,
- BFD_RELOC_SPARC_HM10,
- BFD_RELOC_SPARC_LM22,
- BFD_RELOC_SPARC_PC_HH22,
- BFD_RELOC_SPARC_PC_HM10,
- BFD_RELOC_SPARC_PC_LM22,
- BFD_RELOC_SPARC_WDISP16,
- BFD_RELOC_SPARC_WDISP19,
- BFD_RELOC_SPARC_7,
- BFD_RELOC_SPARC_6,
- BFD_RELOC_SPARC_5,
-#define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL
- BFD_RELOC_SPARC_PLT32,
- BFD_RELOC_SPARC_PLT64,
- BFD_RELOC_SPARC_HIX22,
- BFD_RELOC_SPARC_LOX10,
- BFD_RELOC_SPARC_H44,
- BFD_RELOC_SPARC_M44,
- BFD_RELOC_SPARC_L44,
- BFD_RELOC_SPARC_REGISTER,
- BFD_RELOC_SPARC_H34,
- BFD_RELOC_SPARC_SIZE32,
- BFD_RELOC_SPARC_SIZE64,
- BFD_RELOC_SPARC_WDISP10,
-
-/* SPARC little endian relocation */
- BFD_RELOC_SPARC_REV32,
-
-/* SPARC TLS relocations */
- BFD_RELOC_SPARC_TLS_GD_HI22,
- BFD_RELOC_SPARC_TLS_GD_LO10,
- BFD_RELOC_SPARC_TLS_GD_ADD,
- BFD_RELOC_SPARC_TLS_GD_CALL,
- BFD_RELOC_SPARC_TLS_LDM_HI22,
- BFD_RELOC_SPARC_TLS_LDM_LO10,
- BFD_RELOC_SPARC_TLS_LDM_ADD,
- BFD_RELOC_SPARC_TLS_LDM_CALL,
- BFD_RELOC_SPARC_TLS_LDO_HIX22,
- BFD_RELOC_SPARC_TLS_LDO_LOX10,
- BFD_RELOC_SPARC_TLS_LDO_ADD,
- BFD_RELOC_SPARC_TLS_IE_HI22,
- BFD_RELOC_SPARC_TLS_IE_LO10,
- BFD_RELOC_SPARC_TLS_IE_LD,
- BFD_RELOC_SPARC_TLS_IE_LDX,
- BFD_RELOC_SPARC_TLS_IE_ADD,
- BFD_RELOC_SPARC_TLS_LE_HIX22,
- BFD_RELOC_SPARC_TLS_LE_LOX10,
- BFD_RELOC_SPARC_TLS_DTPMOD32,
- BFD_RELOC_SPARC_TLS_DTPMOD64,
- BFD_RELOC_SPARC_TLS_DTPOFF32,
- BFD_RELOC_SPARC_TLS_DTPOFF64,
- BFD_RELOC_SPARC_TLS_TPOFF32,
- BFD_RELOC_SPARC_TLS_TPOFF64,
-
-/* SPU Relocations. */
- BFD_RELOC_SPU_IMM7,
- BFD_RELOC_SPU_IMM8,
- BFD_RELOC_SPU_IMM10,
- BFD_RELOC_SPU_IMM10W,
- BFD_RELOC_SPU_IMM16,
- BFD_RELOC_SPU_IMM16W,
- BFD_RELOC_SPU_IMM18,
- BFD_RELOC_SPU_PCREL9a,
- BFD_RELOC_SPU_PCREL9b,
- BFD_RELOC_SPU_PCREL16,
- BFD_RELOC_SPU_LO16,
- BFD_RELOC_SPU_HI16,
- BFD_RELOC_SPU_PPU32,
- BFD_RELOC_SPU_PPU64,
- BFD_RELOC_SPU_ADD_PIC,
-
-/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
-"addend" in some special way.
-For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
-writing; when reading, it will be the absolute section symbol. The
-addend is the displacement in bytes of the "lda" instruction from
-the "ldah" instruction (which is at the address of this reloc). */
- BFD_RELOC_ALPHA_GPDISP_HI16,
-
-/* For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
-with GPDISP_HI16 relocs. The addend is ignored when writing the
-relocations out, and is filled in with the file's GP value on
-reading, for convenience. */
- BFD_RELOC_ALPHA_GPDISP_LO16,
-
-/* The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
-relocation except that there is no accompanying GPDISP_LO16
-relocation. */
- BFD_RELOC_ALPHA_GPDISP,
-
-/* The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
-the assembler turns it into a LDQ instruction to load the address of
-the symbol, and then fills in a register in the real instruction.
-
-The LITERAL reloc, at the LDQ instruction, refers to the .lita
-section symbol. The addend is ignored when writing, but is filled
-in with the file's GP value on reading, for convenience, as with the
-GPDISP_LO16 reloc.
-
-The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16.
-It should refer to the symbol to be referenced, as with 16_GOTOFF,
-but it generates output not based on the position within the .got
-section, but relative to the GP value chosen for the file during the
-final link stage.
-
-The LITUSE reloc, on the instruction using the loaded address, gives
-information to the linker that it might be able to use to optimize
-away some literal section references. The symbol is ignored (read
-as the absolute section symbol), and the "addend" indicates the type
-of instruction using the register:
-1 - "memory" fmt insn
-2 - byte-manipulation (byte offset reg)
-3 - jsr (target of branch) */
- BFD_RELOC_ALPHA_LITERAL,
- BFD_RELOC_ALPHA_ELF_LITERAL,
- BFD_RELOC_ALPHA_LITUSE,
-
-/* The HINT relocation indicates a value that should be filled into the
-"hint" field of a jmp/jsr/ret instruction, for possible branch-
-prediction logic which may be provided on some processors. */
- BFD_RELOC_ALPHA_HINT,
-
-/* The LINKAGE relocation outputs a linkage pair in the object file,
-which is filled by the linker. */
- BFD_RELOC_ALPHA_LINKAGE,
-
-/* The CODEADDR relocation outputs a STO_CA in the object file,
-which is filled by the linker. */
- BFD_RELOC_ALPHA_CODEADDR,
-
-/* The GPREL_HI/LO relocations together form a 32-bit offset from the
-GP register. */
- BFD_RELOC_ALPHA_GPREL_HI16,
- BFD_RELOC_ALPHA_GPREL_LO16,
-
-/* Like BFD_RELOC_23_PCREL_S2, except that the source and target must
-share a common GP, and the target address is adjusted for
-STO_ALPHA_STD_GPLOAD. */
- BFD_RELOC_ALPHA_BRSGP,
-
-/* The NOP relocation outputs a NOP if the longword displacement
-between two procedure entry points is < 2^21. */
- BFD_RELOC_ALPHA_NOP,
-
-/* The BSR relocation outputs a BSR if the longword displacement
-between two procedure entry points is < 2^21. */
- BFD_RELOC_ALPHA_BSR,
-
-/* The LDA relocation outputs a LDA if the longword displacement
-between two procedure entry points is < 2^16. */
- BFD_RELOC_ALPHA_LDA,
-
-/* The BOH relocation outputs a BSR if the longword displacement
-between two procedure entry points is < 2^21, or else a hint. */
- BFD_RELOC_ALPHA_BOH,
-
-/* Alpha thread-local storage relocations. */
- BFD_RELOC_ALPHA_TLSGD,
- BFD_RELOC_ALPHA_TLSLDM,
- BFD_RELOC_ALPHA_DTPMOD64,
- BFD_RELOC_ALPHA_GOTDTPREL16,
- BFD_RELOC_ALPHA_DTPREL64,
- BFD_RELOC_ALPHA_DTPREL_HI16,
- BFD_RELOC_ALPHA_DTPREL_LO16,
- BFD_RELOC_ALPHA_DTPREL16,
- BFD_RELOC_ALPHA_GOTTPREL16,
- BFD_RELOC_ALPHA_TPREL64,
- BFD_RELOC_ALPHA_TPREL_HI16,
- BFD_RELOC_ALPHA_TPREL_LO16,
- BFD_RELOC_ALPHA_TPREL16,
-
-/* The MIPS jump instruction. */
- BFD_RELOC_MIPS_JMP,
- BFD_RELOC_MICROMIPS_JMP,
-
-/* The MIPS16 jump instruction. */
- BFD_RELOC_MIPS16_JMP,
-
-/* MIPS16 GP relative reloc. */
- BFD_RELOC_MIPS16_GPREL,
-
-/* High 16 bits of 32-bit value; simple reloc. */
- BFD_RELOC_HI16,
-
-/* High 16 bits of 32-bit value but the low 16 bits will be sign
-extended and added to form the final result. If the low 16
-bits form a negative number, we need to add one to the high value
-to compensate for the borrow when the low bits are added. */
- BFD_RELOC_HI16_S,
-
-/* Low 16 bits. */
- BFD_RELOC_LO16,
-
-/* High 16 bits of 32-bit pc-relative value */
- BFD_RELOC_HI16_PCREL,
-
-/* High 16 bits of 32-bit pc-relative value, adjusted */
- BFD_RELOC_HI16_S_PCREL,
-
-/* Low 16 bits of pc-relative value */
- BFD_RELOC_LO16_PCREL,
-
-/* Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of
-16-bit immediate fields */
- BFD_RELOC_MIPS16_GOT16,
- BFD_RELOC_MIPS16_CALL16,
-
-/* MIPS16 high 16 bits of 32-bit value. */
- BFD_RELOC_MIPS16_HI16,
-
-/* MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign
-extended and added to form the final result. If the low 16
-bits form a negative number, we need to add one to the high value
-to compensate for the borrow when the low bits are added. */
- BFD_RELOC_MIPS16_HI16_S,
-
-/* MIPS16 low 16 bits. */
- BFD_RELOC_MIPS16_LO16,
-
-/* MIPS16 TLS relocations */
- BFD_RELOC_MIPS16_TLS_GD,
- BFD_RELOC_MIPS16_TLS_LDM,
- BFD_RELOC_MIPS16_TLS_DTPREL_HI16,
- BFD_RELOC_MIPS16_TLS_DTPREL_LO16,
- BFD_RELOC_MIPS16_TLS_GOTTPREL,
- BFD_RELOC_MIPS16_TLS_TPREL_HI16,
- BFD_RELOC_MIPS16_TLS_TPREL_LO16,
-
-/* Relocation against a MIPS literal section. */
- BFD_RELOC_MIPS_LITERAL,
- BFD_RELOC_MICROMIPS_LITERAL,
-
-/* microMIPS PC-relative relocations. */
- BFD_RELOC_MICROMIPS_7_PCREL_S1,
- BFD_RELOC_MICROMIPS_10_PCREL_S1,
- BFD_RELOC_MICROMIPS_16_PCREL_S1,
-
-/* MIPS16 PC-relative relocation. */
- BFD_RELOC_MIPS16_16_PCREL_S1,
-
-/* MIPS PC-relative relocations. */
- BFD_RELOC_MIPS_21_PCREL_S2,
- BFD_RELOC_MIPS_26_PCREL_S2,
- BFD_RELOC_MIPS_18_PCREL_S3,
- BFD_RELOC_MIPS_19_PCREL_S2,
-
-/* microMIPS versions of generic BFD relocs. */
- BFD_RELOC_MICROMIPS_GPREL16,
- BFD_RELOC_MICROMIPS_HI16,
- BFD_RELOC_MICROMIPS_HI16_S,
- BFD_RELOC_MICROMIPS_LO16,
-
-/* MIPS ELF relocations. */
- BFD_RELOC_MIPS_GOT16,
- BFD_RELOC_MICROMIPS_GOT16,
- BFD_RELOC_MIPS_CALL16,
- BFD_RELOC_MICROMIPS_CALL16,
- BFD_RELOC_MIPS_GOT_HI16,
- BFD_RELOC_MICROMIPS_GOT_HI16,
- BFD_RELOC_MIPS_GOT_LO16,
- BFD_RELOC_MICROMIPS_GOT_LO16,
- BFD_RELOC_MIPS_CALL_HI16,
- BFD_RELOC_MICROMIPS_CALL_HI16,
- BFD_RELOC_MIPS_CALL_LO16,
- BFD_RELOC_MICROMIPS_CALL_LO16,
- BFD_RELOC_MIPS_SUB,
- BFD_RELOC_MICROMIPS_SUB,
- BFD_RELOC_MIPS_GOT_PAGE,
- BFD_RELOC_MICROMIPS_GOT_PAGE,
- BFD_RELOC_MIPS_GOT_OFST,
- BFD_RELOC_MICROMIPS_GOT_OFST,
- BFD_RELOC_MIPS_GOT_DISP,
- BFD_RELOC_MICROMIPS_GOT_DISP,
- BFD_RELOC_MIPS_SHIFT5,
- BFD_RELOC_MIPS_SHIFT6,
- BFD_RELOC_MIPS_INSERT_A,
- BFD_RELOC_MIPS_INSERT_B,
- BFD_RELOC_MIPS_DELETE,
- BFD_RELOC_MIPS_HIGHEST,
- BFD_RELOC_MICROMIPS_HIGHEST,
- BFD_RELOC_MIPS_HIGHER,
- BFD_RELOC_MICROMIPS_HIGHER,
- BFD_RELOC_MIPS_SCN_DISP,
- BFD_RELOC_MICROMIPS_SCN_DISP,
- BFD_RELOC_MIPS_REL16,
- BFD_RELOC_MIPS_RELGOT,
- BFD_RELOC_MIPS_JALR,
- BFD_RELOC_MICROMIPS_JALR,
- BFD_RELOC_MIPS_TLS_DTPMOD32,
- BFD_RELOC_MIPS_TLS_DTPREL32,
- BFD_RELOC_MIPS_TLS_DTPMOD64,
- BFD_RELOC_MIPS_TLS_DTPREL64,
- BFD_RELOC_MIPS_TLS_GD,
- BFD_RELOC_MICROMIPS_TLS_GD,
- BFD_RELOC_MIPS_TLS_LDM,
- BFD_RELOC_MICROMIPS_TLS_LDM,
- BFD_RELOC_MIPS_TLS_DTPREL_HI16,
- BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16,
- BFD_RELOC_MIPS_TLS_DTPREL_LO16,
- BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16,
- BFD_RELOC_MIPS_TLS_GOTTPREL,
- BFD_RELOC_MICROMIPS_TLS_GOTTPREL,
- BFD_RELOC_MIPS_TLS_TPREL32,
- BFD_RELOC_MIPS_TLS_TPREL64,
- BFD_RELOC_MIPS_TLS_TPREL_HI16,
- BFD_RELOC_MICROMIPS_TLS_TPREL_HI16,
- BFD_RELOC_MIPS_TLS_TPREL_LO16,
- BFD_RELOC_MICROMIPS_TLS_TPREL_LO16,
- BFD_RELOC_MIPS_EH,
-
-
-/* MIPS ELF relocations (VxWorks and PLT extensions). */
- BFD_RELOC_MIPS_COPY,
- BFD_RELOC_MIPS_JUMP_SLOT,
-
-
-/* Moxie ELF relocations. */
- BFD_RELOC_MOXIE_10_PCREL,
-
-
-/* FT32 ELF relocations. */
- BFD_RELOC_FT32_10,
- BFD_RELOC_FT32_20,
- BFD_RELOC_FT32_17,
- BFD_RELOC_FT32_18,
- BFD_RELOC_FT32_RELAX,
- BFD_RELOC_FT32_SC0,
- BFD_RELOC_FT32_SC1,
- BFD_RELOC_FT32_15,
- BFD_RELOC_FT32_DIFF32,
-
-
-/* Fujitsu Frv Relocations. */
- BFD_RELOC_FRV_LABEL16,
- BFD_RELOC_FRV_LABEL24,
- BFD_RELOC_FRV_LO16,
- BFD_RELOC_FRV_HI16,
- BFD_RELOC_FRV_GPREL12,
- BFD_RELOC_FRV_GPRELU12,
- BFD_RELOC_FRV_GPREL32,
- BFD_RELOC_FRV_GPRELHI,
- BFD_RELOC_FRV_GPRELLO,
- BFD_RELOC_FRV_GOT12,
- BFD_RELOC_FRV_GOTHI,
- BFD_RELOC_FRV_GOTLO,
- BFD_RELOC_FRV_FUNCDESC,
- BFD_RELOC_FRV_FUNCDESC_GOT12,
- BFD_RELOC_FRV_FUNCDESC_GOTHI,
- BFD_RELOC_FRV_FUNCDESC_GOTLO,
- BFD_RELOC_FRV_FUNCDESC_VALUE,
- BFD_RELOC_FRV_FUNCDESC_GOTOFF12,
- BFD_RELOC_FRV_FUNCDESC_GOTOFFHI,
- BFD_RELOC_FRV_FUNCDESC_GOTOFFLO,
- BFD_RELOC_FRV_GOTOFF12,
- BFD_RELOC_FRV_GOTOFFHI,
- BFD_RELOC_FRV_GOTOFFLO,
- BFD_RELOC_FRV_GETTLSOFF,
- BFD_RELOC_FRV_TLSDESC_VALUE,
- BFD_RELOC_FRV_GOTTLSDESC12,
- BFD_RELOC_FRV_GOTTLSDESCHI,
- BFD_RELOC_FRV_GOTTLSDESCLO,
- BFD_RELOC_FRV_TLSMOFF12,
- BFD_RELOC_FRV_TLSMOFFHI,
- BFD_RELOC_FRV_TLSMOFFLO,
- BFD_RELOC_FRV_GOTTLSOFF12,
- BFD_RELOC_FRV_GOTTLSOFFHI,
- BFD_RELOC_FRV_GOTTLSOFFLO,
- BFD_RELOC_FRV_TLSOFF,
- BFD_RELOC_FRV_TLSDESC_RELAX,
- BFD_RELOC_FRV_GETTLSOFF_RELAX,
- BFD_RELOC_FRV_TLSOFF_RELAX,
- BFD_RELOC_FRV_TLSMOFF,
-
-
-/* This is a 24bit GOT-relative reloc for the mn10300. */
- BFD_RELOC_MN10300_GOTOFF24,
-
-/* This is a 32bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction. */
- BFD_RELOC_MN10300_GOT32,
-
-/* This is a 24bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction. */
- BFD_RELOC_MN10300_GOT24,
-
-/* This is a 16bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction. */
- BFD_RELOC_MN10300_GOT16,
-
-/* Copy symbol at runtime. */
- BFD_RELOC_MN10300_COPY,
-
-/* Create GOT entry. */
- BFD_RELOC_MN10300_GLOB_DAT,
-
-/* Create PLT entry. */
- BFD_RELOC_MN10300_JMP_SLOT,
-
-/* Adjust by program base. */
- BFD_RELOC_MN10300_RELATIVE,
-
-/* Together with another reloc targeted at the same location,
-allows for a value that is the difference of two symbols
-in the same section. */
- BFD_RELOC_MN10300_SYM_DIFF,
-
-/* The addend of this reloc is an alignment power that must
-be honoured at the offset's location, regardless of linker
-relaxation. */
- BFD_RELOC_MN10300_ALIGN,
-
-/* Various TLS-related relocations. */
- BFD_RELOC_MN10300_TLS_GD,
- BFD_RELOC_MN10300_TLS_LD,
- BFD_RELOC_MN10300_TLS_LDO,
- BFD_RELOC_MN10300_TLS_GOTIE,
- BFD_RELOC_MN10300_TLS_IE,
- BFD_RELOC_MN10300_TLS_LE,
- BFD_RELOC_MN10300_TLS_DTPMOD,
- BFD_RELOC_MN10300_TLS_DTPOFF,
- BFD_RELOC_MN10300_TLS_TPOFF,
-
-/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction. */
- BFD_RELOC_MN10300_32_PCREL,
-
-/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction. */
- BFD_RELOC_MN10300_16_PCREL,
-
-
-/* i386/elf relocations */
- BFD_RELOC_386_GOT32,
- BFD_RELOC_386_PLT32,
- BFD_RELOC_386_COPY,
- BFD_RELOC_386_GLOB_DAT,
- BFD_RELOC_386_JUMP_SLOT,
- BFD_RELOC_386_RELATIVE,
- BFD_RELOC_386_GOTOFF,
- BFD_RELOC_386_GOTPC,
- BFD_RELOC_386_TLS_TPOFF,
- BFD_RELOC_386_TLS_IE,
- BFD_RELOC_386_TLS_GOTIE,
- BFD_RELOC_386_TLS_LE,
- BFD_RELOC_386_TLS_GD,
- BFD_RELOC_386_TLS_LDM,
- BFD_RELOC_386_TLS_LDO_32,
- BFD_RELOC_386_TLS_IE_32,
- BFD_RELOC_386_TLS_LE_32,
- BFD_RELOC_386_TLS_DTPMOD32,
- BFD_RELOC_386_TLS_DTPOFF32,
- BFD_RELOC_386_TLS_TPOFF32,
- BFD_RELOC_386_TLS_GOTDESC,
- BFD_RELOC_386_TLS_DESC_CALL,
- BFD_RELOC_386_TLS_DESC,
- BFD_RELOC_386_IRELATIVE,
- BFD_RELOC_386_GOT32X,
-
-/* x86-64/elf relocations */
- BFD_RELOC_X86_64_GOT32,
- BFD_RELOC_X86_64_PLT32,
- BFD_RELOC_X86_64_COPY,
- BFD_RELOC_X86_64_GLOB_DAT,
- BFD_RELOC_X86_64_JUMP_SLOT,
- BFD_RELOC_X86_64_RELATIVE,
- BFD_RELOC_X86_64_GOTPCREL,
- BFD_RELOC_X86_64_32S,
- BFD_RELOC_X86_64_DTPMOD64,
- BFD_RELOC_X86_64_DTPOFF64,
- BFD_RELOC_X86_64_TPOFF64,
- BFD_RELOC_X86_64_TLSGD,
- BFD_RELOC_X86_64_TLSLD,
- BFD_RELOC_X86_64_DTPOFF32,
- BFD_RELOC_X86_64_GOTTPOFF,
- BFD_RELOC_X86_64_TPOFF32,
- BFD_RELOC_X86_64_GOTOFF64,
- BFD_RELOC_X86_64_GOTPC32,
- BFD_RELOC_X86_64_GOT64,
- BFD_RELOC_X86_64_GOTPCREL64,
- BFD_RELOC_X86_64_GOTPC64,
- BFD_RELOC_X86_64_GOTPLT64,
- BFD_RELOC_X86_64_PLTOFF64,
- BFD_RELOC_X86_64_GOTPC32_TLSDESC,
- BFD_RELOC_X86_64_TLSDESC_CALL,
- BFD_RELOC_X86_64_TLSDESC,
- BFD_RELOC_X86_64_IRELATIVE,
- BFD_RELOC_X86_64_PC32_BND,
- BFD_RELOC_X86_64_PLT32_BND,
- BFD_RELOC_X86_64_GOTPCRELX,
- BFD_RELOC_X86_64_REX_GOTPCRELX,
-
-/* ns32k relocations */
- BFD_RELOC_NS32K_IMM_8,
- BFD_RELOC_NS32K_IMM_16,
- BFD_RELOC_NS32K_IMM_32,
- BFD_RELOC_NS32K_IMM_8_PCREL,
- BFD_RELOC_NS32K_IMM_16_PCREL,
- BFD_RELOC_NS32K_IMM_32_PCREL,
- BFD_RELOC_NS32K_DISP_8,
- BFD_RELOC_NS32K_DISP_16,
- BFD_RELOC_NS32K_DISP_32,
- BFD_RELOC_NS32K_DISP_8_PCREL,
- BFD_RELOC_NS32K_DISP_16_PCREL,
- BFD_RELOC_NS32K_DISP_32_PCREL,
-
-/* PDP11 relocations */
- BFD_RELOC_PDP11_DISP_8_PCREL,
- BFD_RELOC_PDP11_DISP_6_PCREL,
-
-/* Picojava relocs. Not all of these appear in object files. */
- BFD_RELOC_PJ_CODE_HI16,
- BFD_RELOC_PJ_CODE_LO16,
- BFD_RELOC_PJ_CODE_DIR16,
- BFD_RELOC_PJ_CODE_DIR32,
- BFD_RELOC_PJ_CODE_REL16,
- BFD_RELOC_PJ_CODE_REL32,
-
-/* Power(rs6000) and PowerPC relocations. */
- BFD_RELOC_PPC_B26,
- BFD_RELOC_PPC_BA26,
- BFD_RELOC_PPC_TOC16,
- BFD_RELOC_PPC_B16,
- BFD_RELOC_PPC_B16_BRTAKEN,
- BFD_RELOC_PPC_B16_BRNTAKEN,
- BFD_RELOC_PPC_BA16,
- BFD_RELOC_PPC_BA16_BRTAKEN,
- BFD_RELOC_PPC_BA16_BRNTAKEN,
- BFD_RELOC_PPC_COPY,
- BFD_RELOC_PPC_GLOB_DAT,
- BFD_RELOC_PPC_JMP_SLOT,
- BFD_RELOC_PPC_RELATIVE,
- BFD_RELOC_PPC_LOCAL24PC,
- BFD_RELOC_PPC_EMB_NADDR32,
- BFD_RELOC_PPC_EMB_NADDR16,
- BFD_RELOC_PPC_EMB_NADDR16_LO,
- BFD_RELOC_PPC_EMB_NADDR16_HI,
- BFD_RELOC_PPC_EMB_NADDR16_HA,
- BFD_RELOC_PPC_EMB_SDAI16,
- BFD_RELOC_PPC_EMB_SDA2I16,
- BFD_RELOC_PPC_EMB_SDA2REL,
- BFD_RELOC_PPC_EMB_SDA21,
- BFD_RELOC_PPC_EMB_MRKREF,
- BFD_RELOC_PPC_EMB_RELSEC16,
- BFD_RELOC_PPC_EMB_RELST_LO,
- BFD_RELOC_PPC_EMB_RELST_HI,
- BFD_RELOC_PPC_EMB_RELST_HA,
- BFD_RELOC_PPC_EMB_BIT_FLD,
- BFD_RELOC_PPC_EMB_RELSDA,
- BFD_RELOC_PPC_VLE_REL8,
- BFD_RELOC_PPC_VLE_REL15,
- BFD_RELOC_PPC_VLE_REL24,
- BFD_RELOC_PPC_VLE_LO16A,
- BFD_RELOC_PPC_VLE_LO16D,
- BFD_RELOC_PPC_VLE_HI16A,
- BFD_RELOC_PPC_VLE_HI16D,
- BFD_RELOC_PPC_VLE_HA16A,
- BFD_RELOC_PPC_VLE_HA16D,
- BFD_RELOC_PPC_VLE_SDA21,
- BFD_RELOC_PPC_VLE_SDA21_LO,
- BFD_RELOC_PPC_VLE_SDAREL_LO16A,
- BFD_RELOC_PPC_VLE_SDAREL_LO16D,
- BFD_RELOC_PPC_VLE_SDAREL_HI16A,
- BFD_RELOC_PPC_VLE_SDAREL_HI16D,
- BFD_RELOC_PPC_VLE_SDAREL_HA16A,
- BFD_RELOC_PPC_VLE_SDAREL_HA16D,
- BFD_RELOC_PPC_16DX_HA,
- BFD_RELOC_PPC_REL16DX_HA,
- BFD_RELOC_PPC64_HIGHER,
- BFD_RELOC_PPC64_HIGHER_S,
- BFD_RELOC_PPC64_HIGHEST,
- BFD_RELOC_PPC64_HIGHEST_S,
- BFD_RELOC_PPC64_TOC16_LO,
- BFD_RELOC_PPC64_TOC16_HI,
- BFD_RELOC_PPC64_TOC16_HA,
- BFD_RELOC_PPC64_TOC,
- BFD_RELOC_PPC64_PLTGOT16,
- BFD_RELOC_PPC64_PLTGOT16_LO,
- BFD_RELOC_PPC64_PLTGOT16_HI,
- BFD_RELOC_PPC64_PLTGOT16_HA,
- BFD_RELOC_PPC64_ADDR16_DS,
- BFD_RELOC_PPC64_ADDR16_LO_DS,
- BFD_RELOC_PPC64_GOT16_DS,
- BFD_RELOC_PPC64_GOT16_LO_DS,
- BFD_RELOC_PPC64_PLT16_LO_DS,
- BFD_RELOC_PPC64_SECTOFF_DS,
- BFD_RELOC_PPC64_SECTOFF_LO_DS,
- BFD_RELOC_PPC64_TOC16_DS,
- BFD_RELOC_PPC64_TOC16_LO_DS,
- BFD_RELOC_PPC64_PLTGOT16_DS,
- BFD_RELOC_PPC64_PLTGOT16_LO_DS,
- BFD_RELOC_PPC64_ADDR16_HIGH,
- BFD_RELOC_PPC64_ADDR16_HIGHA,
- BFD_RELOC_PPC64_REL16_HIGH,
- BFD_RELOC_PPC64_REL16_HIGHA,
- BFD_RELOC_PPC64_REL16_HIGHER,
- BFD_RELOC_PPC64_REL16_HIGHERA,
- BFD_RELOC_PPC64_REL16_HIGHEST,
- BFD_RELOC_PPC64_REL16_HIGHESTA,
- BFD_RELOC_PPC64_ADDR64_LOCAL,
- BFD_RELOC_PPC64_ENTRY,
- BFD_RELOC_PPC64_REL24_NOTOC,
-
-/* PowerPC and PowerPC64 thread-local storage relocations. */
- BFD_RELOC_PPC_TLS,
- BFD_RELOC_PPC_TLSGD,
- BFD_RELOC_PPC_TLSLD,
- BFD_RELOC_PPC_DTPMOD,
- BFD_RELOC_PPC_TPREL16,
- BFD_RELOC_PPC_TPREL16_LO,
- BFD_RELOC_PPC_TPREL16_HI,
- BFD_RELOC_PPC_TPREL16_HA,
- BFD_RELOC_PPC_TPREL,
- BFD_RELOC_PPC_DTPREL16,
- BFD_RELOC_PPC_DTPREL16_LO,
- BFD_RELOC_PPC_DTPREL16_HI,
- BFD_RELOC_PPC_DTPREL16_HA,
- BFD_RELOC_PPC_DTPREL,
- BFD_RELOC_PPC_GOT_TLSGD16,
- BFD_RELOC_PPC_GOT_TLSGD16_LO,
- BFD_RELOC_PPC_GOT_TLSGD16_HI,
- BFD_RELOC_PPC_GOT_TLSGD16_HA,
- BFD_RELOC_PPC_GOT_TLSLD16,
- BFD_RELOC_PPC_GOT_TLSLD16_LO,
- BFD_RELOC_PPC_GOT_TLSLD16_HI,
- BFD_RELOC_PPC_GOT_TLSLD16_HA,
- BFD_RELOC_PPC_GOT_TPREL16,
- BFD_RELOC_PPC_GOT_TPREL16_LO,
- BFD_RELOC_PPC_GOT_TPREL16_HI,
- BFD_RELOC_PPC_GOT_TPREL16_HA,
- BFD_RELOC_PPC_GOT_DTPREL16,
- BFD_RELOC_PPC_GOT_DTPREL16_LO,
- BFD_RELOC_PPC_GOT_DTPREL16_HI,
- BFD_RELOC_PPC_GOT_DTPREL16_HA,
- BFD_RELOC_PPC64_TPREL16_DS,
- BFD_RELOC_PPC64_TPREL16_LO_DS,
- BFD_RELOC_PPC64_TPREL16_HIGHER,
- BFD_RELOC_PPC64_TPREL16_HIGHERA,
- BFD_RELOC_PPC64_TPREL16_HIGHEST,
- BFD_RELOC_PPC64_TPREL16_HIGHESTA,
- BFD_RELOC_PPC64_DTPREL16_DS,
- BFD_RELOC_PPC64_DTPREL16_LO_DS,
- BFD_RELOC_PPC64_DTPREL16_HIGHER,
- BFD_RELOC_PPC64_DTPREL16_HIGHERA,
- BFD_RELOC_PPC64_DTPREL16_HIGHEST,
- BFD_RELOC_PPC64_DTPREL16_HIGHESTA,
- BFD_RELOC_PPC64_TPREL16_HIGH,
- BFD_RELOC_PPC64_TPREL16_HIGHA,
- BFD_RELOC_PPC64_DTPREL16_HIGH,
- BFD_RELOC_PPC64_DTPREL16_HIGHA,
-
-/* IBM 370/390 relocations */
- BFD_RELOC_I370_D12,
-
-/* The type of reloc used to build a constructor table - at the moment
-probably a 32 bit wide absolute relocation, but the target can choose.
-It generally does map to one of the other relocation types. */
- BFD_RELOC_CTOR,
-
-/* ARM 26 bit pc-relative branch. The lowest two bits must be zero and are
-not stored in the instruction. */
- BFD_RELOC_ARM_PCREL_BRANCH,
-
-/* ARM 26 bit pc-relative branch. The lowest bit must be zero and is
-not stored in the instruction. The 2nd lowest bit comes from a 1 bit
-field in the instruction. */
- BFD_RELOC_ARM_PCREL_BLX,
-
-/* Thumb 22 bit pc-relative branch. The lowest bit must be zero and is
-not stored in the instruction. The 2nd lowest bit comes from a 1 bit
-field in the instruction. */
- BFD_RELOC_THUMB_PCREL_BLX,
-
-/* ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction. */
- BFD_RELOC_ARM_PCREL_CALL,
-
-/* ARM 26-bit pc-relative branch for B or conditional BL instruction. */
- BFD_RELOC_ARM_PCREL_JUMP,
-
-/* Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches.
-The lowest bit must be zero and is not stored in the instruction.
-Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an
-"nn" one smaller in all cases. Note further that BRANCH23
-corresponds to R_ARM_THM_CALL. */
- BFD_RELOC_THUMB_PCREL_BRANCH7,
- BFD_RELOC_THUMB_PCREL_BRANCH9,
- BFD_RELOC_THUMB_PCREL_BRANCH12,
- BFD_RELOC_THUMB_PCREL_BRANCH20,
- BFD_RELOC_THUMB_PCREL_BRANCH23,
- BFD_RELOC_THUMB_PCREL_BRANCH25,
-
-/* 12-bit immediate offset, used in ARM-format ldr and str instructions. */
- BFD_RELOC_ARM_OFFSET_IMM,
-
-/* 5-bit immediate offset, used in Thumb-format ldr and str instructions. */
- BFD_RELOC_ARM_THUMB_OFFSET,
-
-/* Pc-relative or absolute relocation depending on target. Used for
-entries in .init_array sections. */
- BFD_RELOC_ARM_TARGET1,
-
-/* Read-only segment base relative address. */
- BFD_RELOC_ARM_ROSEGREL32,
-
-/* Data segment base relative address. */
- BFD_RELOC_ARM_SBREL32,
-
-/* This reloc is used for references to RTTI data from exception handling
-tables. The actual definition depends on the target. It may be a
-pc-relative or some form of GOT-indirect relocation. */
- BFD_RELOC_ARM_TARGET2,
-
-/* 31-bit PC relative address. */
- BFD_RELOC_ARM_PREL31,
-
-/* Low and High halfword relocations for MOVW and MOVT instructions. */
- BFD_RELOC_ARM_MOVW,
- BFD_RELOC_ARM_MOVT,
- BFD_RELOC_ARM_MOVW_PCREL,
- BFD_RELOC_ARM_MOVT_PCREL,
- BFD_RELOC_ARM_THUMB_MOVW,
- BFD_RELOC_ARM_THUMB_MOVT,
- BFD_RELOC_ARM_THUMB_MOVW_PCREL,
- BFD_RELOC_ARM_THUMB_MOVT_PCREL,
-
-/* ARM FDPIC specific relocations. */
- BFD_RELOC_ARM_GOTFUNCDESC,
- BFD_RELOC_ARM_GOTOFFFUNCDESC,
- BFD_RELOC_ARM_FUNCDESC,
- BFD_RELOC_ARM_FUNCDESC_VALUE,
- BFD_RELOC_ARM_TLS_GD32_FDPIC,
- BFD_RELOC_ARM_TLS_LDM32_FDPIC,
- BFD_RELOC_ARM_TLS_IE32_FDPIC,
-
-/* Relocations for setting up GOTs and PLTs for shared libraries. */
- BFD_RELOC_ARM_JUMP_SLOT,
- BFD_RELOC_ARM_GLOB_DAT,
- BFD_RELOC_ARM_GOT32,
- BFD_RELOC_ARM_PLT32,
- BFD_RELOC_ARM_RELATIVE,
- BFD_RELOC_ARM_GOTOFF,
- BFD_RELOC_ARM_GOTPC,
- BFD_RELOC_ARM_GOT_PREL,
-
-/* ARM thread-local storage relocations. */
- BFD_RELOC_ARM_TLS_GD32,
- BFD_RELOC_ARM_TLS_LDO32,
- BFD_RELOC_ARM_TLS_LDM32,
- BFD_RELOC_ARM_TLS_DTPOFF32,
- BFD_RELOC_ARM_TLS_DTPMOD32,
- BFD_RELOC_ARM_TLS_TPOFF32,
- BFD_RELOC_ARM_TLS_IE32,
- BFD_RELOC_ARM_TLS_LE32,
- BFD_RELOC_ARM_TLS_GOTDESC,
- BFD_RELOC_ARM_TLS_CALL,
- BFD_RELOC_ARM_THM_TLS_CALL,
- BFD_RELOC_ARM_TLS_DESCSEQ,
- BFD_RELOC_ARM_THM_TLS_DESCSEQ,
- BFD_RELOC_ARM_TLS_DESC,
-
-/* ARM group relocations. */
- BFD_RELOC_ARM_ALU_PC_G0_NC,
- BFD_RELOC_ARM_ALU_PC_G0,
- BFD_RELOC_ARM_ALU_PC_G1_NC,
- BFD_RELOC_ARM_ALU_PC_G1,
- BFD_RELOC_ARM_ALU_PC_G2,
- BFD_RELOC_ARM_LDR_PC_G0,
- BFD_RELOC_ARM_LDR_PC_G1,
- BFD_RELOC_ARM_LDR_PC_G2,
- BFD_RELOC_ARM_LDRS_PC_G0,
- BFD_RELOC_ARM_LDRS_PC_G1,
- BFD_RELOC_ARM_LDRS_PC_G2,
- BFD_RELOC_ARM_LDC_PC_G0,
- BFD_RELOC_ARM_LDC_PC_G1,
- BFD_RELOC_ARM_LDC_PC_G2,
- BFD_RELOC_ARM_ALU_SB_G0_NC,
- BFD_RELOC_ARM_ALU_SB_G0,
- BFD_RELOC_ARM_ALU_SB_G1_NC,
- BFD_RELOC_ARM_ALU_SB_G1,
- BFD_RELOC_ARM_ALU_SB_G2,
- BFD_RELOC_ARM_LDR_SB_G0,
- BFD_RELOC_ARM_LDR_SB_G1,
- BFD_RELOC_ARM_LDR_SB_G2,
- BFD_RELOC_ARM_LDRS_SB_G0,
- BFD_RELOC_ARM_LDRS_SB_G1,
- BFD_RELOC_ARM_LDRS_SB_G2,
- BFD_RELOC_ARM_LDC_SB_G0,
- BFD_RELOC_ARM_LDC_SB_G1,
- BFD_RELOC_ARM_LDC_SB_G2,
-
-/* Annotation of BX instructions. */
- BFD_RELOC_ARM_V4BX,
-
-/* ARM support for STT_GNU_IFUNC. */
- BFD_RELOC_ARM_IRELATIVE,
-
-/* Thumb1 relocations to support execute-only code. */
- BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC,
- BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC,
- BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC,
- BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC,
-
-/* These relocs are only used within the ARM assembler. They are not
-(at present) written to any object files. */
- BFD_RELOC_ARM_IMMEDIATE,
- BFD_RELOC_ARM_ADRL_IMMEDIATE,
- BFD_RELOC_ARM_T32_IMMEDIATE,
- BFD_RELOC_ARM_T32_ADD_IMM,
- BFD_RELOC_ARM_T32_IMM12,
- BFD_RELOC_ARM_T32_ADD_PC12,
- BFD_RELOC_ARM_SHIFT_IMM,
- BFD_RELOC_ARM_SMC,
- BFD_RELOC_ARM_HVC,
- BFD_RELOC_ARM_SWI,
- BFD_RELOC_ARM_MULTI,
- BFD_RELOC_ARM_CP_OFF_IMM,
- BFD_RELOC_ARM_CP_OFF_IMM_S2,
- BFD_RELOC_ARM_T32_CP_OFF_IMM,
- BFD_RELOC_ARM_T32_CP_OFF_IMM_S2,
- BFD_RELOC_ARM_ADR_IMM,
- BFD_RELOC_ARM_LDR_IMM,
- BFD_RELOC_ARM_LITERAL,
- BFD_RELOC_ARM_IN_POOL,
- BFD_RELOC_ARM_OFFSET_IMM8,
- BFD_RELOC_ARM_T32_OFFSET_U8,
- BFD_RELOC_ARM_T32_OFFSET_IMM,
- BFD_RELOC_ARM_HWLITERAL,
- BFD_RELOC_ARM_THUMB_ADD,
- BFD_RELOC_ARM_THUMB_IMM,
- BFD_RELOC_ARM_THUMB_SHIFT,
-
-/* Renesas / SuperH SH relocs. Not all of these appear in object files. */
- BFD_RELOC_SH_PCDISP8BY2,
- BFD_RELOC_SH_PCDISP12BY2,
- BFD_RELOC_SH_IMM3,
- BFD_RELOC_SH_IMM3U,
- BFD_RELOC_SH_DISP12,
- BFD_RELOC_SH_DISP12BY2,
- BFD_RELOC_SH_DISP12BY4,
- BFD_RELOC_SH_DISP12BY8,
- BFD_RELOC_SH_DISP20,
- BFD_RELOC_SH_DISP20BY8,
- BFD_RELOC_SH_IMM4,
- BFD_RELOC_SH_IMM4BY2,
- BFD_RELOC_SH_IMM4BY4,
- BFD_RELOC_SH_IMM8,
- BFD_RELOC_SH_IMM8BY2,
- BFD_RELOC_SH_IMM8BY4,
- BFD_RELOC_SH_PCRELIMM8BY2,
- BFD_RELOC_SH_PCRELIMM8BY4,
- BFD_RELOC_SH_SWITCH16,
- BFD_RELOC_SH_SWITCH32,
- BFD_RELOC_SH_USES,
- BFD_RELOC_SH_COUNT,
- BFD_RELOC_SH_ALIGN,
- BFD_RELOC_SH_CODE,
- BFD_RELOC_SH_DATA,
- BFD_RELOC_SH_LABEL,
- BFD_RELOC_SH_LOOP_START,
- BFD_RELOC_SH_LOOP_END,
- BFD_RELOC_SH_COPY,
- BFD_RELOC_SH_GLOB_DAT,
- BFD_RELOC_SH_JMP_SLOT,
- BFD_RELOC_SH_RELATIVE,
- BFD_RELOC_SH_GOTPC,
- BFD_RELOC_SH_GOT_LOW16,
- BFD_RELOC_SH_GOT_MEDLOW16,
- BFD_RELOC_SH_GOT_MEDHI16,
- BFD_RELOC_SH_GOT_HI16,
- BFD_RELOC_SH_GOTPLT_LOW16,
- BFD_RELOC_SH_GOTPLT_MEDLOW16,
- BFD_RELOC_SH_GOTPLT_MEDHI16,
- BFD_RELOC_SH_GOTPLT_HI16,
- BFD_RELOC_SH_PLT_LOW16,
- BFD_RELOC_SH_PLT_MEDLOW16,
- BFD_RELOC_SH_PLT_MEDHI16,
- BFD_RELOC_SH_PLT_HI16,
- BFD_RELOC_SH_GOTOFF_LOW16,
- BFD_RELOC_SH_GOTOFF_MEDLOW16,
- BFD_RELOC_SH_GOTOFF_MEDHI16,
- BFD_RELOC_SH_GOTOFF_HI16,
- BFD_RELOC_SH_GOTPC_LOW16,
- BFD_RELOC_SH_GOTPC_MEDLOW16,
- BFD_RELOC_SH_GOTPC_MEDHI16,
- BFD_RELOC_SH_GOTPC_HI16,
- BFD_RELOC_SH_COPY64,
- BFD_RELOC_SH_GLOB_DAT64,
- BFD_RELOC_SH_JMP_SLOT64,
- BFD_RELOC_SH_RELATIVE64,
- BFD_RELOC_SH_GOT10BY4,
- BFD_RELOC_SH_GOT10BY8,
- BFD_RELOC_SH_GOTPLT10BY4,
- BFD_RELOC_SH_GOTPLT10BY8,
- BFD_RELOC_SH_GOTPLT32,
- BFD_RELOC_SH_SHMEDIA_CODE,
- BFD_RELOC_SH_IMMU5,
- BFD_RELOC_SH_IMMS6,
- BFD_RELOC_SH_IMMS6BY32,
- BFD_RELOC_SH_IMMU6,
- BFD_RELOC_SH_IMMS10,
- BFD_RELOC_SH_IMMS10BY2,
- BFD_RELOC_SH_IMMS10BY4,
- BFD_RELOC_SH_IMMS10BY8,
- BFD_RELOC_SH_IMMS16,
- BFD_RELOC_SH_IMMU16,
- BFD_RELOC_SH_IMM_LOW16,
- BFD_RELOC_SH_IMM_LOW16_PCREL,
- BFD_RELOC_SH_IMM_MEDLOW16,
- BFD_RELOC_SH_IMM_MEDLOW16_PCREL,
- BFD_RELOC_SH_IMM_MEDHI16,
- BFD_RELOC_SH_IMM_MEDHI16_PCREL,
- BFD_RELOC_SH_IMM_HI16,
- BFD_RELOC_SH_IMM_HI16_PCREL,
- BFD_RELOC_SH_PT_16,
- BFD_RELOC_SH_TLS_GD_32,
- BFD_RELOC_SH_TLS_LD_32,
- BFD_RELOC_SH_TLS_LDO_32,
- BFD_RELOC_SH_TLS_IE_32,
- BFD_RELOC_SH_TLS_LE_32,
- BFD_RELOC_SH_TLS_DTPMOD32,
- BFD_RELOC_SH_TLS_DTPOFF32,
- BFD_RELOC_SH_TLS_TPOFF32,
- BFD_RELOC_SH_GOT20,
- BFD_RELOC_SH_GOTOFF20,
- BFD_RELOC_SH_GOTFUNCDESC,
- BFD_RELOC_SH_GOTFUNCDESC20,
- BFD_RELOC_SH_GOTOFFFUNCDESC,
- BFD_RELOC_SH_GOTOFFFUNCDESC20,
- BFD_RELOC_SH_FUNCDESC,
-
-/* ARC relocs. */
- BFD_RELOC_ARC_NONE,
- BFD_RELOC_ARC_8,
- BFD_RELOC_ARC_16,
- BFD_RELOC_ARC_24,
- BFD_RELOC_ARC_32,
- BFD_RELOC_ARC_N8,
- BFD_RELOC_ARC_N16,
- BFD_RELOC_ARC_N24,
- BFD_RELOC_ARC_N32,
- BFD_RELOC_ARC_SDA,
- BFD_RELOC_ARC_SECTOFF,
- BFD_RELOC_ARC_S21H_PCREL,
- BFD_RELOC_ARC_S21W_PCREL,
- BFD_RELOC_ARC_S25H_PCREL,
- BFD_RELOC_ARC_S25W_PCREL,
- BFD_RELOC_ARC_SDA32,
- BFD_RELOC_ARC_SDA_LDST,
- BFD_RELOC_ARC_SDA_LDST1,
- BFD_RELOC_ARC_SDA_LDST2,
- BFD_RELOC_ARC_SDA16_LD,
- BFD_RELOC_ARC_SDA16_LD1,
- BFD_RELOC_ARC_SDA16_LD2,
- BFD_RELOC_ARC_S13_PCREL,
- BFD_RELOC_ARC_W,
- BFD_RELOC_ARC_32_ME,
- BFD_RELOC_ARC_32_ME_S,
- BFD_RELOC_ARC_N32_ME,
- BFD_RELOC_ARC_SECTOFF_ME,
- BFD_RELOC_ARC_SDA32_ME,
- BFD_RELOC_ARC_W_ME,
- BFD_RELOC_AC_SECTOFF_U8,
- BFD_RELOC_AC_SECTOFF_U8_1,
- BFD_RELOC_AC_SECTOFF_U8_2,
- BFD_RELOC_AC_SECTOFF_S9,
- BFD_RELOC_AC_SECTOFF_S9_1,
- BFD_RELOC_AC_SECTOFF_S9_2,
- BFD_RELOC_ARC_SECTOFF_ME_1,
- BFD_RELOC_ARC_SECTOFF_ME_2,
- BFD_RELOC_ARC_SECTOFF_1,
- BFD_RELOC_ARC_SECTOFF_2,
- BFD_RELOC_ARC_SDA_12,
- BFD_RELOC_ARC_SDA16_ST2,
- BFD_RELOC_ARC_32_PCREL,
- BFD_RELOC_ARC_PC32,
- BFD_RELOC_ARC_GOT32,
- BFD_RELOC_ARC_GOTPC32,
- BFD_RELOC_ARC_PLT32,
- BFD_RELOC_ARC_COPY,
- BFD_RELOC_ARC_GLOB_DAT,
- BFD_RELOC_ARC_JMP_SLOT,
- BFD_RELOC_ARC_RELATIVE,
- BFD_RELOC_ARC_GOTOFF,
- BFD_RELOC_ARC_GOTPC,
- BFD_RELOC_ARC_S21W_PCREL_PLT,
- BFD_RELOC_ARC_S25H_PCREL_PLT,
- BFD_RELOC_ARC_TLS_DTPMOD,
- BFD_RELOC_ARC_TLS_TPOFF,
- BFD_RELOC_ARC_TLS_GD_GOT,
- BFD_RELOC_ARC_TLS_GD_LD,
- BFD_RELOC_ARC_TLS_GD_CALL,
- BFD_RELOC_ARC_TLS_IE_GOT,
- BFD_RELOC_ARC_TLS_DTPOFF,
- BFD_RELOC_ARC_TLS_DTPOFF_S9,
- BFD_RELOC_ARC_TLS_LE_S9,
- BFD_RELOC_ARC_TLS_LE_32,
- BFD_RELOC_ARC_S25W_PCREL_PLT,
- BFD_RELOC_ARC_S21H_PCREL_PLT,
- BFD_RELOC_ARC_NPS_CMEM16,
- BFD_RELOC_ARC_JLI_SECTOFF,
-
-/* ADI Blackfin 16 bit immediate absolute reloc. */
- BFD_RELOC_BFIN_16_IMM,
-
-/* ADI Blackfin 16 bit immediate absolute reloc higher 16 bits. */
- BFD_RELOC_BFIN_16_HIGH,
-
-/* ADI Blackfin 'a' part of LSETUP. */
- BFD_RELOC_BFIN_4_PCREL,
-
-/* ADI Blackfin. */
- BFD_RELOC_BFIN_5_PCREL,
-
-/* ADI Blackfin 16 bit immediate absolute reloc lower 16 bits. */
- BFD_RELOC_BFIN_16_LOW,
-
-/* ADI Blackfin. */
- BFD_RELOC_BFIN_10_PCREL,
-
-/* ADI Blackfin 'b' part of LSETUP. */
- BFD_RELOC_BFIN_11_PCREL,
-
-/* ADI Blackfin. */
- BFD_RELOC_BFIN_12_PCREL_JUMP,
-
-/* ADI Blackfin Short jump, pcrel. */
- BFD_RELOC_BFIN_12_PCREL_JUMP_S,
-
-/* ADI Blackfin Call.x not implemented. */
- BFD_RELOC_BFIN_24_PCREL_CALL_X,
-
-/* ADI Blackfin Long Jump pcrel. */
- BFD_RELOC_BFIN_24_PCREL_JUMP_L,
-
-/* ADI Blackfin FD-PIC relocations. */
- BFD_RELOC_BFIN_GOT17M4,
- BFD_RELOC_BFIN_GOTHI,
- BFD_RELOC_BFIN_GOTLO,
- BFD_RELOC_BFIN_FUNCDESC,
- BFD_RELOC_BFIN_FUNCDESC_GOT17M4,
- BFD_RELOC_BFIN_FUNCDESC_GOTHI,
- BFD_RELOC_BFIN_FUNCDESC_GOTLO,
- BFD_RELOC_BFIN_FUNCDESC_VALUE,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO,
- BFD_RELOC_BFIN_GOTOFF17M4,
- BFD_RELOC_BFIN_GOTOFFHI,
- BFD_RELOC_BFIN_GOTOFFLO,
-
-/* ADI Blackfin GOT relocation. */
- BFD_RELOC_BFIN_GOT,
-
-/* ADI Blackfin PLTPC relocation. */
- BFD_RELOC_BFIN_PLTPC,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_PUSH,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_CONST,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_ADD,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_SUB,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_MULT,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_DIV,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_MOD,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LSHIFT,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_RSHIFT,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_AND,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_OR,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_XOR,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LAND,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LOR,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LEN,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_NEG,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_COMP,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_PAGE,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_HWPAGE,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_ADDR,
-
-/* Mitsubishi D10V relocs.
-This is a 10-bit reloc with the right 2 bits
-assumed to be 0. */
- BFD_RELOC_D10V_10_PCREL_R,
-
-/* Mitsubishi D10V relocs.
-This is a 10-bit reloc with the right 2 bits
-assumed to be 0. This is the same as the previous reloc
-except it is in the left container, i.e.,
-shifted left 15 bits. */
- BFD_RELOC_D10V_10_PCREL_L,
-
-/* This is an 18-bit reloc with the right 2 bits
-assumed to be 0. */
- BFD_RELOC_D10V_18,
-
-/* This is an 18-bit reloc with the right 2 bits
-assumed to be 0. */
- BFD_RELOC_D10V_18_PCREL,
-
-/* Mitsubishi D30V relocs.
-This is a 6-bit absolute reloc. */
- BFD_RELOC_D30V_6,
-
-/* This is a 6-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_9_PCREL,
-
-/* This is a 6-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
- BFD_RELOC_D30V_9_PCREL_R,
-
-/* This is a 12-bit absolute reloc with the
-right 3 bitsassumed to be 0. */
- BFD_RELOC_D30V_15,
-
-/* This is a 12-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_15_PCREL,
-
-/* This is a 12-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
- BFD_RELOC_D30V_15_PCREL_R,
-
-/* This is an 18-bit absolute reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_21,
-
-/* This is an 18-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_21_PCREL,
-
-/* This is an 18-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
- BFD_RELOC_D30V_21_PCREL_R,
-
-/* This is a 32-bit absolute reloc. */
- BFD_RELOC_D30V_32,
-
-/* This is a 32-bit pc-relative reloc. */
- BFD_RELOC_D30V_32_PCREL,
-
-/* DLX relocs */
- BFD_RELOC_DLX_HI16_S,
-
-/* DLX relocs */
- BFD_RELOC_DLX_LO16,
-
-/* DLX relocs */
- BFD_RELOC_DLX_JMP26,
-
-/* Renesas M16C/M32C Relocations. */
- BFD_RELOC_M32C_HI8,
- BFD_RELOC_M32C_RL_JUMP,
- BFD_RELOC_M32C_RL_1ADDR,
- BFD_RELOC_M32C_RL_2ADDR,
-
-/* Renesas M32R (formerly Mitsubishi M32R) relocs.
-This is a 24 bit absolute address. */
- BFD_RELOC_M32R_24,
-
-/* This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0. */
- BFD_RELOC_M32R_10_PCREL,
-
-/* This is an 18-bit reloc with the right 2 bits assumed to be 0. */
- BFD_RELOC_M32R_18_PCREL,
-
-/* This is a 26-bit reloc with the right 2 bits assumed to be 0. */
- BFD_RELOC_M32R_26_PCREL,
-
-/* This is a 16-bit reloc containing the high 16 bits of an address
-used when the lower 16 bits are treated as unsigned. */
- BFD_RELOC_M32R_HI16_ULO,
-
-/* This is a 16-bit reloc containing the high 16 bits of an address
-used when the lower 16 bits are treated as signed. */
- BFD_RELOC_M32R_HI16_SLO,
-
-/* This is a 16-bit reloc containing the lower 16 bits of an address. */
- BFD_RELOC_M32R_LO16,
-
-/* This is a 16-bit reloc containing the small data area offset for use in
-add3, load, and store instructions. */
- BFD_RELOC_M32R_SDA16,
-
-/* For PIC. */
- BFD_RELOC_M32R_GOT24,
- BFD_RELOC_M32R_26_PLTREL,
- BFD_RELOC_M32R_COPY,
- BFD_RELOC_M32R_GLOB_DAT,
- BFD_RELOC_M32R_JMP_SLOT,
- BFD_RELOC_M32R_RELATIVE,
- BFD_RELOC_M32R_GOTOFF,
- BFD_RELOC_M32R_GOTOFF_HI_ULO,
- BFD_RELOC_M32R_GOTOFF_HI_SLO,
- BFD_RELOC_M32R_GOTOFF_LO,
- BFD_RELOC_M32R_GOTPC24,
- BFD_RELOC_M32R_GOT16_HI_ULO,
- BFD_RELOC_M32R_GOT16_HI_SLO,
- BFD_RELOC_M32R_GOT16_LO,
- BFD_RELOC_M32R_GOTPC_HI_ULO,
- BFD_RELOC_M32R_GOTPC_HI_SLO,
- BFD_RELOC_M32R_GOTPC_LO,
-
-/* NDS32 relocs.
-This is a 20 bit absolute address. */
- BFD_RELOC_NDS32_20,
-
-/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_9_PCREL,
-
-/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_WORD_9_PCREL,
-
-/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_15_PCREL,
-
-/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_17_PCREL,
-
-/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_25_PCREL,
-
-/* This is a 20-bit reloc containing the high 20 bits of an address
-used with the lower 12 bits */
- BFD_RELOC_NDS32_HI20,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift right by 3. This is used with ldi,sdi... */
- BFD_RELOC_NDS32_LO12S3,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 2. This is used with lwi,swi... */
- BFD_RELOC_NDS32_LO12S2,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 1. This is used with lhi,shi... */
- BFD_RELOC_NDS32_LO12S1,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 0. This is used with lbisbi... */
- BFD_RELOC_NDS32_LO12S0,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 0. This is only used with branch relaxations */
- BFD_RELOC_NDS32_LO12S0_ORI,
-
-/* This is a 15-bit reloc containing the small data area 18-bit signed offset
-and shift left by 3 for use in ldi, sdi... */
- BFD_RELOC_NDS32_SDA15S3,
-
-/* This is a 15-bit reloc containing the small data area 17-bit signed offset
-and shift left by 2 for use in lwi, swi... */
- BFD_RELOC_NDS32_SDA15S2,
-
-/* This is a 15-bit reloc containing the small data area 16-bit signed offset
-and shift left by 1 for use in lhi, shi... */
- BFD_RELOC_NDS32_SDA15S1,
-
-/* This is a 15-bit reloc containing the small data area 15-bit signed offset
-and shift left by 0 for use in lbi, sbi... */
- BFD_RELOC_NDS32_SDA15S0,
-
-/* This is a 16-bit reloc containing the small data area 16-bit signed offset
-and shift left by 3 */
- BFD_RELOC_NDS32_SDA16S3,
-
-/* This is a 17-bit reloc containing the small data area 17-bit signed offset
-and shift left by 2 for use in lwi.gp, swi.gp... */
- BFD_RELOC_NDS32_SDA17S2,
-
-/* This is a 18-bit reloc containing the small data area 18-bit signed offset
-and shift left by 1 for use in lhi.gp, shi.gp... */
- BFD_RELOC_NDS32_SDA18S1,
-
-/* This is a 19-bit reloc containing the small data area 19-bit signed offset
-and shift left by 0 for use in lbi.gp, sbi.gp... */
- BFD_RELOC_NDS32_SDA19S0,
-
-/* for PIC */
- BFD_RELOC_NDS32_GOT20,
- BFD_RELOC_NDS32_9_PLTREL,
- BFD_RELOC_NDS32_25_PLTREL,
- BFD_RELOC_NDS32_COPY,
- BFD_RELOC_NDS32_GLOB_DAT,
- BFD_RELOC_NDS32_JMP_SLOT,
- BFD_RELOC_NDS32_RELATIVE,
- BFD_RELOC_NDS32_GOTOFF,
- BFD_RELOC_NDS32_GOTOFF_HI20,
- BFD_RELOC_NDS32_GOTOFF_LO12,
- BFD_RELOC_NDS32_GOTPC20,
- BFD_RELOC_NDS32_GOT_HI20,
- BFD_RELOC_NDS32_GOT_LO12,
- BFD_RELOC_NDS32_GOTPC_HI20,
- BFD_RELOC_NDS32_GOTPC_LO12,
-
-/* for relax */
- BFD_RELOC_NDS32_INSN16,
- BFD_RELOC_NDS32_LABEL,
- BFD_RELOC_NDS32_LONGCALL1,
- BFD_RELOC_NDS32_LONGCALL2,
- BFD_RELOC_NDS32_LONGCALL3,
- BFD_RELOC_NDS32_LONGJUMP1,
- BFD_RELOC_NDS32_LONGJUMP2,
- BFD_RELOC_NDS32_LONGJUMP3,
- BFD_RELOC_NDS32_LOADSTORE,
- BFD_RELOC_NDS32_9_FIXED,
- BFD_RELOC_NDS32_15_FIXED,
- BFD_RELOC_NDS32_17_FIXED,
- BFD_RELOC_NDS32_25_FIXED,
- BFD_RELOC_NDS32_LONGCALL4,
- BFD_RELOC_NDS32_LONGCALL5,
- BFD_RELOC_NDS32_LONGCALL6,
- BFD_RELOC_NDS32_LONGJUMP4,
- BFD_RELOC_NDS32_LONGJUMP5,
- BFD_RELOC_NDS32_LONGJUMP6,
- BFD_RELOC_NDS32_LONGJUMP7,
-
-/* for PIC */
- BFD_RELOC_NDS32_PLTREL_HI20,
- BFD_RELOC_NDS32_PLTREL_LO12,
- BFD_RELOC_NDS32_PLT_GOTREL_HI20,
- BFD_RELOC_NDS32_PLT_GOTREL_LO12,
-
-/* for floating point */
- BFD_RELOC_NDS32_SDA12S2_DP,
- BFD_RELOC_NDS32_SDA12S2_SP,
- BFD_RELOC_NDS32_LO12S2_DP,
- BFD_RELOC_NDS32_LO12S2_SP,
-
-/* for dwarf2 debug_line. */
- BFD_RELOC_NDS32_DWARF2_OP1,
- BFD_RELOC_NDS32_DWARF2_OP2,
- BFD_RELOC_NDS32_DWARF2_LEB,
-
-/* for eliminate 16-bit instructions */
- BFD_RELOC_NDS32_UPDATE_TA,
-
-/* for PIC object relaxation */
- BFD_RELOC_NDS32_PLT_GOTREL_LO20,
- BFD_RELOC_NDS32_PLT_GOTREL_LO15,
- BFD_RELOC_NDS32_PLT_GOTREL_LO19,
- BFD_RELOC_NDS32_GOT_LO15,
- BFD_RELOC_NDS32_GOT_LO19,
- BFD_RELOC_NDS32_GOTOFF_LO15,
- BFD_RELOC_NDS32_GOTOFF_LO19,
- BFD_RELOC_NDS32_GOT15S2,
- BFD_RELOC_NDS32_GOT17S2,
-
-/* NDS32 relocs.
-This is a 5 bit absolute address. */
- BFD_RELOC_NDS32_5,
-
-/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_10_UPCREL,
-
-/* If fp were omitted, fp can used as another gp. */
- BFD_RELOC_NDS32_SDA_FP7U2_RELA,
-
-/* relaxation relative relocation types */
- BFD_RELOC_NDS32_RELAX_ENTRY,
- BFD_RELOC_NDS32_GOT_SUFF,
- BFD_RELOC_NDS32_GOTOFF_SUFF,
- BFD_RELOC_NDS32_PLT_GOT_SUFF,
- BFD_RELOC_NDS32_MULCALL_SUFF,
- BFD_RELOC_NDS32_PTR,
- BFD_RELOC_NDS32_PTR_COUNT,
- BFD_RELOC_NDS32_PTR_RESOLVED,
- BFD_RELOC_NDS32_PLTBLOCK,
- BFD_RELOC_NDS32_RELAX_REGION_BEGIN,
- BFD_RELOC_NDS32_RELAX_REGION_END,
- BFD_RELOC_NDS32_MINUEND,
- BFD_RELOC_NDS32_SUBTRAHEND,
- BFD_RELOC_NDS32_DIFF8,
- BFD_RELOC_NDS32_DIFF16,
- BFD_RELOC_NDS32_DIFF32,
- BFD_RELOC_NDS32_DIFF_ULEB128,
- BFD_RELOC_NDS32_EMPTY,
-
-/* This is a 25 bit absolute address. */
- BFD_RELOC_NDS32_25_ABS,
-
-/* For ex9 and ifc using. */
- BFD_RELOC_NDS32_DATA,
- BFD_RELOC_NDS32_TRAN,
- BFD_RELOC_NDS32_17IFC_PCREL,
- BFD_RELOC_NDS32_10IFCU_PCREL,
-
-/* For TLS. */
- BFD_RELOC_NDS32_TPOFF,
- BFD_RELOC_NDS32_GOTTPOFF,
- BFD_RELOC_NDS32_TLS_LE_HI20,
- BFD_RELOC_NDS32_TLS_LE_LO12,
- BFD_RELOC_NDS32_TLS_LE_20,
- BFD_RELOC_NDS32_TLS_LE_15S0,
- BFD_RELOC_NDS32_TLS_LE_15S1,
- BFD_RELOC_NDS32_TLS_LE_15S2,
- BFD_RELOC_NDS32_TLS_LE_ADD,
- BFD_RELOC_NDS32_TLS_LE_LS,
- BFD_RELOC_NDS32_TLS_IE_HI20,
- BFD_RELOC_NDS32_TLS_IE_LO12,
- BFD_RELOC_NDS32_TLS_IE_LO12S2,
- BFD_RELOC_NDS32_TLS_IEGP_HI20,
- BFD_RELOC_NDS32_TLS_IEGP_LO12,
- BFD_RELOC_NDS32_TLS_IEGP_LO12S2,
- BFD_RELOC_NDS32_TLS_IEGP_LW,
- BFD_RELOC_NDS32_TLS_DESC,
- BFD_RELOC_NDS32_TLS_DESC_HI20,
- BFD_RELOC_NDS32_TLS_DESC_LO12,
- BFD_RELOC_NDS32_TLS_DESC_20,
- BFD_RELOC_NDS32_TLS_DESC_SDA17S2,
- BFD_RELOC_NDS32_TLS_DESC_ADD,
- BFD_RELOC_NDS32_TLS_DESC_FUNC,
- BFD_RELOC_NDS32_TLS_DESC_CALL,
- BFD_RELOC_NDS32_TLS_DESC_MEM,
- BFD_RELOC_NDS32_REMOVE,
- BFD_RELOC_NDS32_GROUP,
-
-/* For floating load store relaxation. */
- BFD_RELOC_NDS32_LSI,
-
-/* This is a 9-bit reloc */
- BFD_RELOC_V850_9_PCREL,
-
-/* This is a 22-bit reloc */
- BFD_RELOC_V850_22_PCREL,
-
-/* This is a 16 bit offset from the short data area pointer. */
- BFD_RELOC_V850_SDA_16_16_OFFSET,
-
-/* This is a 16 bit offset (of which only 15 bits are used) from the
-short data area pointer. */
- BFD_RELOC_V850_SDA_15_16_OFFSET,
-
-/* This is a 16 bit offset from the zero data area pointer. */
- BFD_RELOC_V850_ZDA_16_16_OFFSET,
-
-/* This is a 16 bit offset (of which only 15 bits are used) from the
-zero data area pointer. */
- BFD_RELOC_V850_ZDA_15_16_OFFSET,
-
-/* This is an 8 bit offset (of which only 6 bits are used) from the
-tiny data area pointer. */
- BFD_RELOC_V850_TDA_6_8_OFFSET,
-
-/* This is an 8bit offset (of which only 7 bits are used) from the tiny
-data area pointer. */
- BFD_RELOC_V850_TDA_7_8_OFFSET,
-
-/* This is a 7 bit offset from the tiny data area pointer. */
- BFD_RELOC_V850_TDA_7_7_OFFSET,
-
-/* This is a 16 bit offset from the tiny data area pointer. */
- BFD_RELOC_V850_TDA_16_16_OFFSET,
-
-/* This is a 5 bit offset (of which only 4 bits are used) from the tiny
-data area pointer. */
- BFD_RELOC_V850_TDA_4_5_OFFSET,
-
-/* This is a 4 bit offset from the tiny data area pointer. */
- BFD_RELOC_V850_TDA_4_4_OFFSET,
-
-/* This is a 16 bit offset from the short data area pointer, with the
-bits placed non-contiguously in the instruction. */
- BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET,
-
-/* This is a 16 bit offset from the zero data area pointer, with the
-bits placed non-contiguously in the instruction. */
- BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET,
-
-/* This is a 6 bit offset from the call table base pointer. */
- BFD_RELOC_V850_CALLT_6_7_OFFSET,
-
-/* This is a 16 bit offset from the call table base pointer. */
- BFD_RELOC_V850_CALLT_16_16_OFFSET,
-
-/* Used for relaxing indirect function calls. */
- BFD_RELOC_V850_LONGCALL,
-
-/* Used for relaxing indirect jumps. */
- BFD_RELOC_V850_LONGJUMP,
-
-/* Used to maintain alignment whilst relaxing. */
- BFD_RELOC_V850_ALIGN,
-
-/* This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu
-instructions. */
- BFD_RELOC_V850_LO16_SPLIT_OFFSET,
-
-/* This is a 16-bit reloc. */
- BFD_RELOC_V850_16_PCREL,
-
-/* This is a 17-bit reloc. */
- BFD_RELOC_V850_17_PCREL,
-
-/* This is a 23-bit reloc. */
- BFD_RELOC_V850_23,
-
-/* This is a 32-bit reloc. */
- BFD_RELOC_V850_32_PCREL,
-
-/* This is a 32-bit reloc. */
- BFD_RELOC_V850_32_ABS,
-
-/* This is a 16-bit reloc. */
- BFD_RELOC_V850_16_SPLIT_OFFSET,
-
-/* This is a 16-bit reloc. */
- BFD_RELOC_V850_16_S1,
-
-/* Low 16 bits. 16 bit shifted by 1. */
- BFD_RELOC_V850_LO16_S1,
-
-/* This is a 16 bit offset from the call table base pointer. */
- BFD_RELOC_V850_CALLT_15_16_OFFSET,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_GOTPCREL,
-
-/* DSO relocations. */
- BFD_RELOC_V850_16_GOT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_GOT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_22_PLT_PCREL,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_PLT_PCREL,
-
-/* DSO relocations. */
- BFD_RELOC_V850_COPY,
-
-/* DSO relocations. */
- BFD_RELOC_V850_GLOB_DAT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_JMP_SLOT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_RELATIVE,
-
-/* DSO relocations. */
- BFD_RELOC_V850_16_GOTOFF,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_GOTOFF,
-
-/* start code. */
- BFD_RELOC_V850_CODE,
-
-/* start data in text. */
- BFD_RELOC_V850_DATA,
-
-/* This is a 8bit DP reloc for the tms320c30, where the most
-significant 8 bits of a 24 bit word are placed into the least
-significant 8 bits of the opcode. */
- BFD_RELOC_TIC30_LDP,
-
-/* This is a 7bit reloc for the tms320c54x, where the least
-significant 7 bits of a 16 bit word are placed into the least
-significant 7 bits of the opcode. */
- BFD_RELOC_TIC54X_PARTLS7,
-
-/* This is a 9bit DP reloc for the tms320c54x, where the most
-significant 9 bits of a 16 bit word are placed into the least
-significant 9 bits of the opcode. */
- BFD_RELOC_TIC54X_PARTMS9,
-
-/* This is an extended address 23-bit reloc for the tms320c54x. */
- BFD_RELOC_TIC54X_23,
-
-/* This is a 16-bit reloc for the tms320c54x, where the least
-significant 16 bits of a 23-bit extended address are placed into
-the opcode. */
- BFD_RELOC_TIC54X_16_OF_23,
-
-/* This is a reloc for the tms320c54x, where the most
-significant 7 bits of a 23-bit extended address are placed into
-the opcode. */
- BFD_RELOC_TIC54X_MS7_OF_23,
-
-/* TMS320C6000 relocations. */
- BFD_RELOC_C6000_PCR_S21,
- BFD_RELOC_C6000_PCR_S12,
- BFD_RELOC_C6000_PCR_S10,
- BFD_RELOC_C6000_PCR_S7,
- BFD_RELOC_C6000_ABS_S16,
- BFD_RELOC_C6000_ABS_L16,
- BFD_RELOC_C6000_ABS_H16,
- BFD_RELOC_C6000_SBR_U15_B,
- BFD_RELOC_C6000_SBR_U15_H,
- BFD_RELOC_C6000_SBR_U15_W,
- BFD_RELOC_C6000_SBR_S16,
- BFD_RELOC_C6000_SBR_L16_B,
- BFD_RELOC_C6000_SBR_L16_H,
- BFD_RELOC_C6000_SBR_L16_W,
- BFD_RELOC_C6000_SBR_H16_B,
- BFD_RELOC_C6000_SBR_H16_H,
- BFD_RELOC_C6000_SBR_H16_W,
- BFD_RELOC_C6000_SBR_GOT_U15_W,
- BFD_RELOC_C6000_SBR_GOT_L16_W,
- BFD_RELOC_C6000_SBR_GOT_H16_W,
- BFD_RELOC_C6000_DSBT_INDEX,
- BFD_RELOC_C6000_PREL31,
- BFD_RELOC_C6000_COPY,
- BFD_RELOC_C6000_JUMP_SLOT,
- BFD_RELOC_C6000_EHTYPE,
- BFD_RELOC_C6000_PCR_H16,
- BFD_RELOC_C6000_PCR_L16,
- BFD_RELOC_C6000_ALIGN,
- BFD_RELOC_C6000_FPHEAD,
- BFD_RELOC_C6000_NOCMP,
-
-/* This is a 48 bit reloc for the FR30 that stores 32 bits. */
- BFD_RELOC_FR30_48,
-
-/* This is a 32 bit reloc for the FR30 that stores 20 bits split up into
-two sections. */
- BFD_RELOC_FR30_20,
-
-/* This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in
-4 bits. */
- BFD_RELOC_FR30_6_IN_4,
-
-/* This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset
-into 8 bits. */
- BFD_RELOC_FR30_8_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 9 bit short offset
-into 8 bits. */
- BFD_RELOC_FR30_9_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 10 bit word offset
-into 8 bits. */
- BFD_RELOC_FR30_10_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
-short offset into 8 bits. */
- BFD_RELOC_FR30_9_PCREL,
-
-/* This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative
-short offset into 11 bits. */
- BFD_RELOC_FR30_12_PCREL,
-
-/* Motorola Mcore relocations. */
- BFD_RELOC_MCORE_PCREL_IMM8BY4,
- BFD_RELOC_MCORE_PCREL_IMM11BY2,
- BFD_RELOC_MCORE_PCREL_IMM4BY2,
- BFD_RELOC_MCORE_PCREL_32,
- BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2,
- BFD_RELOC_MCORE_RVA,
-
-/* Toshiba Media Processor Relocations. */
- BFD_RELOC_MEP_8,
- BFD_RELOC_MEP_16,
- BFD_RELOC_MEP_32,
- BFD_RELOC_MEP_PCREL8A2,
- BFD_RELOC_MEP_PCREL12A2,
- BFD_RELOC_MEP_PCREL17A2,
- BFD_RELOC_MEP_PCREL24A2,
- BFD_RELOC_MEP_PCABS24A2,
- BFD_RELOC_MEP_LOW16,
- BFD_RELOC_MEP_HI16U,
- BFD_RELOC_MEP_HI16S,
- BFD_RELOC_MEP_GPREL,
- BFD_RELOC_MEP_TPREL,
- BFD_RELOC_MEP_TPREL7,
- BFD_RELOC_MEP_TPREL7A2,
- BFD_RELOC_MEP_TPREL7A4,
- BFD_RELOC_MEP_UIMM24,
- BFD_RELOC_MEP_ADDR24A4,
- BFD_RELOC_MEP_GNU_VTINHERIT,
- BFD_RELOC_MEP_GNU_VTENTRY,
-
-
-/* Imagination Technologies Meta relocations. */
- BFD_RELOC_METAG_HIADDR16,
- BFD_RELOC_METAG_LOADDR16,
- BFD_RELOC_METAG_RELBRANCH,
- BFD_RELOC_METAG_GETSETOFF,
- BFD_RELOC_METAG_HIOG,
- BFD_RELOC_METAG_LOOG,
- BFD_RELOC_METAG_REL8,
- BFD_RELOC_METAG_REL16,
- BFD_RELOC_METAG_HI16_GOTOFF,
- BFD_RELOC_METAG_LO16_GOTOFF,
- BFD_RELOC_METAG_GETSET_GOTOFF,
- BFD_RELOC_METAG_GETSET_GOT,
- BFD_RELOC_METAG_HI16_GOTPC,
- BFD_RELOC_METAG_LO16_GOTPC,
- BFD_RELOC_METAG_HI16_PLT,
- BFD_RELOC_METAG_LO16_PLT,
- BFD_RELOC_METAG_RELBRANCH_PLT,
- BFD_RELOC_METAG_GOTOFF,
- BFD_RELOC_METAG_PLT,
- BFD_RELOC_METAG_COPY,
- BFD_RELOC_METAG_JMP_SLOT,
- BFD_RELOC_METAG_RELATIVE,
- BFD_RELOC_METAG_GLOB_DAT,
- BFD_RELOC_METAG_TLS_GD,
- BFD_RELOC_METAG_TLS_LDM,
- BFD_RELOC_METAG_TLS_LDO_HI16,
- BFD_RELOC_METAG_TLS_LDO_LO16,
- BFD_RELOC_METAG_TLS_LDO,
- BFD_RELOC_METAG_TLS_IE,
- BFD_RELOC_METAG_TLS_IENONPIC,
- BFD_RELOC_METAG_TLS_IENONPIC_HI16,
- BFD_RELOC_METAG_TLS_IENONPIC_LO16,
- BFD_RELOC_METAG_TLS_TPOFF,
- BFD_RELOC_METAG_TLS_DTPMOD,
- BFD_RELOC_METAG_TLS_DTPOFF,
- BFD_RELOC_METAG_TLS_LE,
- BFD_RELOC_METAG_TLS_LE_HI16,
- BFD_RELOC_METAG_TLS_LE_LO16,
-
-/* These are relocations for the GETA instruction. */
- BFD_RELOC_MMIX_GETA,
- BFD_RELOC_MMIX_GETA_1,
- BFD_RELOC_MMIX_GETA_2,
- BFD_RELOC_MMIX_GETA_3,
-
-/* These are relocations for a conditional branch instruction. */
- BFD_RELOC_MMIX_CBRANCH,
- BFD_RELOC_MMIX_CBRANCH_J,
- BFD_RELOC_MMIX_CBRANCH_1,
- BFD_RELOC_MMIX_CBRANCH_2,
- BFD_RELOC_MMIX_CBRANCH_3,
-
-/* These are relocations for the PUSHJ instruction. */
- BFD_RELOC_MMIX_PUSHJ,
- BFD_RELOC_MMIX_PUSHJ_1,
- BFD_RELOC_MMIX_PUSHJ_2,
- BFD_RELOC_MMIX_PUSHJ_3,
- BFD_RELOC_MMIX_PUSHJ_STUBBABLE,
-
-/* These are relocations for the JMP instruction. */
- BFD_RELOC_MMIX_JMP,
- BFD_RELOC_MMIX_JMP_1,
- BFD_RELOC_MMIX_JMP_2,
- BFD_RELOC_MMIX_JMP_3,
-
-/* This is a relocation for a relative address as in a GETA instruction or
-a branch. */
- BFD_RELOC_MMIX_ADDR19,
-
-/* This is a relocation for a relative address as in a JMP instruction. */
- BFD_RELOC_MMIX_ADDR27,
-
-/* This is a relocation for an instruction field that may be a general
-register or a value 0..255. */
- BFD_RELOC_MMIX_REG_OR_BYTE,
-
-/* This is a relocation for an instruction field that may be a general
-register. */
- BFD_RELOC_MMIX_REG,
-
-/* This is a relocation for two instruction fields holding a register and
-an offset, the equivalent of the relocation. */
- BFD_RELOC_MMIX_BASE_PLUS_OFFSET,
-
-/* This relocation is an assertion that the expression is not allocated as
-a global register. It does not modify contents. */
- BFD_RELOC_MMIX_LOCAL,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit pc relative
-short offset into 7 bits. */
- BFD_RELOC_AVR_7_PCREL,
-
-/* This is a 16 bit reloc for the AVR that stores 13 bit pc relative
-short offset into 12 bits. */
- BFD_RELOC_AVR_13_PCREL,
-
-/* This is a 16 bit reloc for the AVR that stores 17 bit value (usually
-program memory address) into 16 bits. */
- BFD_RELOC_AVR_16_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
-data memory address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_LO8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of data memory address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HI8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of program memory address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HH8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of 32 bit value) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_MS8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(usually data memory address) into 8 bit immediate value of SUBI insn. */
- BFD_RELOC_AVR_LO8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 8 bit of data memory address) into 8 bit immediate value of
-SUBI insn. */
- BFD_RELOC_AVR_HI8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(most high 8 bit of program memory address) into 8 bit immediate value
-of LDI or SUBI insn. */
- BFD_RELOC_AVR_HH8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value (msb
-of 32 bit value) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_MS8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
-command address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_LO8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value
-(command address) into 8 bit immediate value of LDI insn. If the address
-is beyond the 128k boundary, the linker inserts a jump stub for this reloc
-in the lower 128k. */
- BFD_RELOC_AVR_LO8_LDI_GS,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of command address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HI8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of command address) into 8 bit immediate value of LDI insn. If the address
-is beyond the 128k boundary, the linker inserts a jump stub for this reloc
-below 128k. */
- BFD_RELOC_AVR_HI8_LDI_GS,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of command address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HH8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(usually command address) into 8 bit immediate value of SUBI insn. */
- BFD_RELOC_AVR_LO8_LDI_PM_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 8 bit of 16 bit command address) into 8 bit immediate value
-of SUBI insn. */
- BFD_RELOC_AVR_HI8_LDI_PM_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 6 bit of 22 bit command address) into 8 bit immediate
-value of SUBI insn. */
- BFD_RELOC_AVR_HH8_LDI_PM_NEG,
-
-/* This is a 32 bit reloc for the AVR that stores 23 bit value
-into 22 bits. */
- BFD_RELOC_AVR_CALL,
-
-/* This is a 16 bit reloc for the AVR that stores all needed bits
-for absolute addressing with ldi with overflow check to linktime */
- BFD_RELOC_AVR_LDI,
-
-/* This is a 6 bit reloc for the AVR that stores offset for ldd/std
-instructions */
- BFD_RELOC_AVR_6,
-
-/* This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
-instructions */
- BFD_RELOC_AVR_6_ADIW,
-
-/* This is a 8 bit reloc for the AVR that stores bits 0..7 of a symbol
-in .byte lo8(symbol) */
- BFD_RELOC_AVR_8_LO,
-
-/* This is a 8 bit reloc for the AVR that stores bits 8..15 of a symbol
-in .byte hi8(symbol) */
- BFD_RELOC_AVR_8_HI,
-
-/* This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol
-in .byte hlo8(symbol) */
- BFD_RELOC_AVR_8_HLO,
-
-/* AVR relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-second symbol so the linker can determine whether to adjust the field
-value. */
- BFD_RELOC_AVR_DIFF8,
- BFD_RELOC_AVR_DIFF16,
- BFD_RELOC_AVR_DIFF32,
-
-/* This is a 7 bit reloc for the AVR that stores SRAM address for 16bit
-lds and sts instructions supported only tiny core. */
- BFD_RELOC_AVR_LDS_STS_16,
-
-/* This is a 6 bit reloc for the AVR that stores an I/O register
-number for the IN and OUT instructions */
- BFD_RELOC_AVR_PORT6,
-
-/* This is a 5 bit reloc for the AVR that stores an I/O register
-number for the SBIC, SBIS, SBI and CBI instructions */
- BFD_RELOC_AVR_PORT5,
-
-/* RISC-V relocations. */
- BFD_RELOC_RISCV_HI20,
- BFD_RELOC_RISCV_PCREL_HI20,
- BFD_RELOC_RISCV_PCREL_LO12_I,
- BFD_RELOC_RISCV_PCREL_LO12_S,
- BFD_RELOC_RISCV_LO12_I,
- BFD_RELOC_RISCV_LO12_S,
- BFD_RELOC_RISCV_GPREL12_I,
- BFD_RELOC_RISCV_GPREL12_S,
- BFD_RELOC_RISCV_TPREL_HI20,
- BFD_RELOC_RISCV_TPREL_LO12_I,
- BFD_RELOC_RISCV_TPREL_LO12_S,
- BFD_RELOC_RISCV_TPREL_ADD,
- BFD_RELOC_RISCV_CALL,
- BFD_RELOC_RISCV_CALL_PLT,
- BFD_RELOC_RISCV_ADD8,
- BFD_RELOC_RISCV_ADD16,
- BFD_RELOC_RISCV_ADD32,
- BFD_RELOC_RISCV_ADD64,
- BFD_RELOC_RISCV_SUB8,
- BFD_RELOC_RISCV_SUB16,
- BFD_RELOC_RISCV_SUB32,
- BFD_RELOC_RISCV_SUB64,
- BFD_RELOC_RISCV_GOT_HI20,
- BFD_RELOC_RISCV_TLS_GOT_HI20,
- BFD_RELOC_RISCV_TLS_GD_HI20,
- BFD_RELOC_RISCV_JMP,
- BFD_RELOC_RISCV_TLS_DTPMOD32,
- BFD_RELOC_RISCV_TLS_DTPREL32,
- BFD_RELOC_RISCV_TLS_DTPMOD64,
- BFD_RELOC_RISCV_TLS_DTPREL64,
- BFD_RELOC_RISCV_TLS_TPREL32,
- BFD_RELOC_RISCV_TLS_TPREL64,
- BFD_RELOC_RISCV_ALIGN,
- BFD_RELOC_RISCV_RVC_BRANCH,
- BFD_RELOC_RISCV_RVC_JUMP,
- BFD_RELOC_RISCV_RVC_LUI,
- BFD_RELOC_RISCV_GPREL_I,
- BFD_RELOC_RISCV_GPREL_S,
- BFD_RELOC_RISCV_TPREL_I,
- BFD_RELOC_RISCV_TPREL_S,
- BFD_RELOC_RISCV_RELAX,
- BFD_RELOC_RISCV_CFA,
- BFD_RELOC_RISCV_SUB6,
- BFD_RELOC_RISCV_SET6,
- BFD_RELOC_RISCV_SET8,
- BFD_RELOC_RISCV_SET16,
- BFD_RELOC_RISCV_SET32,
- BFD_RELOC_RISCV_32_PCREL,
-
-/* Renesas RL78 Relocations. */
- BFD_RELOC_RL78_NEG8,
- BFD_RELOC_RL78_NEG16,
- BFD_RELOC_RL78_NEG24,
- BFD_RELOC_RL78_NEG32,
- BFD_RELOC_RL78_16_OP,
- BFD_RELOC_RL78_24_OP,
- BFD_RELOC_RL78_32_OP,
- BFD_RELOC_RL78_8U,
- BFD_RELOC_RL78_16U,
- BFD_RELOC_RL78_24U,
- BFD_RELOC_RL78_DIR3U_PCREL,
- BFD_RELOC_RL78_DIFF,
- BFD_RELOC_RL78_GPRELB,
- BFD_RELOC_RL78_GPRELW,
- BFD_RELOC_RL78_GPRELL,
- BFD_RELOC_RL78_SYM,
- BFD_RELOC_RL78_OP_SUBTRACT,
- BFD_RELOC_RL78_OP_NEG,
- BFD_RELOC_RL78_OP_AND,
- BFD_RELOC_RL78_OP_SHRA,
- BFD_RELOC_RL78_ABS8,
- BFD_RELOC_RL78_ABS16,
- BFD_RELOC_RL78_ABS16_REV,
- BFD_RELOC_RL78_ABS32,
- BFD_RELOC_RL78_ABS32_REV,
- BFD_RELOC_RL78_ABS16U,
- BFD_RELOC_RL78_ABS16UW,
- BFD_RELOC_RL78_ABS16UL,
- BFD_RELOC_RL78_RELAX,
- BFD_RELOC_RL78_HI16,
- BFD_RELOC_RL78_HI8,
- BFD_RELOC_RL78_LO16,
- BFD_RELOC_RL78_CODE,
- BFD_RELOC_RL78_SADDR,
-
-/* Renesas RX Relocations. */
- BFD_RELOC_RX_NEG8,
- BFD_RELOC_RX_NEG16,
- BFD_RELOC_RX_NEG24,
- BFD_RELOC_RX_NEG32,
- BFD_RELOC_RX_16_OP,
- BFD_RELOC_RX_24_OP,
- BFD_RELOC_RX_32_OP,
- BFD_RELOC_RX_8U,
- BFD_RELOC_RX_16U,
- BFD_RELOC_RX_24U,
- BFD_RELOC_RX_DIR3U_PCREL,
- BFD_RELOC_RX_DIFF,
- BFD_RELOC_RX_GPRELB,
- BFD_RELOC_RX_GPRELW,
- BFD_RELOC_RX_GPRELL,
- BFD_RELOC_RX_SYM,
- BFD_RELOC_RX_OP_SUBTRACT,
- BFD_RELOC_RX_OP_NEG,
- BFD_RELOC_RX_ABS8,
- BFD_RELOC_RX_ABS16,
- BFD_RELOC_RX_ABS16_REV,
- BFD_RELOC_RX_ABS32,
- BFD_RELOC_RX_ABS32_REV,
- BFD_RELOC_RX_ABS16U,
- BFD_RELOC_RX_ABS16UW,
- BFD_RELOC_RX_ABS16UL,
- BFD_RELOC_RX_RELAX,
-
-/* Direct 12 bit. */
- BFD_RELOC_390_12,
-
-/* 12 bit GOT offset. */
- BFD_RELOC_390_GOT12,
-
-/* 32 bit PC relative PLT address. */
- BFD_RELOC_390_PLT32,
-
-/* Copy symbol at runtime. */
- BFD_RELOC_390_COPY,
-
-/* Create GOT entry. */
- BFD_RELOC_390_GLOB_DAT,
-
-/* Create PLT entry. */
- BFD_RELOC_390_JMP_SLOT,
-
-/* Adjust by program base. */
- BFD_RELOC_390_RELATIVE,
-
-/* 32 bit PC relative offset to GOT. */
- BFD_RELOC_390_GOTPC,
-
-/* 16 bit GOT offset. */
- BFD_RELOC_390_GOT16,
-
-/* PC relative 12 bit shifted by 1. */
- BFD_RELOC_390_PC12DBL,
-
-/* 12 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT12DBL,
-
-/* PC relative 16 bit shifted by 1. */
- BFD_RELOC_390_PC16DBL,
-
-/* 16 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT16DBL,
-
-/* PC relative 24 bit shifted by 1. */
- BFD_RELOC_390_PC24DBL,
-
-/* 24 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT24DBL,
-
-/* PC relative 32 bit shifted by 1. */
- BFD_RELOC_390_PC32DBL,
-
-/* 32 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT32DBL,
-
-/* 32 bit PC rel. GOT shifted by 1. */
- BFD_RELOC_390_GOTPCDBL,
-
-/* 64 bit GOT offset. */
- BFD_RELOC_390_GOT64,
-
-/* 64 bit PC relative PLT address. */
- BFD_RELOC_390_PLT64,
-
-/* 32 bit rel. offset to GOT entry. */
- BFD_RELOC_390_GOTENT,
-
-/* 64 bit offset to GOT. */
- BFD_RELOC_390_GOTOFF64,
-
-/* 12-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT12,
-
-/* 16-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT16,
-
-/* 32-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT32,
-
-/* 64-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT64,
-
-/* 32-bit rel. offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLTENT,
-
-/* 16-bit rel. offset from the GOT to a PLT entry. */
- BFD_RELOC_390_PLTOFF16,
-
-/* 32-bit rel. offset from the GOT to a PLT entry. */
- BFD_RELOC_390_PLTOFF32,
-
-/* 64-bit rel. offset from the GOT to a PLT entry. */
- BFD_RELOC_390_PLTOFF64,
-
-/* s390 tls relocations. */
- BFD_RELOC_390_TLS_LOAD,
- BFD_RELOC_390_TLS_GDCALL,
- BFD_RELOC_390_TLS_LDCALL,
- BFD_RELOC_390_TLS_GD32,
- BFD_RELOC_390_TLS_GD64,
- BFD_RELOC_390_TLS_GOTIE12,
- BFD_RELOC_390_TLS_GOTIE32,
- BFD_RELOC_390_TLS_GOTIE64,
- BFD_RELOC_390_TLS_LDM32,
- BFD_RELOC_390_TLS_LDM64,
- BFD_RELOC_390_TLS_IE32,
- BFD_RELOC_390_TLS_IE64,
- BFD_RELOC_390_TLS_IEENT,
- BFD_RELOC_390_TLS_LE32,
- BFD_RELOC_390_TLS_LE64,
- BFD_RELOC_390_TLS_LDO32,
- BFD_RELOC_390_TLS_LDO64,
- BFD_RELOC_390_TLS_DTPMOD,
- BFD_RELOC_390_TLS_DTPOFF,
- BFD_RELOC_390_TLS_TPOFF,
-
-/* Long displacement extension. */
- BFD_RELOC_390_20,
- BFD_RELOC_390_GOT20,
- BFD_RELOC_390_GOTPLT20,
- BFD_RELOC_390_TLS_GOTIE20,
-
-/* STT_GNU_IFUNC relocation. */
- BFD_RELOC_390_IRELATIVE,
-
-/* Score relocations
-Low 16 bit for load/store */
- BFD_RELOC_SCORE_GPREL15,
-
-/* This is a 24-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_DUMMY2,
- BFD_RELOC_SCORE_JMP,
-
-/* This is a 19-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_BRANCH,
-
-/* This is a 32-bit reloc for 48-bit instructions. */
- BFD_RELOC_SCORE_IMM30,
-
-/* This is a 32-bit reloc for 48-bit instructions. */
- BFD_RELOC_SCORE_IMM32,
-
-/* This is a 11-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE16_JMP,
-
-/* This is a 8-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE16_BRANCH,
-
-/* This is a 9-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_BCMP,
-
-/* Undocumented Score relocs */
- BFD_RELOC_SCORE_GOT15,
- BFD_RELOC_SCORE_GOT_LO16,
- BFD_RELOC_SCORE_CALL15,
- BFD_RELOC_SCORE_DUMMY_HI16,
-
-/* Scenix IP2K - 9-bit register number / data address */
- BFD_RELOC_IP2K_FR9,
-
-/* Scenix IP2K - 4-bit register/data bank number */
- BFD_RELOC_IP2K_BANK,
-
-/* Scenix IP2K - low 13 bits of instruction word address */
- BFD_RELOC_IP2K_ADDR16CJP,
-
-/* Scenix IP2K - high 3 bits of instruction word address */
- BFD_RELOC_IP2K_PAGE3,
-
-/* Scenix IP2K - ext/low/high 8 bits of data address */
- BFD_RELOC_IP2K_LO8DATA,
- BFD_RELOC_IP2K_HI8DATA,
- BFD_RELOC_IP2K_EX8DATA,
-
-/* Scenix IP2K - low/high 8 bits of instruction word address */
- BFD_RELOC_IP2K_LO8INSN,
- BFD_RELOC_IP2K_HI8INSN,
-
-/* Scenix IP2K - even/odd PC modifier to modify snb pcl.0 */
- BFD_RELOC_IP2K_PC_SKIP,
-
-/* Scenix IP2K - 16 bit word address in text section. */
- BFD_RELOC_IP2K_TEXT,
-
-/* Scenix IP2K - 7-bit sp or dp offset */
- BFD_RELOC_IP2K_FR_OFFSET,
-
-/* Scenix VPE4K coprocessor - data/insn-space addressing */
- BFD_RELOC_VPE4KMATH_DATA,
- BFD_RELOC_VPE4KMATH_INSN,
-
-/* These two relocations are used by the linker to determine which of
-the entries in a C++ virtual function table are actually used. When
-the --gc-sections option is given, the linker will zero out the entries
-that are not used, so that the code for those functions need not be
-included in the output.
-
-VTABLE_INHERIT is a zero-space relocation used to describe to the
-linker the inheritance tree of a C++ virtual function table. The
-relocation's symbol should be the parent class' vtable, and the
-relocation should be located at the child vtable.
-
-VTABLE_ENTRY is a zero-space relocation that describes the use of a
-virtual function table entry. The reloc's symbol should refer to the
-table of the class mentioned in the code. Off of that base, an offset
-describes the entry that is being used. For Rela hosts, this offset
-is stored in the reloc's addend. For Rel hosts, we are forced to put
-this offset in the reloc's section offset. */
- BFD_RELOC_VTABLE_INHERIT,
- BFD_RELOC_VTABLE_ENTRY,
-
-/* Intel IA64 Relocations. */
- BFD_RELOC_IA64_IMM14,
- BFD_RELOC_IA64_IMM22,
- BFD_RELOC_IA64_IMM64,
- BFD_RELOC_IA64_DIR32MSB,
- BFD_RELOC_IA64_DIR32LSB,
- BFD_RELOC_IA64_DIR64MSB,
- BFD_RELOC_IA64_DIR64LSB,
- BFD_RELOC_IA64_GPREL22,
- BFD_RELOC_IA64_GPREL64I,
- BFD_RELOC_IA64_GPREL32MSB,
- BFD_RELOC_IA64_GPREL32LSB,
- BFD_RELOC_IA64_GPREL64MSB,
- BFD_RELOC_IA64_GPREL64LSB,
- BFD_RELOC_IA64_LTOFF22,
- BFD_RELOC_IA64_LTOFF64I,
- BFD_RELOC_IA64_PLTOFF22,
- BFD_RELOC_IA64_PLTOFF64I,
- BFD_RELOC_IA64_PLTOFF64MSB,
- BFD_RELOC_IA64_PLTOFF64LSB,
- BFD_RELOC_IA64_FPTR64I,
- BFD_RELOC_IA64_FPTR32MSB,
- BFD_RELOC_IA64_FPTR32LSB,
- BFD_RELOC_IA64_FPTR64MSB,
- BFD_RELOC_IA64_FPTR64LSB,
- BFD_RELOC_IA64_PCREL21B,
- BFD_RELOC_IA64_PCREL21BI,
- BFD_RELOC_IA64_PCREL21M,
- BFD_RELOC_IA64_PCREL21F,
- BFD_RELOC_IA64_PCREL22,
- BFD_RELOC_IA64_PCREL60B,
- BFD_RELOC_IA64_PCREL64I,
- BFD_RELOC_IA64_PCREL32MSB,
- BFD_RELOC_IA64_PCREL32LSB,
- BFD_RELOC_IA64_PCREL64MSB,
- BFD_RELOC_IA64_PCREL64LSB,
- BFD_RELOC_IA64_LTOFF_FPTR22,
- BFD_RELOC_IA64_LTOFF_FPTR64I,
- BFD_RELOC_IA64_LTOFF_FPTR32MSB,
- BFD_RELOC_IA64_LTOFF_FPTR32LSB,
- BFD_RELOC_IA64_LTOFF_FPTR64MSB,
- BFD_RELOC_IA64_LTOFF_FPTR64LSB,
- BFD_RELOC_IA64_SEGREL32MSB,
- BFD_RELOC_IA64_SEGREL32LSB,
- BFD_RELOC_IA64_SEGREL64MSB,
- BFD_RELOC_IA64_SEGREL64LSB,
- BFD_RELOC_IA64_SECREL32MSB,
- BFD_RELOC_IA64_SECREL32LSB,
- BFD_RELOC_IA64_SECREL64MSB,
- BFD_RELOC_IA64_SECREL64LSB,
- BFD_RELOC_IA64_REL32MSB,
- BFD_RELOC_IA64_REL32LSB,
- BFD_RELOC_IA64_REL64MSB,
- BFD_RELOC_IA64_REL64LSB,
- BFD_RELOC_IA64_LTV32MSB,
- BFD_RELOC_IA64_LTV32LSB,
- BFD_RELOC_IA64_LTV64MSB,
- BFD_RELOC_IA64_LTV64LSB,
- BFD_RELOC_IA64_IPLTMSB,
- BFD_RELOC_IA64_IPLTLSB,
- BFD_RELOC_IA64_COPY,
- BFD_RELOC_IA64_LTOFF22X,
- BFD_RELOC_IA64_LDXMOV,
- BFD_RELOC_IA64_TPREL14,
- BFD_RELOC_IA64_TPREL22,
- BFD_RELOC_IA64_TPREL64I,
- BFD_RELOC_IA64_TPREL64MSB,
- BFD_RELOC_IA64_TPREL64LSB,
- BFD_RELOC_IA64_LTOFF_TPREL22,
- BFD_RELOC_IA64_DTPMOD64MSB,
- BFD_RELOC_IA64_DTPMOD64LSB,
- BFD_RELOC_IA64_LTOFF_DTPMOD22,
- BFD_RELOC_IA64_DTPREL14,
- BFD_RELOC_IA64_DTPREL22,
- BFD_RELOC_IA64_DTPREL64I,
- BFD_RELOC_IA64_DTPREL32MSB,
- BFD_RELOC_IA64_DTPREL32LSB,
- BFD_RELOC_IA64_DTPREL64MSB,
- BFD_RELOC_IA64_DTPREL64LSB,
- BFD_RELOC_IA64_LTOFF_DTPREL22,
-
-/* Motorola 68HC11 reloc.
-This is the 8 bit high part of an absolute address. */
- BFD_RELOC_M68HC11_HI8,
-
-/* Motorola 68HC11 reloc.
-This is the 8 bit low part of an absolute address. */
- BFD_RELOC_M68HC11_LO8,
-
-/* Motorola 68HC11 reloc.
-This is the 3 bit of a value. */
- BFD_RELOC_M68HC11_3B,
-
-/* Motorola 68HC11 reloc.
-This reloc marks the beginning of a jump/call instruction.
-It is used for linker relaxation to correctly identify beginning
-of instruction and change some branches to use PC-relative
-addressing mode. */
- BFD_RELOC_M68HC11_RL_JUMP,
-
-/* Motorola 68HC11 reloc.
-This reloc marks a group of several instructions that gcc generates
-and for which the linker relaxation pass can modify and/or remove
-some of them. */
- BFD_RELOC_M68HC11_RL_GROUP,
-
-/* Motorola 68HC11 reloc.
-This is the 16-bit lower part of an address. It is used for 'call'
-instruction to specify the symbol address without any special
-transformation (due to memory bank window). */
- BFD_RELOC_M68HC11_LO16,
-
-/* Motorola 68HC11 reloc.
-This is a 8-bit reloc that specifies the page number of an address.
-It is used by 'call' instruction to specify the page number of
-the symbol. */
- BFD_RELOC_M68HC11_PAGE,
-
-/* Motorola 68HC11 reloc.
-This is a 24-bit reloc that represents the address with a 16-bit
-value and a 8-bit page number. The symbol address is transformed
-to follow the 16K memory bank of 68HC12 (seen as mapped in the window). */
- BFD_RELOC_M68HC11_24,
-
-/* Motorola 68HC12 reloc.
-This is the 5 bits of a value. */
- BFD_RELOC_M68HC12_5B,
-
-/* Freescale XGATE reloc.
-This reloc marks the beginning of a bra/jal instruction. */
- BFD_RELOC_XGATE_RL_JUMP,
-
-/* Freescale XGATE reloc.
-This reloc marks a group of several instructions that gcc generates
-and for which the linker relaxation pass can modify and/or remove
-some of them. */
- BFD_RELOC_XGATE_RL_GROUP,
-
-/* Freescale XGATE reloc.
-This is the 16-bit lower part of an address. It is used for the '16-bit'
-instructions. */
- BFD_RELOC_XGATE_LO16,
-
-/* Freescale XGATE reloc. */
- BFD_RELOC_XGATE_GPAGE,
-
-/* Freescale XGATE reloc. */
- BFD_RELOC_XGATE_24,
-
-/* Freescale XGATE reloc.
-This is a 9-bit pc-relative reloc. */
- BFD_RELOC_XGATE_PCREL_9,
-
-/* Freescale XGATE reloc.
-This is a 10-bit pc-relative reloc. */
- BFD_RELOC_XGATE_PCREL_10,
-
-/* Freescale XGATE reloc.
-This is the 16-bit lower part of an address. It is used for the '16-bit'
-instructions. */
- BFD_RELOC_XGATE_IMM8_LO,
-
-/* Freescale XGATE reloc.
-This is the 16-bit higher part of an address. It is used for the '16-bit'
-instructions. */
- BFD_RELOC_XGATE_IMM8_HI,
-
-/* Freescale XGATE reloc.
-This is a 3-bit pc-relative reloc. */
- BFD_RELOC_XGATE_IMM3,
-
-/* Freescale XGATE reloc.
-This is a 4-bit pc-relative reloc. */
- BFD_RELOC_XGATE_IMM4,
-
-/* Freescale XGATE reloc.
-This is a 5-bit pc-relative reloc. */
- BFD_RELOC_XGATE_IMM5,
-
-/* Motorola 68HC12 reloc.
-This is the 9 bits of a value. */
- BFD_RELOC_M68HC12_9B,
-
-/* Motorola 68HC12 reloc.
-This is the 16 bits of a value. */
- BFD_RELOC_M68HC12_16B,
-
-/* Motorola 68HC12/XGATE reloc.
-This is a PCREL9 branch. */
- BFD_RELOC_M68HC12_9_PCREL,
-
-/* Motorola 68HC12/XGATE reloc.
-This is a PCREL10 branch. */
- BFD_RELOC_M68HC12_10_PCREL,
-
-/* Motorola 68HC12/XGATE reloc.
-This is the 8 bit low part of an absolute address and immediately precedes
-a matching HI8XG part. */
- BFD_RELOC_M68HC12_LO8XG,
-
-/* Motorola 68HC12/XGATE reloc.
-This is the 8 bit high part of an absolute address and immediately follows
-a matching LO8XG part. */
- BFD_RELOC_M68HC12_HI8XG,
-
-/* Freescale S12Z reloc.
-This is a 15 bit relative address. If the most significant bits are all zero
-then it may be truncated to 8 bits. */
- BFD_RELOC_S12Z_15_PCREL,
-
-/* NS CR16C Relocations. */
- BFD_RELOC_16C_NUM08,
- BFD_RELOC_16C_NUM08_C,
- BFD_RELOC_16C_NUM16,
- BFD_RELOC_16C_NUM16_C,
- BFD_RELOC_16C_NUM32,
- BFD_RELOC_16C_NUM32_C,
- BFD_RELOC_16C_DISP04,
- BFD_RELOC_16C_DISP04_C,
- BFD_RELOC_16C_DISP08,
- BFD_RELOC_16C_DISP08_C,
- BFD_RELOC_16C_DISP16,
- BFD_RELOC_16C_DISP16_C,
- BFD_RELOC_16C_DISP24,
- BFD_RELOC_16C_DISP24_C,
- BFD_RELOC_16C_DISP24a,
- BFD_RELOC_16C_DISP24a_C,
- BFD_RELOC_16C_REG04,
- BFD_RELOC_16C_REG04_C,
- BFD_RELOC_16C_REG04a,
- BFD_RELOC_16C_REG04a_C,
- BFD_RELOC_16C_REG14,
- BFD_RELOC_16C_REG14_C,
- BFD_RELOC_16C_REG16,
- BFD_RELOC_16C_REG16_C,
- BFD_RELOC_16C_REG20,
- BFD_RELOC_16C_REG20_C,
- BFD_RELOC_16C_ABS20,
- BFD_RELOC_16C_ABS20_C,
- BFD_RELOC_16C_ABS24,
- BFD_RELOC_16C_ABS24_C,
- BFD_RELOC_16C_IMM04,
- BFD_RELOC_16C_IMM04_C,
- BFD_RELOC_16C_IMM16,
- BFD_RELOC_16C_IMM16_C,
- BFD_RELOC_16C_IMM20,
- BFD_RELOC_16C_IMM20_C,
- BFD_RELOC_16C_IMM24,
- BFD_RELOC_16C_IMM24_C,
- BFD_RELOC_16C_IMM32,
- BFD_RELOC_16C_IMM32_C,
-
-/* NS CR16 Relocations. */
- BFD_RELOC_CR16_NUM8,
- BFD_RELOC_CR16_NUM16,
- BFD_RELOC_CR16_NUM32,
- BFD_RELOC_CR16_NUM32a,
- BFD_RELOC_CR16_REGREL0,
- BFD_RELOC_CR16_REGREL4,
- BFD_RELOC_CR16_REGREL4a,
- BFD_RELOC_CR16_REGREL14,
- BFD_RELOC_CR16_REGREL14a,
- BFD_RELOC_CR16_REGREL16,
- BFD_RELOC_CR16_REGREL20,
- BFD_RELOC_CR16_REGREL20a,
- BFD_RELOC_CR16_ABS20,
- BFD_RELOC_CR16_ABS24,
- BFD_RELOC_CR16_IMM4,
- BFD_RELOC_CR16_IMM8,
- BFD_RELOC_CR16_IMM16,
- BFD_RELOC_CR16_IMM20,
- BFD_RELOC_CR16_IMM24,
- BFD_RELOC_CR16_IMM32,
- BFD_RELOC_CR16_IMM32a,
- BFD_RELOC_CR16_DISP4,
- BFD_RELOC_CR16_DISP8,
- BFD_RELOC_CR16_DISP16,
- BFD_RELOC_CR16_DISP20,
- BFD_RELOC_CR16_DISP24,
- BFD_RELOC_CR16_DISP24a,
- BFD_RELOC_CR16_SWITCH8,
- BFD_RELOC_CR16_SWITCH16,
- BFD_RELOC_CR16_SWITCH32,
- BFD_RELOC_CR16_GOT_REGREL20,
- BFD_RELOC_CR16_GOTC_REGREL20,
- BFD_RELOC_CR16_GLOB_DAT,
-
-/* NS CRX Relocations. */
- BFD_RELOC_CRX_REL4,
- BFD_RELOC_CRX_REL8,
- BFD_RELOC_CRX_REL8_CMP,
- BFD_RELOC_CRX_REL16,
- BFD_RELOC_CRX_REL24,
- BFD_RELOC_CRX_REL32,
- BFD_RELOC_CRX_REGREL12,
- BFD_RELOC_CRX_REGREL22,
- BFD_RELOC_CRX_REGREL28,
- BFD_RELOC_CRX_REGREL32,
- BFD_RELOC_CRX_ABS16,
- BFD_RELOC_CRX_ABS32,
- BFD_RELOC_CRX_NUM8,
- BFD_RELOC_CRX_NUM16,
- BFD_RELOC_CRX_NUM32,
- BFD_RELOC_CRX_IMM16,
- BFD_RELOC_CRX_IMM32,
- BFD_RELOC_CRX_SWITCH8,
- BFD_RELOC_CRX_SWITCH16,
- BFD_RELOC_CRX_SWITCH32,
-
-/* These relocs are only used within the CRIS assembler. They are not
-(at present) written to any object files. */
- BFD_RELOC_CRIS_BDISP8,
- BFD_RELOC_CRIS_UNSIGNED_5,
- BFD_RELOC_CRIS_SIGNED_6,
- BFD_RELOC_CRIS_UNSIGNED_6,
- BFD_RELOC_CRIS_SIGNED_8,
- BFD_RELOC_CRIS_UNSIGNED_8,
- BFD_RELOC_CRIS_SIGNED_16,
- BFD_RELOC_CRIS_UNSIGNED_16,
- BFD_RELOC_CRIS_LAPCQ_OFFSET,
- BFD_RELOC_CRIS_UNSIGNED_4,
-
-/* Relocs used in ELF shared libraries for CRIS. */
- BFD_RELOC_CRIS_COPY,
- BFD_RELOC_CRIS_GLOB_DAT,
- BFD_RELOC_CRIS_JUMP_SLOT,
- BFD_RELOC_CRIS_RELATIVE,
-
-/* 32-bit offset to symbol-entry within GOT. */
- BFD_RELOC_CRIS_32_GOT,
-
-/* 16-bit offset to symbol-entry within GOT. */
- BFD_RELOC_CRIS_16_GOT,
-
-/* 32-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_CRIS_32_GOTPLT,
-
-/* 16-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_CRIS_16_GOTPLT,
-
-/* 32-bit offset to symbol, relative to GOT. */
- BFD_RELOC_CRIS_32_GOTREL,
-
-/* 32-bit offset to symbol with PLT entry, relative to GOT. */
- BFD_RELOC_CRIS_32_PLT_GOTREL,
-
-/* 32-bit offset to symbol with PLT entry, relative to this relocation. */
- BFD_RELOC_CRIS_32_PLT_PCREL,
-
-/* Relocs used in TLS code for CRIS. */
- BFD_RELOC_CRIS_32_GOT_GD,
- BFD_RELOC_CRIS_16_GOT_GD,
- BFD_RELOC_CRIS_32_GD,
- BFD_RELOC_CRIS_DTP,
- BFD_RELOC_CRIS_32_DTPREL,
- BFD_RELOC_CRIS_16_DTPREL,
- BFD_RELOC_CRIS_32_GOT_TPREL,
- BFD_RELOC_CRIS_16_GOT_TPREL,
- BFD_RELOC_CRIS_32_TPREL,
- BFD_RELOC_CRIS_16_TPREL,
- BFD_RELOC_CRIS_DTPMOD,
- BFD_RELOC_CRIS_32_IE,
-
-/* OpenRISC 1000 Relocations. */
- BFD_RELOC_OR1K_REL_26,
- BFD_RELOC_OR1K_SLO16,
- BFD_RELOC_OR1K_PCREL_PG21,
- BFD_RELOC_OR1K_LO13,
- BFD_RELOC_OR1K_SLO13,
- BFD_RELOC_OR1K_GOTPC_HI16,
- BFD_RELOC_OR1K_GOTPC_LO16,
- BFD_RELOC_OR1K_GOT16,
- BFD_RELOC_OR1K_GOT_PG21,
- BFD_RELOC_OR1K_GOT_LO13,
- BFD_RELOC_OR1K_PLT26,
- BFD_RELOC_OR1K_PLTA26,
- BFD_RELOC_OR1K_GOTOFF_SLO16,
- BFD_RELOC_OR1K_COPY,
- BFD_RELOC_OR1K_GLOB_DAT,
- BFD_RELOC_OR1K_JMP_SLOT,
- BFD_RELOC_OR1K_RELATIVE,
- BFD_RELOC_OR1K_TLS_GD_HI16,
- BFD_RELOC_OR1K_TLS_GD_LO16,
- BFD_RELOC_OR1K_TLS_GD_PG21,
- BFD_RELOC_OR1K_TLS_GD_LO13,
- BFD_RELOC_OR1K_TLS_LDM_HI16,
- BFD_RELOC_OR1K_TLS_LDM_LO16,
- BFD_RELOC_OR1K_TLS_LDM_PG21,
- BFD_RELOC_OR1K_TLS_LDM_LO13,
- BFD_RELOC_OR1K_TLS_LDO_HI16,
- BFD_RELOC_OR1K_TLS_LDO_LO16,
- BFD_RELOC_OR1K_TLS_IE_HI16,
- BFD_RELOC_OR1K_TLS_IE_AHI16,
- BFD_RELOC_OR1K_TLS_IE_LO16,
- BFD_RELOC_OR1K_TLS_IE_PG21,
- BFD_RELOC_OR1K_TLS_IE_LO13,
- BFD_RELOC_OR1K_TLS_LE_HI16,
- BFD_RELOC_OR1K_TLS_LE_AHI16,
- BFD_RELOC_OR1K_TLS_LE_LO16,
- BFD_RELOC_OR1K_TLS_LE_SLO16,
- BFD_RELOC_OR1K_TLS_TPOFF,
- BFD_RELOC_OR1K_TLS_DTPOFF,
- BFD_RELOC_OR1K_TLS_DTPMOD,
-
-/* H8 elf Relocations. */
- BFD_RELOC_H8_DIR16A8,
- BFD_RELOC_H8_DIR16R8,
- BFD_RELOC_H8_DIR24A8,
- BFD_RELOC_H8_DIR24R8,
- BFD_RELOC_H8_DIR32A16,
- BFD_RELOC_H8_DISP32A16,
-
-/* Sony Xstormy16 Relocations. */
- BFD_RELOC_XSTORMY16_REL_12,
- BFD_RELOC_XSTORMY16_12,
- BFD_RELOC_XSTORMY16_24,
- BFD_RELOC_XSTORMY16_FPTR16,
-
-/* Self-describing complex relocations. */
- BFD_RELOC_RELC,
-
-
-/* Infineon Relocations. */
- BFD_RELOC_XC16X_PAG,
- BFD_RELOC_XC16X_POF,
- BFD_RELOC_XC16X_SEG,
- BFD_RELOC_XC16X_SOF,
-
-/* Relocations used by VAX ELF. */
- BFD_RELOC_VAX_GLOB_DAT,
- BFD_RELOC_VAX_JMP_SLOT,
- BFD_RELOC_VAX_RELATIVE,
-
-/* Morpho MT - 16 bit immediate relocation. */
- BFD_RELOC_MT_PC16,
-
-/* Morpho MT - Hi 16 bits of an address. */
- BFD_RELOC_MT_HI16,
-
-/* Morpho MT - Low 16 bits of an address. */
- BFD_RELOC_MT_LO16,
-
-/* Morpho MT - Used to tell the linker which vtable entries are used. */
- BFD_RELOC_MT_GNU_VTINHERIT,
-
-/* Morpho MT - Used to tell the linker which vtable entries are used. */
- BFD_RELOC_MT_GNU_VTENTRY,
-
-/* Morpho MT - 8 bit immediate relocation. */
- BFD_RELOC_MT_PCINSN8,
-
-/* msp430 specific relocation codes */
- BFD_RELOC_MSP430_10_PCREL,
- BFD_RELOC_MSP430_16_PCREL,
- BFD_RELOC_MSP430_16,
- BFD_RELOC_MSP430_16_PCREL_BYTE,
- BFD_RELOC_MSP430_16_BYTE,
- BFD_RELOC_MSP430_2X_PCREL,
- BFD_RELOC_MSP430_RL_PCREL,
- BFD_RELOC_MSP430_ABS8,
- BFD_RELOC_MSP430X_PCR20_EXT_SRC,
- BFD_RELOC_MSP430X_PCR20_EXT_DST,
- BFD_RELOC_MSP430X_PCR20_EXT_ODST,
- BFD_RELOC_MSP430X_ABS20_EXT_SRC,
- BFD_RELOC_MSP430X_ABS20_EXT_DST,
- BFD_RELOC_MSP430X_ABS20_EXT_ODST,
- BFD_RELOC_MSP430X_ABS20_ADR_SRC,
- BFD_RELOC_MSP430X_ABS20_ADR_DST,
- BFD_RELOC_MSP430X_PCR16,
- BFD_RELOC_MSP430X_PCR20_CALL,
- BFD_RELOC_MSP430X_ABS16,
- BFD_RELOC_MSP430_ABS_HI16,
- BFD_RELOC_MSP430_PREL31,
- BFD_RELOC_MSP430_SYM_DIFF,
-
-/* Relocations used by the Altera Nios II core. */
- BFD_RELOC_NIOS2_S16,
- BFD_RELOC_NIOS2_U16,
- BFD_RELOC_NIOS2_CALL26,
- BFD_RELOC_NIOS2_IMM5,
- BFD_RELOC_NIOS2_CACHE_OPX,
- BFD_RELOC_NIOS2_IMM6,
- BFD_RELOC_NIOS2_IMM8,
- BFD_RELOC_NIOS2_HI16,
- BFD_RELOC_NIOS2_LO16,
- BFD_RELOC_NIOS2_HIADJ16,
- BFD_RELOC_NIOS2_GPREL,
- BFD_RELOC_NIOS2_UJMP,
- BFD_RELOC_NIOS2_CJMP,
- BFD_RELOC_NIOS2_CALLR,
- BFD_RELOC_NIOS2_ALIGN,
- BFD_RELOC_NIOS2_GOT16,
- BFD_RELOC_NIOS2_CALL16,
- BFD_RELOC_NIOS2_GOTOFF_LO,
- BFD_RELOC_NIOS2_GOTOFF_HA,
- BFD_RELOC_NIOS2_PCREL_LO,
- BFD_RELOC_NIOS2_PCREL_HA,
- BFD_RELOC_NIOS2_TLS_GD16,
- BFD_RELOC_NIOS2_TLS_LDM16,
- BFD_RELOC_NIOS2_TLS_LDO16,
- BFD_RELOC_NIOS2_TLS_IE16,
- BFD_RELOC_NIOS2_TLS_LE16,
- BFD_RELOC_NIOS2_TLS_DTPMOD,
- BFD_RELOC_NIOS2_TLS_DTPREL,
- BFD_RELOC_NIOS2_TLS_TPREL,
- BFD_RELOC_NIOS2_COPY,
- BFD_RELOC_NIOS2_GLOB_DAT,
- BFD_RELOC_NIOS2_JUMP_SLOT,
- BFD_RELOC_NIOS2_RELATIVE,
- BFD_RELOC_NIOS2_GOTOFF,
- BFD_RELOC_NIOS2_CALL26_NOAT,
- BFD_RELOC_NIOS2_GOT_LO,
- BFD_RELOC_NIOS2_GOT_HA,
- BFD_RELOC_NIOS2_CALL_LO,
- BFD_RELOC_NIOS2_CALL_HA,
- BFD_RELOC_NIOS2_R2_S12,
- BFD_RELOC_NIOS2_R2_I10_1_PCREL,
- BFD_RELOC_NIOS2_R2_T1I7_1_PCREL,
- BFD_RELOC_NIOS2_R2_T1I7_2,
- BFD_RELOC_NIOS2_R2_T2I4,
- BFD_RELOC_NIOS2_R2_T2I4_1,
- BFD_RELOC_NIOS2_R2_T2I4_2,
- BFD_RELOC_NIOS2_R2_X1I7_2,
- BFD_RELOC_NIOS2_R2_X2L5,
- BFD_RELOC_NIOS2_R2_F1I5_2,
- BFD_RELOC_NIOS2_R2_L5I4X1,
- BFD_RELOC_NIOS2_R2_T1X1I6,
- BFD_RELOC_NIOS2_R2_T1X1I6_2,
-
-/* PRU LDI 16-bit unsigned data-memory relocation. */
- BFD_RELOC_PRU_U16,
-
-/* PRU LDI 16-bit unsigned instruction-memory relocation. */
- BFD_RELOC_PRU_U16_PMEMIMM,
-
-/* PRU relocation for two consecutive LDI load instructions that load a
-32 bit value into a register. If the higher bits are all zero, then
-the second instruction may be relaxed. */
- BFD_RELOC_PRU_LDI32,
-
-/* PRU QBBx 10-bit signed PC-relative relocation. */
- BFD_RELOC_PRU_S10_PCREL,
-
-/* PRU 8-bit unsigned relocation used for the LOOP instruction. */
- BFD_RELOC_PRU_U8_PCREL,
-
-/* PRU Program Memory relocations. Used to convert from byte addressing to
-32-bit word addressing. */
- BFD_RELOC_PRU_32_PMEM,
- BFD_RELOC_PRU_16_PMEM,
-
-/* PRU relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-second symbol so the linker can determine whether to adjust the field
-value. The PMEM variants encode the word difference, instead of byte
-difference between symbols. */
- BFD_RELOC_PRU_GNU_DIFF8,
- BFD_RELOC_PRU_GNU_DIFF16,
- BFD_RELOC_PRU_GNU_DIFF32,
- BFD_RELOC_PRU_GNU_DIFF16_PMEM,
- BFD_RELOC_PRU_GNU_DIFF32_PMEM,
-
-/* IQ2000 Relocations. */
- BFD_RELOC_IQ2000_OFFSET_16,
- BFD_RELOC_IQ2000_OFFSET_21,
- BFD_RELOC_IQ2000_UHI16,
-
-/* Special Xtensa relocation used only by PLT entries in ELF shared
-objects to indicate that the runtime linker should set the value
-to one of its own internal functions or data structures. */
- BFD_RELOC_XTENSA_RTLD,
-
-/* Xtensa relocations for ELF shared objects. */
- BFD_RELOC_XTENSA_GLOB_DAT,
- BFD_RELOC_XTENSA_JMP_SLOT,
- BFD_RELOC_XTENSA_RELATIVE,
-
-/* Xtensa relocation used in ELF object files for symbols that may require
-PLT entries. Otherwise, this is just a generic 32-bit relocation. */
- BFD_RELOC_XTENSA_PLT,
-
-/* Xtensa relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-first symbol so the linker can determine whether to adjust the field
-value. */
- BFD_RELOC_XTENSA_DIFF8,
- BFD_RELOC_XTENSA_DIFF16,
- BFD_RELOC_XTENSA_DIFF32,
-
-/* Generic Xtensa relocations for instruction operands. Only the slot
-number is encoded in the relocation. The relocation applies to the
-last PC-relative immediate operand, or if there are no PC-relative
-immediates, to the last immediate operand. */
- BFD_RELOC_XTENSA_SLOT0_OP,
- BFD_RELOC_XTENSA_SLOT1_OP,
- BFD_RELOC_XTENSA_SLOT2_OP,
- BFD_RELOC_XTENSA_SLOT3_OP,
- BFD_RELOC_XTENSA_SLOT4_OP,
- BFD_RELOC_XTENSA_SLOT5_OP,
- BFD_RELOC_XTENSA_SLOT6_OP,
- BFD_RELOC_XTENSA_SLOT7_OP,
- BFD_RELOC_XTENSA_SLOT8_OP,
- BFD_RELOC_XTENSA_SLOT9_OP,
- BFD_RELOC_XTENSA_SLOT10_OP,
- BFD_RELOC_XTENSA_SLOT11_OP,
- BFD_RELOC_XTENSA_SLOT12_OP,
- BFD_RELOC_XTENSA_SLOT13_OP,
- BFD_RELOC_XTENSA_SLOT14_OP,
-
-/* Alternate Xtensa relocations. Only the slot is encoded in the
-relocation. The meaning of these relocations is opcode-specific. */
- BFD_RELOC_XTENSA_SLOT0_ALT,
- BFD_RELOC_XTENSA_SLOT1_ALT,
- BFD_RELOC_XTENSA_SLOT2_ALT,
- BFD_RELOC_XTENSA_SLOT3_ALT,
- BFD_RELOC_XTENSA_SLOT4_ALT,
- BFD_RELOC_XTENSA_SLOT5_ALT,
- BFD_RELOC_XTENSA_SLOT6_ALT,
- BFD_RELOC_XTENSA_SLOT7_ALT,
- BFD_RELOC_XTENSA_SLOT8_ALT,
- BFD_RELOC_XTENSA_SLOT9_ALT,
- BFD_RELOC_XTENSA_SLOT10_ALT,
- BFD_RELOC_XTENSA_SLOT11_ALT,
- BFD_RELOC_XTENSA_SLOT12_ALT,
- BFD_RELOC_XTENSA_SLOT13_ALT,
- BFD_RELOC_XTENSA_SLOT14_ALT,
-
-/* Xtensa relocations for backward compatibility. These have all been
-replaced by BFD_RELOC_XTENSA_SLOT0_OP. */
- BFD_RELOC_XTENSA_OP0,
- BFD_RELOC_XTENSA_OP1,
- BFD_RELOC_XTENSA_OP2,
-
-/* Xtensa relocation to mark that the assembler expanded the
-instructions from an original target. The expansion size is
-encoded in the reloc size. */
- BFD_RELOC_XTENSA_ASM_EXPAND,
-
-/* Xtensa relocation to mark that the linker should simplify
-assembler-expanded instructions. This is commonly used
-internally by the linker after analysis of a
-BFD_RELOC_XTENSA_ASM_EXPAND. */
- BFD_RELOC_XTENSA_ASM_SIMPLIFY,
-
-/* Xtensa TLS relocations. */
- BFD_RELOC_XTENSA_TLSDESC_FN,
- BFD_RELOC_XTENSA_TLSDESC_ARG,
- BFD_RELOC_XTENSA_TLS_DTPOFF,
- BFD_RELOC_XTENSA_TLS_TPOFF,
- BFD_RELOC_XTENSA_TLS_FUNC,
- BFD_RELOC_XTENSA_TLS_ARG,
- BFD_RELOC_XTENSA_TLS_CALL,
-
-/* 8 bit signed offset in (ix+d) or (iy+d). */
- BFD_RELOC_Z80_DISP8,
-
-/* DJNZ offset. */
- BFD_RELOC_Z8K_DISP7,
-
-/* CALR offset. */
- BFD_RELOC_Z8K_CALLR,
-
-/* 4 bit value. */
- BFD_RELOC_Z8K_IMM4L,
-
-/* Lattice Mico32 relocations. */
- BFD_RELOC_LM32_CALL,
- BFD_RELOC_LM32_BRANCH,
- BFD_RELOC_LM32_16_GOT,
- BFD_RELOC_LM32_GOTOFF_HI16,
- BFD_RELOC_LM32_GOTOFF_LO16,
- BFD_RELOC_LM32_COPY,
- BFD_RELOC_LM32_GLOB_DAT,
- BFD_RELOC_LM32_JMP_SLOT,
- BFD_RELOC_LM32_RELATIVE,
-
-/* Difference between two section addreses. Must be followed by a
-BFD_RELOC_MACH_O_PAIR. */
- BFD_RELOC_MACH_O_SECTDIFF,
-
-/* Like BFD_RELOC_MACH_O_SECTDIFF but with a local symbol. */
- BFD_RELOC_MACH_O_LOCAL_SECTDIFF,
-
-/* Pair of relocation. Contains the first symbol. */
- BFD_RELOC_MACH_O_PAIR,
-
-/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */
- BFD_RELOC_MACH_O_SUBTRACTOR32,
-
-/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */
- BFD_RELOC_MACH_O_SUBTRACTOR64,
-
-/* PCREL relocations. They are marked as branch to create PLT entry if
-required. */
- BFD_RELOC_MACH_O_X86_64_BRANCH32,
- BFD_RELOC_MACH_O_X86_64_BRANCH8,
-
-/* Used when referencing a GOT entry. */
- BFD_RELOC_MACH_O_X86_64_GOT,
-
-/* Used when loading a GOT entry with movq. It is specially marked so that
-the linker could optimize the movq to a leaq if possible. */
- BFD_RELOC_MACH_O_X86_64_GOT_LOAD,
-
-/* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */
- BFD_RELOC_MACH_O_X86_64_PCREL32_1,
-
-/* Same as BFD_RELOC_32_PCREL but with an implicit -2 addend. */
- BFD_RELOC_MACH_O_X86_64_PCREL32_2,
-
-/* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */
- BFD_RELOC_MACH_O_X86_64_PCREL32_4,
-
-/* Used when referencing a TLV entry. */
- BFD_RELOC_MACH_O_X86_64_TLV,
-
-/* Addend for PAGE or PAGEOFF. */
- BFD_RELOC_MACH_O_ARM64_ADDEND,
-
-/* Relative offset to page of GOT slot. */
- BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21,
-
-/* Relative offset within page of GOT slot. */
- BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12,
-
-/* Address of a GOT entry. */
- BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT,
-
-/* This is a 32 bit reloc for the microblaze that stores the
-low 16 bits of a value */
- BFD_RELOC_MICROBLAZE_32_LO,
-
-/* This is a 32 bit pc-relative reloc for the microblaze that
-stores the low 16 bits of a value */
- BFD_RELOC_MICROBLAZE_32_LO_PCREL,
-
-/* This is a 32 bit reloc for the microblaze that stores a
-value relative to the read-only small data area anchor */
- BFD_RELOC_MICROBLAZE_32_ROSDA,
-
-/* This is a 32 bit reloc for the microblaze that stores a
-value relative to the read-write small data area anchor */
- BFD_RELOC_MICROBLAZE_32_RWSDA,
-
-/* This is a 32 bit reloc for the microblaze to handle
-expressions of the form "Symbol Op Symbol" */
- BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). No relocation is
-done here - only used for relaxing */
- BFD_RELOC_MICROBLAZE_64_NONE,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-PC-relative GOT offset */
- BFD_RELOC_MICROBLAZE_64_GOTPC,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-GOT offset */
- BFD_RELOC_MICROBLAZE_64_GOT,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-PC-relative offset into PLT */
- BFD_RELOC_MICROBLAZE_64_PLT,
-
-/* This is a 64 bit reloc that stores the 32 bit GOT relative
-value in two words (with an imm instruction). The relocation is
-relative offset from _GLOBAL_OFFSET_TABLE_ */
- BFD_RELOC_MICROBLAZE_64_GOTOFF,
-
-/* This is a 32 bit reloc that stores the 32 bit GOT relative
-value in a word. The relocation is relative offset from */
- BFD_RELOC_MICROBLAZE_32_GOTOFF,
-
-/* This is used to tell the dynamic linker to copy the value out of
-the dynamic object into the runtime process image. */
- BFD_RELOC_MICROBLAZE_COPY,
-
-/* Unused Reloc */
- BFD_RELOC_MICROBLAZE_64_TLS,
-
-/* This is a 64 bit reloc that stores the 32 bit GOT relative value
-of the GOT TLS GD info entry in two words (with an imm instruction). The
-relocation is GOT offset. */
- BFD_RELOC_MICROBLAZE_64_TLSGD,
-
-/* This is a 64 bit reloc that stores the 32 bit GOT relative value
-of the GOT TLS LD info entry in two words (with an imm instruction). The
-relocation is GOT offset. */
- BFD_RELOC_MICROBLAZE_64_TLSLD,
-
-/* This is a 32 bit reloc that stores the Module ID to GOT(n). */
- BFD_RELOC_MICROBLAZE_32_TLSDTPMOD,
-
-/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */
- BFD_RELOC_MICROBLAZE_32_TLSDTPREL,
-
-/* This is a 32 bit reloc for storing TLS offset to two words (uses imm
-instruction) */
- BFD_RELOC_MICROBLAZE_64_TLSDTPREL,
-
-/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
-to two words (uses imm instruction). */
- BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL,
-
-/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
-to two words (uses imm instruction). */
- BFD_RELOC_MICROBLAZE_64_TLSTPREL,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-PC-relative offset from start of TEXT. */
- BFD_RELOC_MICROBLAZE_64_TEXTPCREL,
-
-/* This is a 64 bit reloc that stores the 32 bit offset
-value in two words (with an imm instruction). The relocation is
-relative offset from start of TEXT. */
- BFD_RELOC_MICROBLAZE_64_TEXTREL,
-
-/* AArch64 pseudo relocation code to mark the start of the AArch64
-relocation enumerators. N.B. the order of the enumerators is
-important as several tables in the AArch64 bfd backend are indexed
-by these enumerators; make sure they are all synced. */
- BFD_RELOC_AARCH64_RELOC_START,
-
-/* Deprecated AArch64 null relocation code. */
- BFD_RELOC_AARCH64_NULL,
-
-/* AArch64 null relocation code. */
- BFD_RELOC_AARCH64_NONE,
-
-/* Basic absolute relocations of N bits. These are equivalent to
-BFD_RELOC_N and they were added to assist the indexing of the howto
-table. */
- BFD_RELOC_AARCH64_64,
- BFD_RELOC_AARCH64_32,
- BFD_RELOC_AARCH64_16,
-
-/* PC-relative relocations. These are equivalent to BFD_RELOC_N_PCREL
-and they were added to assist the indexing of the howto table. */
- BFD_RELOC_AARCH64_64_PCREL,
- BFD_RELOC_AARCH64_32_PCREL,
- BFD_RELOC_AARCH64_16_PCREL,
-
-/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15
-of an unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G0,
-
-/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of
-an address/value. No overflow checking. */
- BFD_RELOC_AARCH64_MOVW_G0_NC,
-
-/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31
-of an unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G1,
-
-/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31
-of an address/value. No overflow checking. */
- BFD_RELOC_AARCH64_MOVW_G1_NC,
-
-/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47
-of an unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G2,
-
-/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47
-of an address/value. No overflow checking. */
- BFD_RELOC_AARCH64_MOVW_G2_NC,
-
-/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64
-of a signed or unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G3,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_G0_S,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 16 to 31
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_G1_S,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 32 to 47
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_G2_S,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_PREL_G0,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
-
-/* AArch64 MOVK instruction with most significant bits 16 to 31
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G1,
-
-/* AArch64 MOVK instruction with most significant bits 16 to 31
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
-
-/* AArch64 MOVK instruction with most significant bits 32 to 47
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G2,
-
-/* AArch64 MOVK instruction with most significant bits 32 to 47
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
-
-/* AArch64 MOVK instruction with most significant bits 47 to 63
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G3,
-
-/* AArch64 Load Literal instruction, holding a 19 bit pc-relative word
-offset. The lowest two bits must be zero and are not stored in the
-instruction, giving a 21 bit signed byte offset. */
- BFD_RELOC_AARCH64_LD_LO19_PCREL,
-
-/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */
- BFD_RELOC_AARCH64_ADR_LO21_PCREL,
-
-/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
-offset, giving a 4KB aligned page base address. */
- BFD_RELOC_AARCH64_ADR_HI21_PCREL,
-
-/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
-offset, giving a 4KB aligned page base address, but with no overflow
-checking. */
- BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL,
-
-/* AArch64 ADD immediate instruction, holding bits 0 to 11 of the address.
-Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_ADD_LO12,
-
-/* AArch64 8-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST8_LO12,
-
-/* AArch64 14 bit pc-relative test bit and branch.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 16 bit signed byte offset. */
- BFD_RELOC_AARCH64_TSTBR14,
-
-/* AArch64 19 bit pc-relative conditional branch and compare & branch.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 21 bit signed byte offset. */
- BFD_RELOC_AARCH64_BRANCH19,
-
-/* AArch64 26 bit pc-relative unconditional branch.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 28 bit signed byte offset. */
- BFD_RELOC_AARCH64_JUMP26,
-
-/* AArch64 26 bit pc-relative unconditional branch and link.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 28 bit signed byte offset. */
- BFD_RELOC_AARCH64_CALL26,
-
-/* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST16_LO12,
-
-/* AArch64 32-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST32_LO12,
-
-/* AArch64 64-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST64_LO12,
-
-/* AArch64 128-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST128_LO12,
-
-/* AArch64 Load Literal instruction, holding a 19 bit PC relative word
-offset of the global offset table entry for a symbol. The lowest two
-bits must be zero and are not stored in the instruction, giving a 21
-bit signed byte offset. This relocation type requires signed overflow
-checking. */
- BFD_RELOC_AARCH64_GOT_LD_PREL19,
-
-/* Get to the page base of the global offset table entry for a symbol as
-part of an ADRP instruction using a 21 bit PC relative value.Used in
-conjunction with BFD_RELOC_AARCH64_LD64_GOT_LO12_NC. */
- BFD_RELOC_AARCH64_ADR_GOT_PAGE,
-
-/* Unsigned 12 bit byte offset for 64 bit load/store from the page of
-the GOT entry for this symbol. Used in conjunction with
-BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_LD64_GOT_LO12_NC,
-
-/* Unsigned 12 bit byte offset for 32 bit load/store from the page of
-the GOT entry for this symbol. Used in conjunction with
-BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in ILP32 ABI only. */
- BFD_RELOC_AARCH64_LD32_GOT_LO12_NC,
-
-/* Unsigned 16 bit byte offset for 64 bit load/store from the GOT entry
-for this symbol. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
-
-/* Unsigned 16 bit byte higher offset for 64 bit load/store from the GOT entry
-for this symbol. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_MOVW_GOTOFF_G1,
-
-/* Unsigned 15 bit byte offset for 64 bit load/store from the page of
-the GOT entry for this symbol. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_LD64_GOTOFF_LO15,
-
-/* Scaled 14 bit byte offset to the page base of the global offset table. */
- BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14,
-
-/* Scaled 15 bit byte offset to the page base of the global offset table. */
- BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15,
-
-/* Get to the page base of the global offset table entry for a symbols
-tls_index structure as part of an adrp instruction using a 21 bit PC
-relative value. Used in conjunction with
-BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */
- BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21,
-
-/* AArch64 TLS General Dynamic */
- BFD_RELOC_AARCH64_TLSGD_ADR_PREL21,
-
-/* Unsigned 12 bit byte offset to global offset table entry for a symbols
-tls_index structure. Used in conjunction with
-BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21. */
- BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC,
-
-/* AArch64 TLS General Dynamic relocation. */
- BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC,
-
-/* AArch64 TLS General Dynamic relocation. */
- BFD_RELOC_AARCH64_TLSGD_MOVW_G1,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1,
-
-/* bit[23:12] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
-
-/* Unsigned 12 bit byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12,
-
-/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */
- BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC,
-
-/* Unsigned 12 bit byte offset to global offset table entry for a symbols
-tls_index structure. Used in conjunction with
-BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21. */
- BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC,
-
-/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP
-instruction. */
- BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21,
-
-/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */
- BFD_RELOC_AARCH64_TLSLD_ADR_PREL21,
-
-/* bit[11:1] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
-
-/* bit[11:2] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
-
-/* bit[11:3] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
-
-/* bit[11:0] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
-
-/* bit[15:0] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
-
-/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
-
-/* bit[31:16] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
-
-/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
-
-/* bit[47:32] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC,
-
-/* bit[11:1] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
-
-/* bit[11:2] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
-
-/* bit[11:3] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
-
-/* bit[11:0] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LD_PREL19,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LD64_LO12,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADD_LO12,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_OFF_G1,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LDR,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADD,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_CALL,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_COPY,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_GLOB_DAT,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_JUMP_SLOT,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_RELATIVE,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLS_DTPMOD,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLS_DTPREL,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLS_TPREL,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLSDESC,
-
-/* AArch64 support for STT_GNU_IFUNC. */
- BFD_RELOC_AARCH64_IRELATIVE,
-
-/* AArch64 pseudo relocation code to mark the end of the AArch64
-relocation enumerators that have direct mapping to ELF reloc codes.
-There are a few more enumerators after this one; those are mainly
-used by the AArch64 assembler for the internal fixup or to select
-one of the above enumerators. */
- BFD_RELOC_AARCH64_RELOC_END,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP,
-
-/* AArch64 unspecified load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST_LO12,
-
-/* AArch64 pseudo relocation code for TLS local dynamic mode. It's to be
-used internally by the AArch64 assembler and not (currently) written to
-any object files. */
- BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC,
-
-/* AArch64 pseudo relocation code for TLS local exec mode. It's to be
-used internally by the AArch64 assembler and not (currently) written to
-any object files. */
- BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_LD_GOT_LO12_NC,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC,
-
-/* Tilera TILEPro Relocations. */
- BFD_RELOC_TILEPRO_COPY,
- BFD_RELOC_TILEPRO_GLOB_DAT,
- BFD_RELOC_TILEPRO_JMP_SLOT,
- BFD_RELOC_TILEPRO_RELATIVE,
- BFD_RELOC_TILEPRO_BROFF_X1,
- BFD_RELOC_TILEPRO_JOFFLONG_X1,
- BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT,
- BFD_RELOC_TILEPRO_IMM8_X0,
- BFD_RELOC_TILEPRO_IMM8_Y0,
- BFD_RELOC_TILEPRO_IMM8_X1,
- BFD_RELOC_TILEPRO_IMM8_Y1,
- BFD_RELOC_TILEPRO_DEST_IMM8_X1,
- BFD_RELOC_TILEPRO_MT_IMM15_X1,
- BFD_RELOC_TILEPRO_MF_IMM15_X1,
- BFD_RELOC_TILEPRO_IMM16_X0,
- BFD_RELOC_TILEPRO_IMM16_X1,
- BFD_RELOC_TILEPRO_IMM16_X0_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_HA,
- BFD_RELOC_TILEPRO_IMM16_X0_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA,
- BFD_RELOC_TILEPRO_MMSTART_X0,
- BFD_RELOC_TILEPRO_MMEND_X0,
- BFD_RELOC_TILEPRO_MMSTART_X1,
- BFD_RELOC_TILEPRO_MMEND_X1,
- BFD_RELOC_TILEPRO_SHAMT_X0,
- BFD_RELOC_TILEPRO_SHAMT_X1,
- BFD_RELOC_TILEPRO_SHAMT_Y0,
- BFD_RELOC_TILEPRO_SHAMT_Y1,
- BFD_RELOC_TILEPRO_TLS_GD_CALL,
- BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_TLS_IE_LOAD,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA,
- BFD_RELOC_TILEPRO_TLS_DTPMOD32,
- BFD_RELOC_TILEPRO_TLS_DTPOFF32,
- BFD_RELOC_TILEPRO_TLS_TPOFF32,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
-
-/* Tilera TILE-Gx Relocations. */
- BFD_RELOC_TILEGX_HW0,
- BFD_RELOC_TILEGX_HW1,
- BFD_RELOC_TILEGX_HW2,
- BFD_RELOC_TILEGX_HW3,
- BFD_RELOC_TILEGX_HW0_LAST,
- BFD_RELOC_TILEGX_HW1_LAST,
- BFD_RELOC_TILEGX_HW2_LAST,
- BFD_RELOC_TILEGX_COPY,
- BFD_RELOC_TILEGX_GLOB_DAT,
- BFD_RELOC_TILEGX_JMP_SLOT,
- BFD_RELOC_TILEGX_RELATIVE,
- BFD_RELOC_TILEGX_BROFF_X1,
- BFD_RELOC_TILEGX_JUMPOFF_X1,
- BFD_RELOC_TILEGX_JUMPOFF_X1_PLT,
- BFD_RELOC_TILEGX_IMM8_X0,
- BFD_RELOC_TILEGX_IMM8_Y0,
- BFD_RELOC_TILEGX_IMM8_X1,
- BFD_RELOC_TILEGX_IMM8_Y1,
- BFD_RELOC_TILEGX_DEST_IMM8_X1,
- BFD_RELOC_TILEGX_MT_IMM14_X1,
- BFD_RELOC_TILEGX_MF_IMM14_X1,
- BFD_RELOC_TILEGX_MMSTART_X0,
- BFD_RELOC_TILEGX_MMEND_X0,
- BFD_RELOC_TILEGX_SHAMT_X0,
- BFD_RELOC_TILEGX_SHAMT_X1,
- BFD_RELOC_TILEGX_SHAMT_Y0,
- BFD_RELOC_TILEGX_SHAMT_Y1,
- BFD_RELOC_TILEGX_IMM16_X0_HW0,
- BFD_RELOC_TILEGX_IMM16_X1_HW0,
- BFD_RELOC_TILEGX_IMM16_X0_HW1,
- BFD_RELOC_TILEGX_IMM16_X1_HW1,
- BFD_RELOC_TILEGX_IMM16_X0_HW2,
- BFD_RELOC_TILEGX_IMM16_X1_HW2,
- BFD_RELOC_TILEGX_IMM16_X0_HW3,
- BFD_RELOC_TILEGX_IMM16_X1_HW3,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE,
- BFD_RELOC_TILEGX_TLS_DTPMOD64,
- BFD_RELOC_TILEGX_TLS_DTPOFF64,
- BFD_RELOC_TILEGX_TLS_TPOFF64,
- BFD_RELOC_TILEGX_TLS_DTPMOD32,
- BFD_RELOC_TILEGX_TLS_DTPOFF32,
- BFD_RELOC_TILEGX_TLS_TPOFF32,
- BFD_RELOC_TILEGX_TLS_GD_CALL,
- BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
- BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
- BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
- BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD,
- BFD_RELOC_TILEGX_TLS_IE_LOAD,
- BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
- BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
- BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD,
- BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD,
-
-/* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */
- BFD_RELOC_EPIPHANY_SIMM8,
-
-/* Adapteva EPIPHANY - 24 bit signed pc-relative displacement */
- BFD_RELOC_EPIPHANY_SIMM24,
-
-/* Adapteva EPIPHANY - 16 most-significant bits of absolute address */
- BFD_RELOC_EPIPHANY_HIGH,
-
-/* Adapteva EPIPHANY - 16 least-significant bits of absolute address */
- BFD_RELOC_EPIPHANY_LOW,
-
-/* Adapteva EPIPHANY - 11 bit signed number - add/sub immediate */
- BFD_RELOC_EPIPHANY_SIMM11,
-
-/* Adapteva EPIPHANY - 11 bit sign-magnitude number (ld/st displacement) */
- BFD_RELOC_EPIPHANY_IMM11,
-
-/* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */
- BFD_RELOC_EPIPHANY_IMM8,
-
-/* Visium Relocations. */
- BFD_RELOC_VISIUM_HI16,
- BFD_RELOC_VISIUM_LO16,
- BFD_RELOC_VISIUM_IM16,
- BFD_RELOC_VISIUM_REL16,
- BFD_RELOC_VISIUM_HI16_PCREL,
- BFD_RELOC_VISIUM_LO16_PCREL,
- BFD_RELOC_VISIUM_IM16_PCREL,
-
-/* WebAssembly relocations. */
- BFD_RELOC_WASM32_LEB128,
- BFD_RELOC_WASM32_LEB128_GOT,
- BFD_RELOC_WASM32_LEB128_GOT_CODE,
- BFD_RELOC_WASM32_LEB128_PLT,
- BFD_RELOC_WASM32_PLT_INDEX,
- BFD_RELOC_WASM32_ABS32_CODE,
- BFD_RELOC_WASM32_COPY,
- BFD_RELOC_WASM32_CODE_POINTER,
- BFD_RELOC_WASM32_INDEX,
- BFD_RELOC_WASM32_PLT_SIG,
-
-/* C-SKY relocations. */
- BFD_RELOC_CKCORE_NONE,
- BFD_RELOC_CKCORE_ADDR32,
- BFD_RELOC_CKCORE_PCREL_IMM8BY4,
- BFD_RELOC_CKCORE_PCREL_IMM11BY2,
- BFD_RELOC_CKCORE_PCREL_IMM4BY2,
- BFD_RELOC_CKCORE_PCREL32,
- BFD_RELOC_CKCORE_PCREL_JSR_IMM11BY2,
- BFD_RELOC_CKCORE_GNU_VTINHERIT,
- BFD_RELOC_CKCORE_GNU_VTENTRY,
- BFD_RELOC_CKCORE_RELATIVE,
- BFD_RELOC_CKCORE_COPY,
- BFD_RELOC_CKCORE_GLOB_DAT,
- BFD_RELOC_CKCORE_JUMP_SLOT,
- BFD_RELOC_CKCORE_GOTOFF,
- BFD_RELOC_CKCORE_GOTPC,
- BFD_RELOC_CKCORE_GOT32,
- BFD_RELOC_CKCORE_PLT32,
- BFD_RELOC_CKCORE_ADDRGOT,
- BFD_RELOC_CKCORE_ADDRPLT,
- BFD_RELOC_CKCORE_PCREL_IMM26BY2,
- BFD_RELOC_CKCORE_PCREL_IMM16BY2,
- BFD_RELOC_CKCORE_PCREL_IMM16BY4,
- BFD_RELOC_CKCORE_PCREL_IMM10BY2,
- BFD_RELOC_CKCORE_PCREL_IMM10BY4,
- BFD_RELOC_CKCORE_ADDR_HI16,
- BFD_RELOC_CKCORE_ADDR_LO16,
- BFD_RELOC_CKCORE_GOTPC_HI16,
- BFD_RELOC_CKCORE_GOTPC_LO16,
- BFD_RELOC_CKCORE_GOTOFF_HI16,
- BFD_RELOC_CKCORE_GOTOFF_LO16,
- BFD_RELOC_CKCORE_GOT12,
- BFD_RELOC_CKCORE_GOT_HI16,
- BFD_RELOC_CKCORE_GOT_LO16,
- BFD_RELOC_CKCORE_PLT12,
- BFD_RELOC_CKCORE_PLT_HI16,
- BFD_RELOC_CKCORE_PLT_LO16,
- BFD_RELOC_CKCORE_ADDRGOT_HI16,
- BFD_RELOC_CKCORE_ADDRGOT_LO16,
- BFD_RELOC_CKCORE_ADDRPLT_HI16,
- BFD_RELOC_CKCORE_ADDRPLT_LO16,
- BFD_RELOC_CKCORE_PCREL_JSR_IMM26BY2,
- BFD_RELOC_CKCORE_TOFFSET_LO16,
- BFD_RELOC_CKCORE_DOFFSET_LO16,
- BFD_RELOC_CKCORE_PCREL_IMM18BY2,
- BFD_RELOC_CKCORE_DOFFSET_IMM18,
- BFD_RELOC_CKCORE_DOFFSET_IMM18BY2,
- BFD_RELOC_CKCORE_DOFFSET_IMM18BY4,
- BFD_RELOC_CKCORE_GOTOFF_IMM18,
- BFD_RELOC_CKCORE_GOT_IMM18BY4,
- BFD_RELOC_CKCORE_PLT_IMM18BY4,
- BFD_RELOC_CKCORE_PCREL_IMM7BY4,
- BFD_RELOC_CKCORE_TLS_LE32,
- BFD_RELOC_CKCORE_TLS_IE32,
- BFD_RELOC_CKCORE_TLS_GD32,
- BFD_RELOC_CKCORE_TLS_LDM32,
- BFD_RELOC_CKCORE_TLS_LDO32,
- BFD_RELOC_CKCORE_TLS_DTPMOD32,
- BFD_RELOC_CKCORE_TLS_DTPOFF32,
- BFD_RELOC_CKCORE_TLS_TPOFF32,
- BFD_RELOC_CKCORE_PCREL_FLRW_IMM8BY4,
- BFD_RELOC_CKCORE_NOJSRI,
- BFD_RELOC_CKCORE_CALLGRAPH,
- BFD_RELOC_CKCORE_IRELATIVE,
- BFD_RELOC_CKCORE_PCREL_BLOOP_IMM4BY4,
- BFD_RELOC_CKCORE_PCREL_BLOOP_IMM12BY4,
-
-/* S12Z relocations. */
- BFD_RELOC_S12Z_OPR,
- BFD_RELOC_UNUSED };
-
-typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
-reloc_howto_type *bfd_reloc_type_lookup
- (bfd *abfd, bfd_reloc_code_real_type code);
-reloc_howto_type *bfd_reloc_name_lookup
- (bfd *abfd, const char *reloc_name);
-
-const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
-
-/* Extracted from syms.c. */
-
-typedef struct bfd_symbol
-{
- /* A pointer to the BFD which owns the symbol. This information
- is necessary so that a back end can work out what additional
- information (invisible to the application writer) is carried
- with the symbol.
-
- This field is *almost* redundant, since you can use section->owner
- instead, except that some symbols point to the global sections
- bfd_{abs,com,und}_section. This could be fixed by making
- these globals be per-bfd (or per-target-flavor). FIXME. */
- struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
-
- /* The text of the symbol. The name is left alone, and not copied; the
- application may not alter it. */
- const char *name;
-
- /* The value of the symbol. This really should be a union of a
- numeric value with a pointer, since some flags indicate that
- a pointer to another symbol is stored here. */
- symvalue value;
-
- /* Attributes of a symbol. */
-#define BSF_NO_FLAGS 0
-
- /* The symbol has local scope; <> in <>. The value
- is the offset into the section of the data. */
-#define BSF_LOCAL (1 << 0)
-
- /* The symbol has global scope; initialized data in <>. The
- value is the offset into the section of the data. */
-#define BSF_GLOBAL (1 << 1)
-
- /* The symbol has global scope and is exported. The value is
- the offset into the section of the data. */
-#define BSF_EXPORT BSF_GLOBAL /* No real difference. */
-
- /* A normal C symbol would be one of:
- <>, <> or <>. */
-
- /* The symbol is a debugging record. The value has an arbitrary
- meaning, unless BSF_DEBUGGING_RELOC is also set. */
-#define BSF_DEBUGGING (1 << 2)
-
- /* The symbol denotes a function entry point. Used in ELF,
- perhaps others someday. */
-#define BSF_FUNCTION (1 << 3)
-
- /* Used by the linker. */
-#define BSF_KEEP (1 << 5)
-
- /* An ELF common symbol. */
-#define BSF_ELF_COMMON (1 << 6)
-
- /* A weak global symbol, overridable without warnings by
- a regular global symbol of the same name. */
-#define BSF_WEAK (1 << 7)
-
- /* This symbol was created to point to a section, e.g. ELF's
- STT_SECTION symbols. */
-#define BSF_SECTION_SYM (1 << 8)
-
- /* The symbol used to be a common symbol, but now it is
- allocated. */
-#define BSF_OLD_COMMON (1 << 9)
-
- /* In some files the type of a symbol sometimes alters its
- location in an output file - ie in coff a <> symbol
- which is also <> symbol appears where it was
- declared and not at the end of a section. This bit is set
- by the target BFD part to convey this information. */
-#define BSF_NOT_AT_END (1 << 10)
-
- /* Signal that the symbol is the label of constructor section. */
-#define BSF_CONSTRUCTOR (1 << 11)
-
- /* Signal that the symbol is a warning symbol. The name is a
- warning. The name of the next symbol is the one to warn about;
- if a reference is made to a symbol with the same name as the next
- symbol, a warning is issued by the linker. */
-#define BSF_WARNING (1 << 12)
-
- /* Signal that the symbol is indirect. This symbol is an indirect
- pointer to the symbol with the same name as the next symbol. */
-#define BSF_INDIRECT (1 << 13)
-
- /* BSF_FILE marks symbols that contain a file name. This is used
- for ELF STT_FILE symbols. */
-#define BSF_FILE (1 << 14)
-
- /* Symbol is from dynamic linking information. */
-#define BSF_DYNAMIC (1 << 15)
-
- /* The symbol denotes a data object. Used in ELF, and perhaps
- others someday. */
-#define BSF_OBJECT (1 << 16)
-
- /* This symbol is a debugging symbol. The value is the offset
- into the section of the data. BSF_DEBUGGING should be set
- as well. */
-#define BSF_DEBUGGING_RELOC (1 << 17)
-
- /* This symbol is thread local. Used in ELF. */
-#define BSF_THREAD_LOCAL (1 << 18)
-
- /* This symbol represents a complex relocation expression,
- with the expression tree serialized in the symbol name. */
-#define BSF_RELC (1 << 19)
-
- /* This symbol represents a signed complex relocation expression,
- with the expression tree serialized in the symbol name. */
-#define BSF_SRELC (1 << 20)
-
- /* This symbol was created by bfd_get_synthetic_symtab. */
-#define BSF_SYNTHETIC (1 << 21)
-
- /* This symbol is an indirect code object. Unrelated to BSF_INDIRECT.
- The dynamic linker will compute the value of this symbol by
- calling the function that it points to. BSF_FUNCTION must
- also be also set. */
-#define BSF_GNU_INDIRECT_FUNCTION (1 << 22)
- /* This symbol is a globally unique data object. The dynamic linker
- will make sure that in the entire process there is just one symbol
- with this name and type in use. BSF_OBJECT must also be set. */
-#define BSF_GNU_UNIQUE (1 << 23)
-
- flagword flags;
-
- /* A pointer to the section to which this symbol is
- relative. This will always be non NULL, there are special
- sections for undefined and absolute symbols. */
- struct bfd_section *section;
-
- /* Back end special data. */
- union
- {
- void *p;
- bfd_vma i;
- }
- udata;
-}
-asymbol;
-
-#define bfd_get_symtab_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
-
-bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
-
-bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
-
-#define bfd_is_local_label_name(abfd, name) \
- BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
-
-bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
-
-#define bfd_is_target_special_symbol(abfd, sym) \
- BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
-
-#define bfd_canonicalize_symtab(abfd, location) \
- BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
-
-bfd_boolean bfd_set_symtab
- (bfd *abfd, asymbol **location, unsigned int count);
-
-void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
-
-#define bfd_make_empty_symbol(abfd) \
- BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
-
-asymbol *_bfd_generic_make_empty_symbol (bfd *);
-
-#define bfd_make_debug_symbol(abfd,ptr,size) \
- BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
-
-int bfd_decode_symclass (asymbol *symbol);
-
-bfd_boolean bfd_is_undefined_symclass (int symclass);
-
-void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
-
-bfd_boolean bfd_copy_private_symbol_data
- (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
-
-#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
- BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
- (ibfd, isymbol, obfd, osymbol))
-
-/* Extracted from bfd.c. */
-
-enum bfd_direction
- {
- no_direction = 0,
- read_direction = 1,
- write_direction = 2,
- both_direction = 3
- };
-
-enum bfd_plugin_format
- {
- bfd_plugin_unknown = 0,
- bfd_plugin_yes = 1,
- bfd_plugin_no = 2
- };
-
-struct bfd_build_id
- {
- bfd_size_type size;
- bfd_byte data[1];
- };
-
-struct bfd
-{
- /* The filename the application opened the BFD with. */
- const char *filename;
-
- /* A pointer to the target jump table. */
- const struct bfd_target *xvec;
-
- /* The IOSTREAM, and corresponding IO vector that provide access
- to the file backing the BFD. */
- void *iostream;
- const struct bfd_iovec *iovec;
-
- /* The caching routines use these to maintain a
- least-recently-used list of BFDs. */
- struct bfd *lru_prev, *lru_next;
-
- /* Track current file position (or current buffer offset for
- in-memory BFDs). When a file is closed by the caching routines,
- BFD retains state information on the file here. */
- ufile_ptr where;
-
- /* File modified time, if mtime_set is TRUE. */
- long mtime;
-
- /* A unique identifier of the BFD */
- unsigned int id;
-
- /* The format which belongs to the BFD. (object, core, etc.) */
- ENUM_BITFIELD (bfd_format) format : 3;
-
- /* The direction with which the BFD was opened. */
- ENUM_BITFIELD (bfd_direction) direction : 2;
-
- /* Format_specific flags. */
- flagword flags : 20;
-
- /* Values that may appear in the flags field of a BFD. These also
- appear in the object_flags field of the bfd_target structure, where
- they indicate the set of flags used by that backend (not all flags
- are meaningful for all object file formats) (FIXME: at the moment,
- the object_flags values have mostly just been copied from backend
- to another, and are not necessarily correct). */
-
-#define BFD_NO_FLAGS 0x0
-
- /* BFD contains relocation entries. */
-#define HAS_RELOC 0x1
-
- /* BFD is directly executable. */
-#define EXEC_P 0x2
-
- /* BFD has line number information (basically used for F_LNNO in a
- COFF header). */
-#define HAS_LINENO 0x4
-
- /* BFD has debugging information. */
-#define HAS_DEBUG 0x08
-
- /* BFD has symbols. */
-#define HAS_SYMS 0x10
-
- /* BFD has local symbols (basically used for F_LSYMS in a COFF
- header). */
-#define HAS_LOCALS 0x20
-
- /* BFD is a dynamic object. */
-#define DYNAMIC 0x40
-
- /* Text section is write protected (if D_PAGED is not set, this is
- like an a.out NMAGIC file) (the linker sets this by default, but
- clears it for -r or -N). */
-#define WP_TEXT 0x80
-
- /* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the
- linker sets this by default, but clears it for -r or -n or -N). */
-#define D_PAGED 0x100
-
- /* BFD is relaxable (this means that bfd_relax_section may be able to
- do something) (sometimes bfd_relax_section can do something even if
- this is not set). */
-#define BFD_IS_RELAXABLE 0x200
-
- /* This may be set before writing out a BFD to request using a
- traditional format. For example, this is used to request that when
- writing out an a.out object the symbols not be hashed to eliminate
- duplicates. */
-#define BFD_TRADITIONAL_FORMAT 0x400
-
- /* This flag indicates that the BFD contents are actually cached
- in memory. If this is set, iostream points to a bfd_in_memory
- struct. */
-#define BFD_IN_MEMORY 0x800
-
- /* This BFD has been created by the linker and doesn't correspond
- to any input file. */
-#define BFD_LINKER_CREATED 0x1000
-
- /* This may be set before writing out a BFD to request that it
- be written using values for UIDs, GIDs, timestamps, etc. that
- will be consistent from run to run. */
-#define BFD_DETERMINISTIC_OUTPUT 0x2000
-
- /* Compress sections in this BFD. */
-#define BFD_COMPRESS 0x4000
-
- /* Decompress sections in this BFD. */
-#define BFD_DECOMPRESS 0x8000
-
- /* BFD is a dummy, for plugins. */
-#define BFD_PLUGIN 0x10000
-
- /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */
-#define BFD_COMPRESS_GABI 0x20000
-
- /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this
- BFD. */
-#define BFD_CONVERT_ELF_COMMON 0x40000
-
- /* Use the ELF STT_COMMON type in this BFD. */
-#define BFD_USE_ELF_STT_COMMON 0x80000
-
- /* Flags bits to be saved in bfd_preserve_save. */
-#define BFD_FLAGS_SAVED \
- (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
- | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \
- | BFD_USE_ELF_STT_COMMON)
-
- /* Flags bits which are for BFD use only. */
-#define BFD_FLAGS_FOR_BFD_USE_MASK \
- (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
- | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \
- | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON)
-
- /* Is the file descriptor being cached? That is, can it be closed as
- needed, and re-opened when accessed later? */
- unsigned int cacheable : 1;
-
- /* Marks whether there was a default target specified when the
- BFD was opened. This is used to select which matching algorithm
- to use to choose the back end. */
- unsigned int target_defaulted : 1;
-
- /* ... and here: (``once'' means at least once). */
- unsigned int opened_once : 1;
-
- /* Set if we have a locally maintained mtime value, rather than
- getting it from the file each time. */
- unsigned int mtime_set : 1;
-
- /* Flag set if symbols from this BFD should not be exported. */
- unsigned int no_export : 1;
-
- /* Remember when output has begun, to stop strange things
- from happening. */
- unsigned int output_has_begun : 1;
-
- /* Have archive map. */
- unsigned int has_armap : 1;
-
- /* Set if this is a thin archive. */
- unsigned int is_thin_archive : 1;
-
- /* Set if only required symbols should be added in the link hash table for
- this object. Used by VMS linkers. */
- unsigned int selective_search : 1;
-
- /* Set if this is the linker output BFD. */
- unsigned int is_linker_output : 1;
-
- /* Set if this is the linker input BFD. */
- unsigned int is_linker_input : 1;
-
- /* If this is an input for a compiler plug-in library. */
- ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2;
-
- /* Set if this is a plugin output file. */
- unsigned int lto_output : 1;
-
- /* Set to dummy BFD created when claimed by a compiler plug-in
- library. */
- bfd *plugin_dummy_bfd;
-
- /* Currently my_archive is tested before adding origin to
- anything. I believe that this can become always an add of
- origin, with origin set to 0 for non archive files. */
- ufile_ptr origin;
-
- /* The origin in the archive of the proxy entry. This will
- normally be the same as origin, except for thin archives,
- when it will contain the current offset of the proxy in the
- thin archive rather than the offset of the bfd in its actual
- container. */
- ufile_ptr proxy_origin;
-
- /* A hash table for section names. */
- struct bfd_hash_table section_htab;
-
- /* Pointer to linked list of sections. */
- struct bfd_section *sections;
-
- /* The last section on the section list. */
- struct bfd_section *section_last;
-
- /* The number of sections. */
- unsigned int section_count;
-
- /* A field used by _bfd_generic_link_add_archive_symbols. This will
- be used only for archive elements. */
- int archive_pass;
-
- /* Stuff only useful for object files:
- The start address. */
- bfd_vma start_address;
-
- /* Symbol table for output BFD (with symcount entries).
- Also used by the linker to cache input BFD symbols. */
- struct bfd_symbol **outsymbols;
-
- /* Used for input and output. */
- unsigned int symcount;
-
- /* Used for slurped dynamic symbol tables. */
- unsigned int dynsymcount;
-
- /* Pointer to structure which contains architecture information. */
- const struct bfd_arch_info *arch_info;
-
- /* Stuff only useful for archives. */
- void *arelt_data;
- struct bfd *my_archive; /* The containing archive BFD. */
- struct bfd *archive_next; /* The next BFD in the archive. */
- struct bfd *archive_head; /* The first BFD in the archive. */
- struct bfd *nested_archives; /* List of nested archive in a flattened
- thin archive. */
-
- union {
- /* For input BFDs, a chain of BFDs involved in a link. */
- struct bfd *next;
- /* For output BFD, the linker hash table. */
- struct bfd_link_hash_table *hash;
- } link;
-
- /* Used by the back end to hold private data. */
- union
- {
- struct aout_data_struct *aout_data;
- struct artdata *aout_ar_data;
- struct coff_tdata *coff_obj_data;
- struct pe_tdata *pe_obj_data;
- struct xcoff_tdata *xcoff_obj_data;
- struct ecoff_tdata *ecoff_obj_data;
- struct srec_data_struct *srec_data;
- struct verilog_data_struct *verilog_data;
- struct ihex_data_struct *ihex_data;
- struct tekhex_data_struct *tekhex_data;
- struct elf_obj_tdata *elf_obj_data;
- struct mmo_data_struct *mmo_data;
- struct sun_core_struct *sun_core_data;
- struct sco5_core_struct *sco5_core_data;
- struct trad_core_struct *trad_core_data;
- struct som_data_struct *som_data;
- struct hpux_core_struct *hpux_core_data;
- struct hppabsd_core_struct *hppabsd_core_data;
- struct sgi_core_struct *sgi_core_data;
- struct lynx_core_struct *lynx_core_data;
- struct osf_core_struct *osf_core_data;
- struct cisco_core_struct *cisco_core_data;
- struct versados_data_struct *versados_data;
- struct netbsd_core_struct *netbsd_core_data;
- struct mach_o_data_struct *mach_o_data;
- struct mach_o_fat_data_struct *mach_o_fat_data;
- struct plugin_data_struct *plugin_data;
- struct bfd_pef_data_struct *pef_data;
- struct bfd_pef_xlib_data_struct *pef_xlib_data;
- struct bfd_sym_data_struct *sym_data;
- void *any;
- }
- tdata;
-
- /* Used by the application to hold private data. */
- void *usrdata;
-
- /* Where all the allocated stuff under this BFD goes. This is a
- struct objalloc *, but we use void * to avoid requiring the inclusion
- of objalloc.h. */
- void *memory;
-
- /* For input BFDs, the build ID, if the object has one. */
- const struct bfd_build_id *build_id;
-};
-
-/* See note beside bfd_set_section_userdata. */
-static inline bfd_boolean
-bfd_set_cacheable (bfd * abfd, bfd_boolean val)
-{
- abfd->cacheable = val;
- return TRUE;
-}
-
-
-typedef enum bfd_error
-{
- bfd_error_no_error = 0,
- bfd_error_system_call,
- bfd_error_invalid_target,
- bfd_error_wrong_format,
- bfd_error_wrong_object_format,
- bfd_error_invalid_operation,
- bfd_error_no_memory,
- bfd_error_no_symbols,
- bfd_error_no_armap,
- bfd_error_no_more_archived_files,
- bfd_error_malformed_archive,
- bfd_error_missing_dso,
- bfd_error_file_not_recognized,
- bfd_error_file_ambiguously_recognized,
- bfd_error_no_contents,
- bfd_error_nonrepresentable_section,
- bfd_error_no_debug_section,
- bfd_error_bad_value,
- bfd_error_file_truncated,
- bfd_error_file_too_big,
- bfd_error_on_input,
- bfd_error_invalid_error_code
-}
-bfd_error_type;
-
-bfd_error_type bfd_get_error (void);
-
-void bfd_set_error (bfd_error_type error_tag);
-
-void bfd_set_input_error (bfd *input, bfd_error_type error_tag);
-
-const char *bfd_errmsg (bfd_error_type error_tag);
-
-void bfd_perror (const char *message);
-
-
-typedef void (*bfd_error_handler_type) (const char *, va_list);
-
-void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1;
-
-bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
-
-void bfd_set_error_program_name (const char *);
-
-
-typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg,
- const char *bfd_version,
- const char *bfd_file,
- int bfd_line);
-
-bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type);
-
-long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
-
-long bfd_canonicalize_reloc
- (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
-
-void bfd_set_reloc
- (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
-
-#define bfd_set_reloc(abfd, asect, location, count) \
- BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count))
-bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
-
-int bfd_get_arch_size (bfd *abfd);
-
-int bfd_get_sign_extend_vma (bfd *abfd);
-
-bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
-
-unsigned int bfd_get_gp_size (bfd *abfd);
-
-void bfd_set_gp_size (bfd *abfd, unsigned int i);
-
-bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
-
-bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
-
-#define bfd_copy_private_header_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_copy_private_header_data, \
- (ibfd, obfd))
-bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
-
-#define bfd_copy_private_bfd_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
- (ibfd, obfd))
-bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
-
-#define bfd_set_private_flags(abfd, flags) \
- BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
-#define bfd_sizeof_headers(abfd, info) \
- BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info))
-
-#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
- BFD_SEND (abfd, _bfd_find_nearest_line, \
- (abfd, syms, sec, off, file, func, line, NULL))
-
-#define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \
- line, disc) \
- BFD_SEND (abfd, _bfd_find_nearest_line, \
- (abfd, syms, sec, off, file, func, line, disc))
-
-#define bfd_find_line(abfd, syms, sym, file, line) \
- BFD_SEND (abfd, _bfd_find_line, \
- (abfd, syms, sym, file, line))
-
-#define bfd_find_inliner_info(abfd, file, func, line) \
- BFD_SEND (abfd, _bfd_find_inliner_info, \
- (abfd, file, func, line))
-
-#define bfd_debug_info_start(abfd) \
- BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
-
-#define bfd_debug_info_end(abfd) \
- BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
-
-#define bfd_debug_info_accumulate(abfd, section) \
- BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
-
-#define bfd_stat_arch_elt(abfd, stat) \
- BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
-
-#define bfd_update_armap_timestamp(abfd) \
- BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
-
-#define bfd_set_arch_mach(abfd, arch, mach)\
- BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
-
-#define bfd_relax_section(abfd, section, link_info, again) \
- BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
-
-#define bfd_gc_sections(abfd, link_info) \
- BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
-
-#define bfd_lookup_section_flags(link_info, flag_info, section) \
- BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info, section))
-
-#define bfd_merge_sections(abfd, link_info) \
- BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
-
-#define bfd_is_group_section(abfd, sec) \
- BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
-
-#define bfd_discard_group(abfd, sec) \
- BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
-
-#define bfd_link_hash_table_create(abfd) \
- BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
-
-#define bfd_link_add_symbols(abfd, info) \
- BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
-
-#define bfd_link_just_syms(abfd, sec, info) \
- BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
-
-#define bfd_final_link(abfd, info) \
- BFD_SEND (abfd, _bfd_final_link, (abfd, info))
-
-#define bfd_free_cached_info(abfd) \
- BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
-
-#define bfd_get_dynamic_symtab_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
-
-#define bfd_print_private_bfd_data(abfd, file)\
- BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
-
-#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
- BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
-
-#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
- BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
- dyncount, dynsyms, ret))
-
-#define bfd_get_dynamic_reloc_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
-
-#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
- BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
-
-extern bfd_byte *bfd_get_relocated_section_contents
- (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
- bfd_boolean, asymbol **);
-
-bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
-
-bfd_vma bfd_emul_get_maxpagesize (const char *);
-
-void bfd_emul_set_maxpagesize (const char *, bfd_vma);
-
-bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean);
-
-void bfd_emul_set_commonpagesize (const char *, bfd_vma);
-
-char *bfd_demangle (bfd *, const char *, int);
-
-void bfd_update_compression_header
- (bfd *abfd, bfd_byte *contents, asection *sec);
-
-bfd_boolean bfd_check_compression_header
- (bfd *abfd, bfd_byte *contents, asection *sec,
- bfd_size_type *uncompressed_size,
- unsigned int *uncompressed_alignment_power);
-
-int bfd_get_compression_header_size (bfd *abfd, asection *sec);
-
-bfd_size_type bfd_convert_section_size
- (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size);
-
-bfd_boolean bfd_convert_section_contents
- (bfd *ibfd, asection *isec, bfd *obfd,
- bfd_byte **ptr, bfd_size_type *ptr_size);
-
-/* Extracted from archive.c. */
-symindex bfd_get_next_mapent
- (bfd *abfd, symindex previous, carsym **sym);
-
-bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
-
-bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
-
-/* Extracted from corefile.c. */
-const char *bfd_core_file_failing_command (bfd *abfd);
-
-int bfd_core_file_failing_signal (bfd *abfd);
-
-int bfd_core_file_pid (bfd *abfd);
-
-bfd_boolean core_file_matches_executable_p
- (bfd *core_bfd, bfd *exec_bfd);
-
-bfd_boolean generic_core_file_matches_executable_p
- (bfd *core_bfd, bfd *exec_bfd);
-
-/* Extracted from targets.c. */
-#define BFD_SEND(bfd, message, arglist) \
- ((*((bfd)->xvec->message)) arglist)
-
-#ifdef DEBUG_BFD_SEND
-#undef BFD_SEND
-#define BFD_SEND(bfd, message, arglist) \
- (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
- ((*((bfd)->xvec->message)) arglist) : \
- (bfd_assert (__FILE__,__LINE__), NULL))
-#endif
-#define BFD_SEND_FMT(bfd, message, arglist) \
- (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
-
-#ifdef DEBUG_BFD_SEND
-#undef BFD_SEND_FMT
-#define BFD_SEND_FMT(bfd, message, arglist) \
- (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
- (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
- (bfd_assert (__FILE__,__LINE__), NULL))
-#endif
-
-enum bfd_flavour
-{
- /* N.B. Update bfd_flavour_name if you change this. */
- bfd_target_unknown_flavour,
- bfd_target_aout_flavour,
- bfd_target_coff_flavour,
- bfd_target_ecoff_flavour,
- bfd_target_xcoff_flavour,
- bfd_target_elf_flavour,
- bfd_target_tekhex_flavour,
- bfd_target_srec_flavour,
- bfd_target_verilog_flavour,
- bfd_target_ihex_flavour,
- bfd_target_som_flavour,
- bfd_target_os9k_flavour,
- bfd_target_versados_flavour,
- bfd_target_msdos_flavour,
- bfd_target_ovax_flavour,
- bfd_target_evax_flavour,
- bfd_target_mmo_flavour,
- bfd_target_mach_o_flavour,
- bfd_target_pef_flavour,
- bfd_target_pef_xlib_flavour,
- bfd_target_sym_flavour
-};
-
-enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
-
-/* Forward declaration. */
-typedef struct bfd_link_info _bfd_link_info;
-
-/* Forward declaration. */
-typedef struct flag_info flag_info;
-
-typedef struct bfd_target
-{
- /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */
- char *name;
-
- /* The "flavour" of a back end is a general indication about
- the contents of a file. */
- enum bfd_flavour flavour;
-
- /* The order of bytes within the data area of a file. */
- enum bfd_endian byteorder;
-
- /* The order of bytes within the header parts of a file. */
- enum bfd_endian header_byteorder;
-
- /* A mask of all the flags which an executable may have set -
- from the set <>, <>, ...<>. */
- flagword object_flags;
-
- /* A mask of all the flags which a section may have set - from
- the set <>, <>, ...<>. */
- flagword section_flags;
-
- /* The character normally found at the front of a symbol.
- (if any), perhaps `_'. */
- char symbol_leading_char;
-
- /* The pad character for file names within an archive header. */
- char ar_pad_char;
-
- /* The maximum number of characters in an archive header. */
- unsigned char ar_max_namelen;
-
- /* How well this target matches, used to select between various
- possible targets when more than one target matches. */
- unsigned char match_priority;
-
- /* Entries for byte swapping for data. These are different from the
- other entry points, since they don't take a BFD as the first argument.
- Certain other handlers could do the same. */
- bfd_uint64_t (*bfd_getx64) (const void *);
- bfd_int64_t (*bfd_getx_signed_64) (const void *);
- void (*bfd_putx64) (bfd_uint64_t, void *);
- bfd_vma (*bfd_getx32) (const void *);
- bfd_signed_vma (*bfd_getx_signed_32) (const void *);
- void (*bfd_putx32) (bfd_vma, void *);
- bfd_vma (*bfd_getx16) (const void *);
- bfd_signed_vma (*bfd_getx_signed_16) (const void *);
- void (*bfd_putx16) (bfd_vma, void *);
-
- /* Byte swapping for the headers. */
- bfd_uint64_t (*bfd_h_getx64) (const void *);
- bfd_int64_t (*bfd_h_getx_signed_64) (const void *);
- void (*bfd_h_putx64) (bfd_uint64_t, void *);
- bfd_vma (*bfd_h_getx32) (const void *);
- bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
- void (*bfd_h_putx32) (bfd_vma, void *);
- bfd_vma (*bfd_h_getx16) (const void *);
- bfd_signed_vma (*bfd_h_getx_signed_16) (const void *);
- void (*bfd_h_putx16) (bfd_vma, void *);
-
- /* Format dependent routines: these are vectors of entry points
- within the target vector structure, one for each format to check. */
-
- /* Check the format of a file being read. Return a <> or zero. */
- const struct bfd_target *
- (*_bfd_check_format[bfd_type_end]) (bfd *);
-
- /* Set the format of a file being written. */
- bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
-
- /* Write cached information into a file being written, at <>. */
- bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
-
-
- /* Generic entry points. */
-#define BFD_JUMP_TABLE_GENERIC(NAME) \
- NAME##_close_and_cleanup, \
- NAME##_bfd_free_cached_info, \
- NAME##_new_section_hook, \
- NAME##_get_section_contents, \
- NAME##_get_section_contents_in_window
-
- /* Called when the BFD is being closed to do any necessary cleanup. */
- bfd_boolean (*_close_and_cleanup) (bfd *);
- /* Ask the BFD to free all cached information. */
- bfd_boolean (*_bfd_free_cached_info) (bfd *);
- /* Called when a new section is created. */
- bfd_boolean (*_new_section_hook) (bfd *, sec_ptr);
- /* Read the contents of a section. */
- bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr,
- bfd_size_type);
- bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr,
- bfd_window *, file_ptr,
- bfd_size_type);
-
- /* Entry points to copy private data. */
-#define BFD_JUMP_TABLE_COPY(NAME) \
- NAME##_bfd_copy_private_bfd_data, \
- NAME##_bfd_merge_private_bfd_data, \
- _bfd_generic_init_private_section_data, \
- NAME##_bfd_copy_private_section_data, \
- NAME##_bfd_copy_private_symbol_data, \
- NAME##_bfd_copy_private_header_data, \
- NAME##_bfd_set_private_flags, \
- NAME##_bfd_print_private_bfd_data
-
- /* Called to copy BFD general private data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
- /* Called to merge BFD general private data from one object file
- to a common output file when linking. */
- bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *);
- /* Called to initialize BFD private section data from one object file
- to another. */
-#define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
- BFD_SEND (obfd, _bfd_init_private_section_data, \
- (ibfd, isec, obfd, osec, link_info))
- bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *,
- sec_ptr,
- struct bfd_link_info *);
- /* Called to copy BFD private section data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *,
- sec_ptr);
- /* Called to copy BFD private symbol data from one symbol
- to another. */
- bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *,
- asymbol *);
- /* Called to copy BFD private header data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *);
- /* Called to set private backend flags. */
- bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
-
- /* Called to print private BFD data. */
- bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *);
-
- /* Core file entry points. */
-#define BFD_JUMP_TABLE_CORE(NAME) \
- NAME##_core_file_failing_command, \
- NAME##_core_file_failing_signal, \
- NAME##_core_file_matches_executable_p, \
- NAME##_core_file_pid
-
- char * (*_core_file_failing_command) (bfd *);
- int (*_core_file_failing_signal) (bfd *);
- bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *);
- int (*_core_file_pid) (bfd *);
-
- /* Archive entry points. */
-#define BFD_JUMP_TABLE_ARCHIVE(NAME) \
- NAME##_slurp_armap, \
- NAME##_slurp_extended_name_table, \
- NAME##_construct_extended_name_table, \
- NAME##_truncate_arname, \
- NAME##_write_armap, \
- NAME##_read_ar_hdr, \
- NAME##_write_ar_hdr, \
- NAME##_openr_next_archived_file, \
- NAME##_get_elt_at_index, \
- NAME##_generic_stat_arch_elt, \
- NAME##_update_armap_timestamp
-
- bfd_boolean (*_bfd_slurp_armap) (bfd *);
- bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *);
- bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **,
- bfd_size_type *,
- const char **);
- void (*_bfd_truncate_arname) (bfd *, const char *, char *);
- bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *,
- unsigned int, int);
- void * (*_bfd_read_ar_hdr_fn) (bfd *);
- bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *);
- bfd * (*openr_next_archived_file) (bfd *, bfd *);
-#define bfd_get_elt_at_index(b,i) \
- BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
- bfd * (*_bfd_get_elt_at_index) (bfd *, symindex);
- int (*_bfd_stat_arch_elt) (bfd *, struct stat *);
- bfd_boolean (*_bfd_update_armap_timestamp) (bfd *);
-
- /* Entry points used for symbols. */
-#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
- NAME##_get_symtab_upper_bound, \
- NAME##_canonicalize_symtab, \
- NAME##_make_empty_symbol, \
- NAME##_print_symbol, \
- NAME##_get_symbol_info, \
- NAME##_get_symbol_version_string, \
- NAME##_bfd_is_local_label_name, \
- NAME##_bfd_is_target_special_symbol, \
- NAME##_get_lineno, \
- NAME##_find_nearest_line, \
- NAME##_find_line, \
- NAME##_find_inliner_info, \
- NAME##_bfd_make_debug_symbol, \
- NAME##_read_minisymbols, \
- NAME##_minisymbol_to_symbol
-
- long (*_bfd_get_symtab_upper_bound) (bfd *);
- long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **);
- struct bfd_symbol *
- (*_bfd_make_empty_symbol) (bfd *);
- void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *,
- bfd_print_symbol_type);
-#define bfd_print_symbol(b,p,s,e) \
- BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
- void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *,
- symbol_info *);
-#define bfd_get_symbol_info(b,p,e) \
- BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
- const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *,
- bfd_boolean *);
-#define bfd_get_symbol_version_string(b,s,h) \
- BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h))
- bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
- bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
- alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
- bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **,
- struct bfd_section *, bfd_vma,
- const char **, const char **,
- unsigned int *, unsigned int *);
- bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **,
- struct bfd_symbol *, const char **,
- unsigned int *);
- bfd_boolean (*_bfd_find_inliner_info)
- (bfd *, const char **, const char **, unsigned int *);
- /* Back-door to allow format-aware applications to create debug symbols
- while using BFD for everything else. Currently used by the assembler
- when creating COFF files. */
- asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size);
-#define bfd_read_minisymbols(b, d, m, s) \
- BFD_SEND (b, _read_minisymbols, (b, d, m, s))
- long (*_read_minisymbols) (bfd *, bfd_boolean, void **,
- unsigned int *);
-#define bfd_minisymbol_to_symbol(b, d, m, f) \
- BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
- asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *,
- asymbol *);
-
- /* Routines for relocs. */
-#define BFD_JUMP_TABLE_RELOCS(NAME) \
- NAME##_get_reloc_upper_bound, \
- NAME##_canonicalize_reloc, \
- NAME##_set_reloc, \
- NAME##_bfd_reloc_type_lookup, \
- NAME##_bfd_reloc_name_lookup
-
- long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
- long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **,
- struct bfd_symbol **);
- void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int);
- /* See documentation on reloc types. */
- reloc_howto_type *
- (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
- reloc_howto_type *
- (*reloc_name_lookup) (bfd *, const char *);
-
- /* Routines used when writing an object file. */
-#define BFD_JUMP_TABLE_WRITE(NAME) \
- NAME##_set_arch_mach, \
- NAME##_set_section_contents
-
- bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture,
- unsigned long);
- bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *,
- file_ptr, bfd_size_type);
-
- /* Routines used by the linker. */
-#define BFD_JUMP_TABLE_LINK(NAME) \
- NAME##_sizeof_headers, \
- NAME##_bfd_get_relocated_section_contents, \
- NAME##_bfd_relax_section, \
- NAME##_bfd_link_hash_table_create, \
- NAME##_bfd_link_add_symbols, \
- NAME##_bfd_link_just_syms, \
- NAME##_bfd_copy_link_hash_symbol_type, \
- NAME##_bfd_final_link, \
- NAME##_bfd_link_split_section, \
- NAME##_bfd_link_check_relocs, \
- NAME##_bfd_gc_sections, \
- NAME##_bfd_lookup_section_flags, \
- NAME##_bfd_merge_sections, \
- NAME##_bfd_is_group_section, \
- NAME##_bfd_discard_group, \
- NAME##_section_already_linked, \
- NAME##_bfd_define_common_symbol, \
- NAME##_bfd_link_hide_symbol, \
- NAME##_bfd_define_start_stop
-
- int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
- bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *,
- struct bfd_link_info *,
- struct bfd_link_order *,
- bfd_byte *, bfd_boolean,
- struct bfd_symbol **);
-
- bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *,
- struct bfd_link_info *, bfd_boolean *);
-
- /* Create a hash table for the linker. Different backends store
- different information in this table. */
- struct bfd_link_hash_table *
- (*_bfd_link_hash_table_create) (bfd *);
-
- /* Add symbols from this object file into the hash table. */
- bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
-
- /* Indicate that we are only retrieving symbol values from this section. */
- void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
-
- /* Copy the symbol type and other attributes for a linker script
- assignment of one symbol to another. */
-#define bfd_copy_link_hash_symbol_type(b, t, f) \
- BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f))
- void (*_bfd_copy_link_hash_symbol_type) (bfd *,
- struct bfd_link_hash_entry *,
- struct bfd_link_hash_entry *);
-
- /* Do a link based on the link_order structures attached to each
- section of the BFD. */
- bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
-
- /* Should this section be split up into smaller pieces during linking. */
- bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
-
- /* Check the relocations in the bfd for validity. */
- bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *);
-
- /* Remove sections that are not referenced from the output. */
- bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
-
- /* Sets the bitmask of allowed and disallowed section flags. */
- bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *,
- struct flag_info *, asection *);
-
- /* Attempt to merge SEC_MERGE sections. */
- bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
-
- /* Is this section a member of a group? */
- bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
-
- /* Discard members of a group. */
- bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
-
- /* Check if SEC has been already linked during a reloceatable or
- final link. */
- bfd_boolean (*_section_already_linked) (bfd *, asection *,
- struct bfd_link_info *);
-
- /* Define a common symbol. */
- bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *,
- struct bfd_link_hash_entry *);
-
- /* Hide a symbol. */
- void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *,
- struct bfd_link_hash_entry *);
-
- /* Define a __start, __stop, .startof. or .sizeof. symbol. */
- struct bfd_link_hash_entry *
- (*_bfd_define_start_stop) (struct bfd_link_info *, const char *,
- asection *);
-
- /* Routines to handle dynamic symbols and relocs. */
-#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
- NAME##_get_dynamic_symtab_upper_bound, \
- NAME##_canonicalize_dynamic_symtab, \
- NAME##_get_synthetic_symtab, \
- NAME##_get_dynamic_reloc_upper_bound, \
- NAME##_canonicalize_dynamic_reloc
-
- /* Get the amount of memory required to hold the dynamic symbols. */
- long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
- /* Read in the dynamic symbols. */
- long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **);
- /* Create synthetized symbols. */
- long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **,
- long, struct bfd_symbol **,
- struct bfd_symbol **);
- /* Get the amount of memory required to hold the dynamic relocs. */
- long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
- /* Read in the dynamic relocs. */
- long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **,
- struct bfd_symbol **);
-
- /* Opposite endian version of this target. */
- const struct bfd_target *alternative_target;
-
- /* Data for use by back-end routines, which isn't
- generic enough to belong in this structure. */
- const void *backend_data;
-
-} bfd_target;
-
-bfd_boolean bfd_set_default_target (const char *name);
-
-const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
-
-const bfd_target *bfd_get_target_info (const char *target_name,
- bfd *abfd,
- bfd_boolean *is_bigendian,
- int *underscoring,
- const char **def_target_arch);
-const char ** bfd_target_list (void);
-
-const bfd_target *bfd_iterate_over_targets
- (int (*func) (const bfd_target *, void *),
- void *data);
-
-const char *bfd_flavour_name (enum bfd_flavour flavour);
-
-/* Extracted from format.c. */
-bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
-
-bfd_boolean bfd_check_format_matches
- (bfd *abfd, bfd_format format, char ***matching);
-
-bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
-
-const char *bfd_format_string (bfd_format format);
-
-/* Extracted from linker.c. */
-/* Return TRUE if the symbol described by a linker hash entry H
- is going to be absolute. Linker-script defined symbols can be
- converted from absolute to section-relative ones late in the
- link. Use this macro to correctly determine whether the symbol
- will actually end up absolute in output. */
-#define bfd_is_abs_symbol(H) \
- (((H)->type == bfd_link_hash_defined \
- || (H)->type == bfd_link_hash_defweak) \
- && bfd_is_abs_section ((H)->u.def.section) \
- && !(H)->rel_from_abs)
-
-bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
-
-#define bfd_link_split_section(abfd, sec) \
- BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
-
-bfd_boolean bfd_section_already_linked (bfd *abfd,
- asection *sec,
- struct bfd_link_info *info);
-
-#define bfd_section_already_linked(abfd, sec, info) \
- BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
-
-bfd_boolean bfd_generic_define_common_symbol
- (bfd *output_bfd, struct bfd_link_info *info,
- struct bfd_link_hash_entry *h);
-
-#define bfd_define_common_symbol(output_bfd, info, h) \
- BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h))
-
-void _bfd_generic_link_hide_symbol
- (bfd *output_bfd, struct bfd_link_info *info,
- struct bfd_link_hash_entry *h);
-
-#define bfd_link_hide_symbol(output_bfd, info, h) \
- BFD_SEND (output_bfd, _bfd_link_hide_symbol, (output_bfd, info, h))
-
-struct bfd_link_hash_entry *bfd_generic_define_start_stop
- (struct bfd_link_info *info,
- const char *symbol, asection *sec);
-
-#define bfd_define_start_stop(output_bfd, info, symbol, sec) \
- BFD_SEND (output_bfd, _bfd_define_start_stop, (info, symbol, sec))
-
-struct bfd_elf_version_tree * bfd_find_version_for_sym
- (struct bfd_elf_version_tree *verdefs,
- const char *sym_name, bfd_boolean *hide);
-
-bfd_boolean bfd_hide_sym_by_version
- (struct bfd_elf_version_tree *verdefs, const char *sym_name);
-
-bfd_boolean bfd_link_check_relocs
- (bfd *abfd, struct bfd_link_info *info);
-
-bfd_boolean _bfd_generic_link_check_relocs
- (bfd *abfd, struct bfd_link_info *info);
-
-bfd_boolean bfd_merge_private_bfd_data
- (bfd *ibfd, struct bfd_link_info *info);
-
-#define bfd_merge_private_bfd_data(ibfd, info) \
- BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \
- (ibfd, info))
-/* Extracted from simple.c. */
-bfd_byte *bfd_simple_get_relocated_section_contents
- (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
-
-/* Extracted from compress.c. */
-bfd_boolean bfd_get_full_section_contents
- (bfd *abfd, asection *section, bfd_byte **ptr);
-
-void bfd_cache_section_contents
- (asection *sec, void *contents);
-
-bfd_boolean bfd_is_section_compressed_with_header
- (bfd *abfd, asection *section,
- int *compression_header_size_p,
- bfd_size_type *uncompressed_size_p,
- unsigned int *uncompressed_alignment_power_p);
-
-bfd_boolean bfd_is_section_compressed
- (bfd *abfd, asection *section);
-
-bfd_boolean bfd_init_section_decompress_status
- (bfd *abfd, asection *section);
-
-bfd_boolean bfd_init_section_compress_status
- (bfd *abfd, asection *section);
-
-bfd_boolean bfd_compress_section
- (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabihf/bfd_stdint.h b/lib/libc/include/armeb-linux-musleabihf/bfd_stdint.h
deleted file mode 100644
index 938024f6548f0bb22db3c6c50755fcc64ea96e24..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabihf/bfd_stdint.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* generated for armeb-linux-musleabihf-gcc (GCC) 8.3.0 */
-
-#ifndef GCC_GENERATED_STDINT_H
-#define GCC_GENERATED_STDINT_H 1
-
-#include
-#include
-/* glibc uses these symbols as guards to prevent redefinitions. */
-#ifdef __int8_t_defined
-#define _INT8_T
-#define _INT16_T
-#define _INT32_T
-#endif
-#ifdef __uint32_t_defined
-#define _UINT32_T
-#endif
-
-
-/* Some systems have guard macros to prevent redefinitions, define them. */
-#ifndef _INT8_T
-#define _INT8_T
-#endif
-#ifndef _INT16_T
-#define _INT16_T
-#endif
-#ifndef _INT32_T
-#define _INT32_T
-#endif
-#ifndef _UINT8_T
-#define _UINT8_T
-#endif
-#ifndef _UINT16_T
-#define _UINT16_T
-#endif
-#ifndef _UINT32_T
-#define _UINT32_T
-#endif
-
-/* system headers have good uint64_t and int64_t */
-#ifndef _INT64_T
-#define _INT64_T
-#endif
-#ifndef _UINT64_T
-#define _UINT64_T
-#endif
-
-#endif /* GCC_GENERATED_STDINT_H */
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabihf/bits/fcntl.h b/lib/libc/include/armeb-linux-musleabihf/bits/fcntl.h
deleted file mode 100644
index 2408640910a08a79b5dc06ebb934bff061d6f89f..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabihf/bits/fcntl.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#define O_CREAT 0100
-#define O_EXCL 0200
-#define O_NOCTTY 0400
-#define O_TRUNC 01000
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
-#define O_DSYNC 010000
-#define O_SYNC 04010000
-#define O_RSYNC 04010000
-#define O_DIRECTORY 040000
-#define O_NOFOLLOW 0100000
-#define O_CLOEXEC 02000000
-
-#define O_ASYNC 020000
-#define O_DIRECT 0200000
-#define O_LARGEFILE 0400000
-#define O_NOATIME 01000000
-#define O_PATH 010000000
-#define O_TMPFILE 020040000
-#define O_NDELAY O_NONBLOCK
-
-#define F_DUPFD 0
-#define F_GETFD 1
-#define F_SETFD 2
-#define F_GETFL 3
-#define F_SETFL 4
-
-#define F_SETOWN 8
-#define F_GETOWN 9
-#define F_SETSIG 10
-#define F_GETSIG 11
-
-#define F_GETLK 12
-#define F_SETLK 13
-#define F_SETLKW 14
-
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-
-#define F_GETOWNER_UIDS 17
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabihf/bits/hwcap.h b/lib/libc/include/armeb-linux-musleabihf/bits/hwcap.h
deleted file mode 100644
index c1c1fb1683d7710287af82ec59c42e27149eebf0..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabihf/bits/hwcap.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#define HWCAP_SWP (1 << 0)
-#define HWCAP_HALF (1 << 1)
-#define HWCAP_THUMB (1 << 2)
-#define HWCAP_26BIT (1 << 3)
-#define HWCAP_FAST_MULT (1 << 4)
-#define HWCAP_FPA (1 << 5)
-#define HWCAP_VFP (1 << 6)
-#define HWCAP_EDSP (1 << 7)
-#define HWCAP_JAVA (1 << 8)
-#define HWCAP_IWMMXT (1 << 9)
-#define HWCAP_CRUNCH (1 << 10)
-#define HWCAP_THUMBEE (1 << 11)
-#define HWCAP_NEON (1 << 12)
-#define HWCAP_VFPv3 (1 << 13)
-#define HWCAP_VFPv3D16 (1 << 14)
-#define HWCAP_TLS (1 << 15)
-#define HWCAP_VFPv4 (1 << 16)
-#define HWCAP_IDIVA (1 << 17)
-#define HWCAP_IDIVT (1 << 18)
-#define HWCAP_VFPD32 (1 << 19)
-#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)
-#define HWCAP_LPAE (1 << 20)
-#define HWCAP_EVTSTRM (1 << 21)
-
-#define HWCAP2_AES (1 << 0)
-#define HWCAP2_PMULL (1 << 1)
-#define HWCAP2_SHA1 (1 << 2)
-#define HWCAP2_SHA2 (1 << 3)
-#define HWCAP2_CRC32 (1 << 4)
-
-#define HWCAP_ARM_SWP (1 << 0)
-#define HWCAP_ARM_HALF (1 << 1)
-#define HWCAP_ARM_THUMB (1 << 2)
-#define HWCAP_ARM_26BIT (1 << 3)
-#define HWCAP_ARM_FAST_MULT (1 << 4)
-#define HWCAP_ARM_FPA (1 << 5)
-#define HWCAP_ARM_VFP (1 << 6)
-#define HWCAP_ARM_EDSP (1 << 7)
-#define HWCAP_ARM_JAVA (1 << 8)
-#define HWCAP_ARM_IWMMXT (1 << 9)
-#define HWCAP_ARM_CRUNCH (1 << 10)
-#define HWCAP_ARM_THUMBEE (1 << 11)
-#define HWCAP_ARM_NEON (1 << 12)
-#define HWCAP_ARM_VFPv3 (1 << 13)
-#define HWCAP_ARM_VFPv3D16 (1 << 14)
-#define HWCAP_ARM_TLS (1 << 15)
-#define HWCAP_ARM_VFPv4 (1 << 16)
-#define HWCAP_ARM_IDIVA (1 << 17)
-#define HWCAP_ARM_IDIVT (1 << 18)
-#define HWCAP_ARM_VFPD32 (1 << 19)
-#define HWCAP_ARM_IDIV (HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT)
-#define HWCAP_ARM_LPAE (1 << 20)
-#define HWCAP_ARM_EVTSTRM (1 << 21)
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabihf/bits/ioctl_fix.h b/lib/libc/include/armeb-linux-musleabihf/bits/ioctl_fix.h
deleted file mode 100644
index 9c177f7679e4ddf3a89e03a984cc3cd45476d773..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabihf/bits/ioctl_fix.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#undef FIOQSIZE
-#define FIOQSIZE 0x545e
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabihf/bits/msg.h b/lib/libc/include/armeb-linux-musleabihf/bits/msg.h
deleted file mode 100644
index e5c8ba75208c2ed80da66995f1afe78fdab39893..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabihf/bits/msg.h
+++ /dev/null
@@ -1,15 +0,0 @@
-struct msqid_ds {
- struct ipc_perm msg_perm;
- time_t msg_stime;
- int __unused1;
- time_t msg_rtime;
- int __unused2;
- time_t msg_ctime;
- int __unused3;
- unsigned long msg_cbytes;
- msgqnum_t msg_qnum;
- msglen_t msg_qbytes;
- pid_t msg_lspid;
- pid_t msg_lrpid;
- unsigned long __unused[2];
-};
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabihf/bits/ptrace.h b/lib/libc/include/armeb-linux-musleabihf/bits/ptrace.h
deleted file mode 100644
index cd96d836f1fdae143f8b0faa5ea72695152b995f..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabihf/bits/ptrace.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#define PTRACE_GETWMMXREGS 18
-#define PTRACE_SETWMMXREGS 19
-#define PTRACE_GET_THREAD_AREA 22
-#define PTRACE_SET_SYSCALL 23
-#define PTRACE_GETCRUNCHREGS 25
-#define PTRACE_SETCRUNCHREGS 26
-#define PTRACE_GETVFPREGS 27
-#define PTRACE_SETVFPREGS 28
-#define PTRACE_GETHBPREGS 29
-#define PTRACE_SETHBPREGS 30
-#define PTRACE_GETFDPIC 31
-#define PTRACE_GETFDPIC_EXEC 0
-#define PTRACE_GETFDPIC_INTERP 1
-
-#define PT_GETWMMXREGS PTRACE_GETWMMXREGS
-#define PT_SETWMMXREGS PTRACE_SETWMMXREGS
-#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
-#define PT_SET_SYSCALL PTRACE_SET_SYSCALL
-#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS
-#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS
-#define PT_GETVFPREGS PTRACE_GETVFPREGS
-#define PT_SETVFPREGS PTRACE_SETVFPREGS
-#define PT_GETHBPREGS PTRACE_GETHBPREGS
-#define PT_SETHBPREGS PTRACE_SETHBPREGS
-#define PT_GETFDPIC PTRACE_GETFDPIC
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabihf/bits/shm.h b/lib/libc/include/armeb-linux-musleabihf/bits/shm.h
deleted file mode 100644
index aa5587127ab24a71b87e7bef5946234c46a9c916..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabihf/bits/shm.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#define SHMLBA 4096
-
-struct shmid_ds {
- struct ipc_perm shm_perm;
- size_t shm_segsz;
- time_t shm_atime;
- int __unused1;
- time_t shm_dtime;
- int __unused2;
- time_t shm_ctime;
- int __unused3;
- pid_t shm_cpid;
- pid_t shm_lpid;
- unsigned long shm_nattch;
- unsigned long __pad1;
- unsigned long __pad2;
-};
-
-struct shminfo {
- unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-};
-
-struct shm_info {
- int __used_ids;
- unsigned long shm_tot, shm_rss, shm_swp;
- unsigned long __swap_attempts, __swap_successes;
-};
\ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-musleabihf/bits/stdint.h b/lib/libc/include/armeb-linux-musleabihf/bits/stdint.h
deleted file mode 100644
index b70a87dc9d5868de097ab14ec47980f3980e9e65..0000000000000000000000000000000000000000
--- a/lib/libc/include/armeb-linux-musleabihf/bits/stdint.h
+++ /dev/null
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN INT32_MIN
-#define INT_FAST32_MIN INT32_MIN
-
-#define INT_FAST16_MAX INT32_MAX
-#define INT_FAST32_MAX INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-
-#define INTPTR_MIN INT32_MIN
-#define INTPTR_MAX INT32_MAX
-#define UINTPTR_MAX UINT32_MAX
-#define PTRDIFF_MIN INT32_MIN
-#define PTRDIFF_MAX INT32_MAX
-#define SIZE_MAX UINT32_MAX
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/ansidecl.h b/lib/libc/include/generic-musl/ansidecl.h
deleted file mode 100644
index 43d053bb8ba268c3cd9e8dd4e6f7c22cfe3f05da..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/ansidecl.h
+++ /dev/null
@@ -1,402 +0,0 @@
-/* ANSI and traditional C compatability macros
- Copyright (C) 1991-2019 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* ANSI and traditional C compatibility macros
-
- ANSI C is assumed if __STDC__ is #defined.
-
- Macro ANSI C definition Traditional C definition
- ----- ---- - ---------- ----------- - ----------
- PTR `void *' `char *'
- const not defined `'
- volatile not defined `'
- signed not defined `'
-
- For ease of writing code which uses GCC extensions but needs to be
- portable to other compilers, we provide the GCC_VERSION macro that
- simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various
- wrappers around __attribute__. Also, __extension__ will be #defined
- to nothing if it doesn't work. See below. */
-
-#ifndef _ANSIDECL_H
-#define _ANSIDECL_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Every source file includes this file,
- so they will all get the switch for lint. */
-/* LINTLIBRARY */
-
-/* Using MACRO(x,y) in cpp #if conditionals does not work with some
- older preprocessors. Thus we can't define something like this:
-
-#define HAVE_GCC_VERSION(MAJOR, MINOR) \
- (__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
-
-and then test "#if HAVE_GCC_VERSION(2,7)".
-
-So instead we use the macro below and test it against specific values. */
-
-/* This macro simplifies testing whether we are using gcc, and if it
- is of a particular minimum version. (Both major & minor numbers are
- significant.) This macro will evaluate to 0 if we are not using
- gcc at all. */
-#ifndef GCC_VERSION
-#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
-#endif /* GCC_VERSION */
-
-#if defined (__STDC__) || defined(__cplusplus) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
-/* All known AIX compilers implement these things (but don't always
- define __STDC__). The RISC/OS MIPS compiler defines these things
- in SVR4 mode, but does not define __STDC__. */
-/* eraxxon@alumni.rice.edu: The Compaq C++ compiler, unlike many other
- C++ compilers, does not define __STDC__, though it acts as if this
- was so. (Verified versions: 5.7, 6.2, 6.3, 6.5) */
-
-#define PTR void *
-
-#undef const
-#undef volatile
-#undef signed
-
-/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
- it too, but it's not in C89. */
-#undef inline
-#if __STDC_VERSION__ >= 199901L || defined(__cplusplus) || (defined(__SUNPRO_C) && defined(__C99FEATURES__))
-/* it's a keyword */
-#else
-# if GCC_VERSION >= 2007
-# define inline __inline__ /* __inline__ prevents -pedantic warnings */
-# else
-# define inline /* nothing */
-# endif
-#endif
-
-#else /* Not ANSI C. */
-
-#define PTR char *
-
-/* some systems define these in header files for non-ansi mode */
-#undef const
-#undef volatile
-#undef signed
-#undef inline
-#define const
-#define volatile
-#define signed
-#define inline
-
-#endif /* ANSI C. */
-
-/* Define macros for some gcc attributes. This permits us to use the
- macros freely, and know that they will come into play for the
- version of gcc in which they are supported. */
-
-#if (GCC_VERSION < 2007)
-# define __attribute__(x)
-#endif
-
-/* Attribute __malloc__ on functions was valid as of gcc 2.96. */
-#ifndef ATTRIBUTE_MALLOC
-# if (GCC_VERSION >= 2096)
-# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
-# else
-# define ATTRIBUTE_MALLOC
-# endif /* GNUC >= 2.96 */
-#endif /* ATTRIBUTE_MALLOC */
-
-/* Attributes on labels were valid as of gcc 2.93 and g++ 4.5. For
- g++ an attribute on a label must be followed by a semicolon. */
-#ifndef ATTRIBUTE_UNUSED_LABEL
-# ifndef __cplusplus
-# if GCC_VERSION >= 2093
-# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
-# else
-# define ATTRIBUTE_UNUSED_LABEL
-# endif
-# else
-# if GCC_VERSION >= 4005
-# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED ;
-# else
-# define ATTRIBUTE_UNUSED_LABEL
-# endif
-# endif
-#endif
-
-/* Similarly to ARG_UNUSED below. Prior to GCC 3.4, the C++ frontend
- couldn't parse attributes placed after the identifier name, and now
- the entire compiler is built with C++. */
-#ifndef ATTRIBUTE_UNUSED
-#if GCC_VERSION >= 3004
-# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-#else
-#define ATTRIBUTE_UNUSED
-#endif
-#endif /* ATTRIBUTE_UNUSED */
-
-/* Before GCC 3.4, the C++ frontend couldn't parse attributes placed after the
- identifier name. */
-#if ! defined(__cplusplus) || (GCC_VERSION >= 3004)
-# define ARG_UNUSED(NAME) NAME ATTRIBUTE_UNUSED
-#else /* !__cplusplus || GNUC >= 3.4 */
-# define ARG_UNUSED(NAME) NAME
-#endif /* !__cplusplus || GNUC >= 3.4 */
-
-#ifndef ATTRIBUTE_NORETURN
-#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
-#endif /* ATTRIBUTE_NORETURN */
-
-/* Attribute `nonnull' was valid as of gcc 3.3. */
-#ifndef ATTRIBUTE_NONNULL
-# if (GCC_VERSION >= 3003)
-# define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
-# else
-# define ATTRIBUTE_NONNULL(m)
-# endif /* GNUC >= 3.3 */
-#endif /* ATTRIBUTE_NONNULL */
-
-/* Attribute `returns_nonnull' was valid as of gcc 4.9. */
-#ifndef ATTRIBUTE_RETURNS_NONNULL
-# if (GCC_VERSION >= 4009)
-# define ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
-# else
-# define ATTRIBUTE_RETURNS_NONNULL
-# endif /* GNUC >= 4.9 */
-#endif /* ATTRIBUTE_RETURNS_NONNULL */
-
-/* Attribute `pure' was valid as of gcc 3.0. */
-#ifndef ATTRIBUTE_PURE
-# if (GCC_VERSION >= 3000)
-# define ATTRIBUTE_PURE __attribute__ ((__pure__))
-# else
-# define ATTRIBUTE_PURE
-# endif /* GNUC >= 3.0 */
-#endif /* ATTRIBUTE_PURE */
-
-/* Use ATTRIBUTE_PRINTF when the format specifier must not be NULL.
- This was the case for the `printf' format attribute by itself
- before GCC 3.3, but as of 3.3 we need to add the `nonnull'
- attribute to retain this behavior. */
-#ifndef ATTRIBUTE_PRINTF
-#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m)
-#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
-#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
-#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
-#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
-#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
-#endif /* ATTRIBUTE_PRINTF */
-
-/* Use ATTRIBUTE_FPTR_PRINTF when the format attribute is to be set on
- a function pointer. Format attributes were allowed on function
- pointers as of gcc 3.1. */
-#ifndef ATTRIBUTE_FPTR_PRINTF
-# if (GCC_VERSION >= 3001)
-# define ATTRIBUTE_FPTR_PRINTF(m, n) ATTRIBUTE_PRINTF(m, n)
-# else
-# define ATTRIBUTE_FPTR_PRINTF(m, n)
-# endif /* GNUC >= 3.1 */
-# define ATTRIBUTE_FPTR_PRINTF_1 ATTRIBUTE_FPTR_PRINTF(1, 2)
-# define ATTRIBUTE_FPTR_PRINTF_2 ATTRIBUTE_FPTR_PRINTF(2, 3)
-# define ATTRIBUTE_FPTR_PRINTF_3 ATTRIBUTE_FPTR_PRINTF(3, 4)
-# define ATTRIBUTE_FPTR_PRINTF_4 ATTRIBUTE_FPTR_PRINTF(4, 5)
-# define ATTRIBUTE_FPTR_PRINTF_5 ATTRIBUTE_FPTR_PRINTF(5, 6)
-#endif /* ATTRIBUTE_FPTR_PRINTF */
-
-/* Use ATTRIBUTE_NULL_PRINTF when the format specifier may be NULL. A
- NULL format specifier was allowed as of gcc 3.3. */
-#ifndef ATTRIBUTE_NULL_PRINTF
-# if (GCC_VERSION >= 3003)
-# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
-# else
-# define ATTRIBUTE_NULL_PRINTF(m, n)
-# endif /* GNUC >= 3.3 */
-# define ATTRIBUTE_NULL_PRINTF_1 ATTRIBUTE_NULL_PRINTF(1, 2)
-# define ATTRIBUTE_NULL_PRINTF_2 ATTRIBUTE_NULL_PRINTF(2, 3)
-# define ATTRIBUTE_NULL_PRINTF_3 ATTRIBUTE_NULL_PRINTF(3, 4)
-# define ATTRIBUTE_NULL_PRINTF_4 ATTRIBUTE_NULL_PRINTF(4, 5)
-# define ATTRIBUTE_NULL_PRINTF_5 ATTRIBUTE_NULL_PRINTF(5, 6)
-#endif /* ATTRIBUTE_NULL_PRINTF */
-
-/* Attribute `sentinel' was valid as of gcc 3.5. */
-#ifndef ATTRIBUTE_SENTINEL
-# if (GCC_VERSION >= 3005)
-# define ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
-# else
-# define ATTRIBUTE_SENTINEL
-# endif /* GNUC >= 3.5 */
-#endif /* ATTRIBUTE_SENTINEL */
-
-
-#ifndef ATTRIBUTE_ALIGNED_ALIGNOF
-# if (GCC_VERSION >= 3000)
-# define ATTRIBUTE_ALIGNED_ALIGNOF(m) __attribute__ ((__aligned__ (__alignof__ (m))))
-# else
-# define ATTRIBUTE_ALIGNED_ALIGNOF(m)
-# endif /* GNUC >= 3.0 */
-#endif /* ATTRIBUTE_ALIGNED_ALIGNOF */
-
-/* Useful for structures whose layout must match some binary specification
- regardless of the alignment and padding qualities of the compiler. */
-#ifndef ATTRIBUTE_PACKED
-# define ATTRIBUTE_PACKED __attribute__ ((packed))
-#endif
-
-/* Attribute `hot' and `cold' was valid as of gcc 4.3. */
-#ifndef ATTRIBUTE_COLD
-# if (GCC_VERSION >= 4003)
-# define ATTRIBUTE_COLD __attribute__ ((__cold__))
-# else
-# define ATTRIBUTE_COLD
-# endif /* GNUC >= 4.3 */
-#endif /* ATTRIBUTE_COLD */
-#ifndef ATTRIBUTE_HOT
-# if (GCC_VERSION >= 4003)
-# define ATTRIBUTE_HOT __attribute__ ((__hot__))
-# else
-# define ATTRIBUTE_HOT
-# endif /* GNUC >= 4.3 */
-#endif /* ATTRIBUTE_HOT */
-
-/* Attribute 'no_sanitize_undefined' was valid as of gcc 4.9. */
-#ifndef ATTRIBUTE_NO_SANITIZE_UNDEFINED
-# if (GCC_VERSION >= 4009)
-# define ATTRIBUTE_NO_SANITIZE_UNDEFINED __attribute__ ((no_sanitize_undefined))
-# else
-# define ATTRIBUTE_NO_SANITIZE_UNDEFINED
-# endif /* GNUC >= 4.9 */
-#endif /* ATTRIBUTE_NO_SANITIZE_UNDEFINED */
-
-/* Attribute 'nonstring' was valid as of gcc 8. */
-#ifndef ATTRIBUTE_NONSTRING
-# if GCC_VERSION >= 8000
-# define ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
-# else
-# define ATTRIBUTE_NONSTRING
-# endif
-#endif
-
-/* We use __extension__ in some places to suppress -pedantic warnings
- about GCC extensions. This feature didn't work properly before
- gcc 2.8. */
-#if GCC_VERSION < 2008
-#define __extension__
-#endif
-
-/* This is used to declare a const variable which should be visible
- outside of the current compilation unit. Use it as
- EXPORTED_CONST int i = 1;
- This is because the semantics of const are different in C and C++.
- "extern const" is permitted in C but it looks strange, and gcc
- warns about it when -Wc++-compat is not used. */
-#ifdef __cplusplus
-#define EXPORTED_CONST extern const
-#else
-#define EXPORTED_CONST const
-#endif
-
-/* Be conservative and only use enum bitfields with C++ or GCC.
- FIXME: provide a complete autoconf test for buggy enum bitfields. */
-
-#ifdef __cplusplus
-#define ENUM_BITFIELD(TYPE) enum TYPE
-#elif (GCC_VERSION > 2000)
-#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE
-#else
-#define ENUM_BITFIELD(TYPE) unsigned int
-#endif
-
-#if __cpp_constexpr >= 200704
-#define CONSTEXPR constexpr
-#else
-#define CONSTEXPR
-#endif
-
-/* C++11 adds the ability to add "override" after an implementation of a
- virtual function in a subclass, to:
- (A) document that this is an override of a virtual function
- (B) allow the compiler to issue a warning if it isn't (e.g. a mismatch
- of the type signature).
-
- Similarly, it allows us to add a "final" to indicate that no subclass
- may subsequently override the vfunc.
-
- Provide OVERRIDE and FINAL as macros, allowing us to get these benefits
- when compiling with C++11 support, but without requiring C++11.
-
- For gcc, use "-std=c++11" to enable C++11 support; gcc 6 onwards enables
- this by default (actually GNU++14). */
-
-#if defined __cplusplus
-# if __cplusplus >= 201103
- /* C++11 claims to be available: use it. Final/override were only
- implemented in 4.7, though. */
-# if GCC_VERSION < 4007
-# define OVERRIDE
-# define FINAL
-# else
-# define OVERRIDE override
-# define FINAL final
-# endif
-# elif GCC_VERSION >= 4007
- /* G++ 4.7 supports __final in C++98. */
-# define OVERRIDE
-# define FINAL __final
-# else
- /* No C++11 support; leave the macros empty. */
-# define OVERRIDE
-# define FINAL
-# endif
-#else
- /* No C++11 support; leave the macros empty. */
-# define OVERRIDE
-# define FINAL
-#endif
-
-/* A macro to disable the copy constructor and assignment operator.
- When building with C++11 and above, the methods are explicitly
- deleted, causing a compile-time error if something tries to copy.
- For C++03, this just declares the methods, causing a link-time
- error if the methods end up called (assuming you don't
- define them). For C++03, for best results, place the macro
- under the private: access specifier, like this,
-
- class name_lookup
- {
- private:
- DISABLE_COPY_AND_ASSIGN (name_lookup);
- };
-
- so that most attempts at copy are caught at compile-time. */
-
-#if __cplusplus >= 201103
-#define DISABLE_COPY_AND_ASSIGN(TYPE) \
- TYPE (const TYPE&) = delete; \
- void operator= (const TYPE &) = delete
- #else
-#define DISABLE_COPY_AND_ASSIGN(TYPE) \
- TYPE (const TYPE&); \
- void operator= (const TYPE &)
-#endif /* __cplusplus >= 201103 */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ansidecl.h */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/bfd.h b/lib/libc/include/generic-musl/bfd.h
deleted file mode 100644
index 1f57e84b889e743eaf3e377fd3dadaab1bfc89e5..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/bfd.h
+++ /dev/null
@@ -1,8034 +0,0 @@
-/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
- generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
- "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
- "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
- "linker.c", "simple.c" and "compress.c".
- Run "make headers" in your build bfd/ to regenerate. */
-
-/* Main header file for the bfd library -- portable access to object files.
-
- Copyright (C) 1990-2019 Free Software Foundation, Inc.
-
- Contributed by Cygnus Support.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef __BFD_H_SEEN__
-#define __BFD_H_SEEN__
-
-/* PR 14072: Ensure that config.h is included first. */
-#if !defined PACKAGE && !defined PACKAGE_VERSION
-#error config.h must be included before this header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ansidecl.h"
-#include "symcat.h"
-#include "bfd_stdint.h"
-#include "diagnostics.h"
-#include
-#include
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#ifndef SABER
-/* This hack is to avoid a problem with some strict ANSI C preprocessors.
- The problem is, "32_" is not a valid preprocessing token, and we don't
- want extra underscores (e.g., "nlm_32_"). The XCONCAT2 macro will
- cause the inner CONCAT2 macros to be evaluated first, producing
- still-valid pp-tokens. Then the final concatenation can be done. */
-#undef CONCAT4
-#define CONCAT4(a,b,c,d) XCONCAT2(CONCAT2(a,b),CONCAT2(c,d))
-#endif
-#endif
-
-/* This is a utility macro to handle the situation where the code
- wants to place a constant string into the code, followed by a
- comma and then the length of the string. Doing this by hand
- is error prone, so using this macro is safer. */
-#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
-/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
- to create the arguments to another macro, since the preprocessor
- will mis-count the number of arguments to the outer macro (by not
- evaluating STRING_COMMA_LEN and so missing the comma). This is a
- problem for example when trying to use STRING_COMMA_LEN to build
- the arguments to the strncmp() macro. Hence this alternative
- definition of strncmp is provided here.
-
- Note - these macros do NOT work if STR2 is not a constant string. */
-#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
- /* strcpy() can have a similar problem, but since we know we are
- copying a constant string, we can use memcpy which will be faster
- since there is no need to check for a NUL byte inside STR. We
- can also save time if we do not need to copy the terminating NUL. */
-#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
-#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
-
-
-#define BFD_SUPPORTS_PLUGINS 1
-
-/* The word size used by BFD on the host. This may be 64 with a 32
- bit target if the host is 64 bit, or if other 64 bit targets have
- been selected with --enable-targets, or if --enable-64-bit-bfd. */
-#define BFD_ARCH_SIZE 64
-
-/* The word size of the default bfd target. */
-#define BFD_DEFAULT_TARGET_SIZE 64
-
-#define BFD_HOST_64BIT_LONG 1
-#define BFD_HOST_64BIT_LONG_LONG 0
-#if 1
-#define BFD_HOST_64_BIT long
-#define BFD_HOST_U_64_BIT unsigned long
-typedef BFD_HOST_64_BIT bfd_int64_t;
-typedef BFD_HOST_U_64_BIT bfd_uint64_t;
-#endif
-
-#ifdef HAVE_INTTYPES_H
-# include
-#else
-# if BFD_HOST_64BIT_LONG
-# define BFD_PRI64 "l"
-# elif defined (__MSVCRT__)
-# define BFD_PRI64 "I64"
-# else
-# define BFD_PRI64 "ll"
-# endif
-# undef PRId64
-# define PRId64 BFD_PRI64 "d"
-# undef PRIu64
-# define PRIu64 BFD_PRI64 "u"
-# undef PRIx64
-# define PRIx64 BFD_PRI64 "x"
-#endif
-
-#if BFD_ARCH_SIZE >= 64
-#define BFD64
-#endif
-
-#ifndef INLINE
-#if __GNUC__ >= 2
-#define INLINE __inline__
-#else
-#define INLINE
-#endif
-#endif
-
-/* Declaring a type wide enough to hold a host long and a host pointer. */
-#define BFD_HOSTPTR_T unsigned long
-typedef BFD_HOSTPTR_T bfd_hostptr_t;
-
-/* Forward declaration. */
-typedef struct bfd bfd;
-
-/* Boolean type used in bfd. Too many systems define their own
- versions of "boolean" for us to safely typedef a "boolean" of
- our own. Using an enum for "bfd_boolean" has its own set of
- problems, with strange looking casts required to avoid warnings
- on some older compilers. Thus we just use an int.
-
- General rule: Functions which are bfd_boolean return TRUE on
- success and FALSE on failure (unless they're a predicate). */
-
-typedef int bfd_boolean;
-#undef FALSE
-#undef TRUE
-#define FALSE 0
-#define TRUE 1
-
-#ifdef BFD64
-
-#ifndef BFD_HOST_64_BIT
- #error No 64 bit integer type available
-#endif /* ! defined (BFD_HOST_64_BIT) */
-
-typedef BFD_HOST_U_64_BIT bfd_vma;
-typedef BFD_HOST_64_BIT bfd_signed_vma;
-typedef BFD_HOST_U_64_BIT bfd_size_type;
-typedef BFD_HOST_U_64_BIT symvalue;
-
-#if BFD_HOST_64BIT_LONG
-#define BFD_VMA_FMT "l"
-#elif defined (__MSVCRT__)
-#define BFD_VMA_FMT "I64"
-#else
-#define BFD_VMA_FMT "ll"
-#endif
-
-#ifndef fprintf_vma
-#define sprintf_vma(s,x) sprintf (s, "%016" BFD_VMA_FMT "x", x)
-#define fprintf_vma(f,x) fprintf (f, "%016" BFD_VMA_FMT "x", x)
-#endif
-
-#else /* not BFD64 */
-
-/* Represent a target address. Also used as a generic unsigned type
- which is guaranteed to be big enough to hold any arithmetic types
- we need to deal with. */
-typedef unsigned long bfd_vma;
-
-/* A generic signed type which is guaranteed to be big enough to hold any
- arithmetic types we need to deal with. Can be assumed to be compatible
- with bfd_vma in the same way that signed and unsigned ints are compatible
- (as parameters, in assignment, etc). */
-typedef long bfd_signed_vma;
-
-typedef unsigned long symvalue;
-typedef unsigned long bfd_size_type;
-
-/* Print a bfd_vma x on stream s. */
-#define BFD_VMA_FMT "l"
-#define fprintf_vma(s,x) fprintf (s, "%08" BFD_VMA_FMT "x", x)
-#define sprintf_vma(s,x) sprintf (s, "%08" BFD_VMA_FMT "x", x)
-
-#endif /* not BFD64 */
-
-#define HALF_BFD_SIZE_TYPE \
- (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2))
-
-#ifndef BFD_HOST_64_BIT
-/* Fall back on a 32 bit type. The idea is to make these types always
- available for function return types, but in the case that
- BFD_HOST_64_BIT is undefined such a function should abort or
- otherwise signal an error. */
-typedef bfd_signed_vma bfd_int64_t;
-typedef bfd_vma bfd_uint64_t;
-#endif
-
-/* An offset into a file. BFD always uses the largest possible offset
- based on the build time availability of fseek, fseeko, or fseeko64. */
-typedef BFD_HOST_64_BIT file_ptr;
-typedef unsigned BFD_HOST_64_BIT ufile_ptr;
-
-extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
-extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
-
-#define printf_vma(x) fprintf_vma(stdout,x)
-#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
-
-typedef unsigned int flagword; /* 32 bits of flags */
-typedef unsigned char bfd_byte;
-
-/* File formats. */
-
-typedef enum bfd_format
-{
- bfd_unknown = 0, /* File format is unknown. */
- bfd_object, /* Linker/assembler/compiler output. */
- bfd_archive, /* Object archive file. */
- bfd_core, /* Core dump. */
- bfd_type_end /* Marks the end; don't use it! */
-}
-bfd_format;
-
-/* Symbols and relocation. */
-
-/* A count of carsyms (canonical archive symbols). */
-typedef unsigned long symindex;
-
-#define BFD_NO_MORE_SYMBOLS ((symindex) ~0)
-
-/* General purpose part of a symbol X;
- target specific parts are in libcoff.h, libaout.h, etc. */
-
-#define bfd_get_section(x) ((x)->section)
-#define bfd_get_output_section(x) ((x)->section->output_section)
-#define bfd_set_section(x,y) ((x)->section) = (y)
-#define bfd_asymbol_base(x) ((x)->section->vma)
-#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value)
-#define bfd_asymbol_name(x) ((x)->name)
-/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/
-#define bfd_asymbol_bfd(x) ((x)->the_bfd)
-#define bfd_asymbol_flavour(x) \
- (((x)->flags & BSF_SYNTHETIC) != 0 \
- ? bfd_target_unknown_flavour \
- : bfd_asymbol_bfd (x)->xvec->flavour)
-
-/* A canonical archive symbol. */
-/* This is a type pun with struct ranlib on purpose! */
-typedef struct carsym
-{
- char *name;
- file_ptr file_offset; /* Look here to find the file. */
-}
-carsym; /* To make these you call a carsymogen. */
-
-/* Used in generating armaps (archive tables of contents).
- Perhaps just a forward definition would do? */
-struct orl /* Output ranlib. */
-{
- char **name; /* Symbol name. */
- union
- {
- file_ptr pos;
- bfd *abfd;
- } u; /* bfd* or file position. */
- int namidx; /* Index into string table. */
-};
-
-/* Linenumber stuff. */
-typedef struct lineno_cache_entry
-{
- unsigned int line_number; /* Linenumber from start of function. */
- union
- {
- struct bfd_symbol *sym; /* Function name. */
- bfd_vma offset; /* Offset into section. */
- } u;
-}
-alent;
-
-/* Object and core file sections. */
-typedef struct bfd_section *sec_ptr;
-
-#define align_power(addr, align) \
- (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align))))
-
-/* Align an address upward to a boundary, expressed as a number of bytes.
- E.g. align to an 8-byte boundary with argument of 8. Take care never
- to wrap around if the address is within boundary-1 of the end of the
- address space. */
-#define BFD_ALIGN(this, boundary) \
- ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
- ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \
- : ~ (bfd_vma) 0)
-
-#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name)
-#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma)
-#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma)
-#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \
- (ptr)->alignment_power)
-#define bfd_section_name(bfd, ptr) ((ptr)->name)
-#define bfd_section_size(bfd, ptr) ((ptr)->size)
-#define bfd_get_section_size(ptr) ((ptr)->size)
-#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
-#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
-#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
-#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags)
-#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata)
-
-#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
-
-#define bfd_get_section_limit_octets(bfd, sec) \
- ((bfd)->direction != write_direction && (sec)->rawsize != 0 \
- ? (sec)->rawsize : (sec)->size)
-
-/* Find the address one past the end of SEC. */
-#define bfd_get_section_limit(bfd, sec) \
- (bfd_get_section_limit_octets(bfd, sec) / bfd_octets_per_byte (bfd))
-
-/* Return TRUE if input section SEC has been discarded. */
-#define discarded_section(sec) \
- (!bfd_is_abs_section (sec) \
- && bfd_is_abs_section ((sec)->output_section) \
- && (sec)->sec_info_type != SEC_INFO_TYPE_MERGE \
- && (sec)->sec_info_type != SEC_INFO_TYPE_JUST_SYMS)
-
-typedef enum bfd_print_symbol
-{
- bfd_print_symbol_name,
- bfd_print_symbol_more,
- bfd_print_symbol_all
-} bfd_print_symbol_type;
-
-/* Information about a symbol that nm needs. */
-
-typedef struct _symbol_info
-{
- symvalue value;
- char type;
- const char *name; /* Symbol name. */
- unsigned char stab_type; /* Stab type. */
- char stab_other; /* Stab other. */
- short stab_desc; /* Stab desc. */
- const char *stab_name; /* String for stab type. */
-} symbol_info;
-
-/* Get the name of a stabs type code. */
-
-extern const char *bfd_get_stab_name (int);
-
-/* Hash table routines. There is no way to free up a hash table. */
-
-/* An element in the hash table. Most uses will actually use a larger
- structure, and an instance of this will be the first field. */
-
-struct bfd_hash_entry
-{
- /* Next entry for this hash code. */
- struct bfd_hash_entry *next;
- /* String being hashed. */
- const char *string;
- /* Hash code. This is the full hash code, not the index into the
- table. */
- unsigned long hash;
-};
-
-/* A hash table. */
-
-struct bfd_hash_table
-{
- /* The hash array. */
- struct bfd_hash_entry **table;
- /* A function used to create new elements in the hash table. The
- first entry is itself a pointer to an element. When this
- function is first invoked, this pointer will be NULL. However,
- having the pointer permits a hierarchy of method functions to be
- built each of which calls the function in the superclass. Thus
- each function should be written to allocate a new block of memory
- only if the argument is NULL. */
- struct bfd_hash_entry *(*newfunc)
- (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
- /* An objalloc for this hash table. This is a struct objalloc *,
- but we use void * to avoid requiring the inclusion of objalloc.h. */
- void *memory;
- /* The number of slots in the hash table. */
- unsigned int size;
- /* The number of entries in the hash table. */
- unsigned int count;
- /* The size of elements. */
- unsigned int entsize;
- /* If non-zero, don't grow the hash table. */
- unsigned int frozen:1;
-};
-
-/* Initialize a hash table. */
-extern bfd_boolean bfd_hash_table_init
- (struct bfd_hash_table *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *),
- unsigned int);
-
-/* Initialize a hash table specifying a size. */
-extern bfd_boolean bfd_hash_table_init_n
- (struct bfd_hash_table *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *),
- unsigned int, unsigned int);
-
-/* Free up a hash table. */
-extern void bfd_hash_table_free
- (struct bfd_hash_table *);
-
-/* Look up a string in a hash table. If CREATE is TRUE, a new entry
- will be created for this string if one does not already exist. The
- COPY argument must be TRUE if this routine should copy the string
- into newly allocated memory when adding an entry. */
-extern struct bfd_hash_entry *bfd_hash_lookup
- (struct bfd_hash_table *, const char *, bfd_boolean create,
- bfd_boolean copy);
-
-/* Insert an entry in a hash table. */
-extern struct bfd_hash_entry *bfd_hash_insert
- (struct bfd_hash_table *, const char *, unsigned long);
-
-/* Rename an entry in a hash table. */
-extern void bfd_hash_rename
- (struct bfd_hash_table *, const char *, struct bfd_hash_entry *);
-
-/* Replace an entry in a hash table. */
-extern void bfd_hash_replace
- (struct bfd_hash_table *, struct bfd_hash_entry *old,
- struct bfd_hash_entry *nw);
-
-/* Base method for creating a hash table entry. */
-extern struct bfd_hash_entry *bfd_hash_newfunc
- (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
-
-/* Grab some space for a hash table entry. */
-extern void *bfd_hash_allocate
- (struct bfd_hash_table *, unsigned int);
-
-/* Traverse a hash table in a random order, calling a function on each
- element. If the function returns FALSE, the traversal stops. The
- INFO argument is passed to the function. */
-extern void bfd_hash_traverse
- (struct bfd_hash_table *,
- bfd_boolean (*) (struct bfd_hash_entry *, void *),
- void *info);
-
-/* Allows the default size of a hash table to be configured. New hash
- tables allocated using bfd_hash_table_init will be created with
- this size. */
-extern unsigned long bfd_hash_set_default_size (unsigned long);
-
-/* Types of compressed DWARF debug sections. We currently support
- zlib. */
-enum compressed_debug_section_type
-{
- COMPRESS_DEBUG_NONE = 0,
- COMPRESS_DEBUG = 1 << 0,
- COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1,
- COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2
-};
-
-/* This structure is used to keep track of stabs in sections
- information while linking. */
-
-struct stab_info
-{
- /* A hash table used to hold stabs strings. */
- struct bfd_strtab_hash *strings;
- /* The header file hash table. */
- struct bfd_hash_table includes;
- /* The first .stabstr section. */
- struct bfd_section *stabstr;
-};
-
-#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table
-
-/* User program access to BFD facilities. */
-
-/* Direct I/O routines, for programs which know more about the object
- file than BFD does. Use higher level routines if possible. */
-
-extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *);
-extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *);
-extern int bfd_seek (bfd *, file_ptr, int);
-extern file_ptr bfd_tell (bfd *);
-extern int bfd_flush (bfd *);
-extern int bfd_stat (bfd *, struct stat *);
-
-/* Deprecated old routines. */
-#if __GNUC__
-#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \
- bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \
- bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#else
-#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
- bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
- (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
- bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#endif
-extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
-
-/* Cast from const char * to char * so that caller can assign to
- a char * without a warning. */
-#define bfd_get_filename(abfd) ((char *) (abfd)->filename)
-#define bfd_get_cacheable(abfd) ((abfd)->cacheable)
-#define bfd_get_format(abfd) ((abfd)->format)
-#define bfd_get_target(abfd) ((abfd)->xvec->name)
-#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
-#define bfd_family_coff(abfd) \
- (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \
- bfd_get_flavour (abfd) == bfd_target_xcoff_flavour)
-#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
-#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
-#define bfd_header_big_endian(abfd) \
- ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG)
-#define bfd_header_little_endian(abfd) \
- ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE)
-#define bfd_get_file_flags(abfd) ((abfd)->flags)
-#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
-#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
-#define bfd_has_map(abfd) ((abfd)->has_armap)
-#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive)
-
-#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types)
-#define bfd_usrdata(abfd) ((abfd)->usrdata)
-
-#define bfd_get_start_address(abfd) ((abfd)->start_address)
-#define bfd_get_symcount(abfd) ((abfd)->symcount)
-#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols)
-#define bfd_count_sections(abfd) ((abfd)->section_count)
-
-#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount)
-
-#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
-
-extern bfd_boolean bfd_cache_close
- (bfd *abfd);
-/* NB: This declaration should match the autogenerated one in libbfd.h. */
-
-extern bfd_boolean bfd_cache_close_all (void);
-
-extern bfd_boolean bfd_record_phdr
- (bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
- bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
-
-/* Byte swapping routines. */
-
-bfd_uint64_t bfd_getb64 (const void *);
-bfd_uint64_t bfd_getl64 (const void *);
-bfd_int64_t bfd_getb_signed_64 (const void *);
-bfd_int64_t bfd_getl_signed_64 (const void *);
-bfd_vma bfd_getb32 (const void *);
-bfd_vma bfd_getl32 (const void *);
-bfd_signed_vma bfd_getb_signed_32 (const void *);
-bfd_signed_vma bfd_getl_signed_32 (const void *);
-bfd_vma bfd_getb16 (const void *);
-bfd_vma bfd_getl16 (const void *);
-bfd_signed_vma bfd_getb_signed_16 (const void *);
-bfd_signed_vma bfd_getl_signed_16 (const void *);
-void bfd_putb64 (bfd_uint64_t, void *);
-void bfd_putl64 (bfd_uint64_t, void *);
-void bfd_putb32 (bfd_vma, void *);
-void bfd_putl32 (bfd_vma, void *);
-void bfd_putb24 (bfd_vma, void *);
-void bfd_putl24 (bfd_vma, void *);
-void bfd_putb16 (bfd_vma, void *);
-void bfd_putl16 (bfd_vma, void *);
-
-/* Byte swapping routines which take size and endiannes as arguments. */
-
-bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
-void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
-
-#if defined(__STDC__) || defined(ALMOST_STDC)
-struct ecoff_debug_info;
-struct ecoff_debug_swap;
-struct ecoff_extr;
-struct bfd_symbol;
-struct bfd_link_info;
-struct bfd_link_hash_entry;
-struct bfd_section_already_linked;
-struct bfd_elf_version_tree;
-#endif
-
-extern bfd_boolean bfd_section_already_linked_table_init (void);
-extern void bfd_section_already_linked_table_free (void);
-extern bfd_boolean _bfd_handle_already_linked
- (struct bfd_section *, struct bfd_section_already_linked *,
- struct bfd_link_info *);
-
-/* Externally visible ECOFF routines. */
-
-extern bfd_boolean bfd_ecoff_set_gp_value
- (bfd *abfd, bfd_vma gp_value);
-extern bfd_boolean bfd_ecoff_set_regmasks
- (bfd *abfd, unsigned long gprmask, unsigned long fprmask,
- unsigned long *cprmask);
-extern void *bfd_ecoff_debug_init
- (bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
-extern void bfd_ecoff_debug_free
- (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_accumulate
- (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
- struct ecoff_debug_info *input_debug,
- const struct ecoff_debug_swap *input_swap, struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_accumulate_other
- (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
- const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
- struct bfd_link_info *);
-extern bfd_boolean bfd_ecoff_debug_externals
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap, bfd_boolean relocatable,
- bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *),
- void (*set_index) (struct bfd_symbol *, bfd_size_type));
-extern bfd_boolean bfd_ecoff_debug_one_external
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap, const char *name,
- struct ecoff_extr *esym);
-extern bfd_size_type bfd_ecoff_debug_size
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap);
-extern bfd_boolean bfd_ecoff_write_debug
- (bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap, file_ptr where);
-extern bfd_boolean bfd_ecoff_write_accumulated_debug
- (void *handle, bfd *abfd, struct ecoff_debug_info *debug,
- const struct ecoff_debug_swap *swap,
- struct bfd_link_info *info, file_ptr where);
-
-/* Externally visible ELF routines. */
-
-struct bfd_link_needed_list
-{
- struct bfd_link_needed_list *next;
- bfd *by;
- const char *name;
-};
-
-enum dynamic_lib_link_class {
- DYN_NORMAL = 0,
- DYN_AS_NEEDED = 1,
- DYN_DT_NEEDED = 2,
- DYN_NO_ADD_NEEDED = 4,
- DYN_NO_NEEDED = 8
-};
-
-enum notice_asneeded_action {
- notice_as_needed,
- notice_not_needed,
- notice_needed
-};
-
-extern bfd_boolean bfd_elf_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
- bfd_boolean);
-extern struct bfd_link_needed_list *bfd_elf_get_needed_list
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_elf_get_bfd_needed_list
- (bfd *, struct bfd_link_needed_list **);
-extern bfd_boolean bfd_elf_stack_segment_size (bfd *, struct bfd_link_info *,
- const char *, bfd_vma);
-extern bfd_boolean bfd_elf_size_dynamic_sections
- (bfd *, const char *, const char *, const char *, const char *, const char *,
- const char * const *, struct bfd_link_info *, struct bfd_section **);
-extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr
- (bfd *, struct bfd_link_info *);
-extern void bfd_elf_set_dt_needed_name
- (bfd *, const char *);
-extern const char *bfd_elf_get_dt_soname
- (bfd *);
-extern void bfd_elf_set_dyn_lib_class
- (bfd *, enum dynamic_lib_link_class);
-extern int bfd_elf_get_dyn_lib_class
- (bfd *);
-extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
- (bfd *, struct bfd_link_info *);
-extern int bfd_elf_discard_info
- (bfd *, struct bfd_link_info *);
-extern unsigned int _bfd_elf_default_action_discarded
- (struct bfd_section *);
-
-/* Return an upper bound on the number of bytes required to store a
- copy of ABFD's program header table entries. Return -1 if an error
- occurs; bfd_get_error will return an appropriate code. */
-extern long bfd_get_elf_phdr_upper_bound
- (bfd *abfd);
-
-/* Copy ABFD's program header table entries to *PHDRS. The entries
- will be stored as an array of Elf_Internal_Phdr structures, as
- defined in include/elf/internal.h. To find out how large the
- buffer needs to be, call bfd_get_elf_phdr_upper_bound.
-
- Return the number of program header table entries read, or -1 if an
- error occurs; bfd_get_error will return an appropriate code. */
-extern int bfd_get_elf_phdrs
- (bfd *abfd, void *phdrs);
-
-/* Create a new BFD as if by bfd_openr. Rather than opening a file,
- reconstruct an ELF file by reading the segments out of remote
- memory based on the ELF file header at EHDR_VMA and the ELF program
- headers it points to. If non-zero, SIZE is the known extent of the
- object. If not null, *LOADBASEP is filled in with the difference
- between the VMAs from which the segments were read, and the VMAs
- the file headers (and hence BFD's idea of each section's VMA) put
- them at.
-
- The function TARGET_READ_MEMORY is called to copy LEN bytes from
- the remote memory at target address VMA into the local buffer at
- MYADDR; it should return zero on success or an `errno' code on
- failure. TEMPL must be a BFD for a target with the word size and
- byte order found in the remote memory. */
-extern bfd *bfd_elf_bfd_from_remote_memory
- (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr,
- bfd_size_type len));
-
-extern struct bfd_section *_bfd_elf_tls_setup
- (bfd *, struct bfd_link_info *);
-
-extern struct bfd_section *
-_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma);
-
-extern void _bfd_fix_excluded_sec_syms
- (bfd *, struct bfd_link_info *);
-
-extern unsigned bfd_m68k_mach_to_features (int);
-
-extern int bfd_m68k_features_to_mach (unsigned);
-
-extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
- char **);
-
-extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
- char **);
-
-extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
- char **);
-
-/* SunOS shared library support routines for the linker. */
-
-extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_sunos_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_sunos_size_dynamic_sections
- (bfd *, struct bfd_link_info *, struct bfd_section **,
- struct bfd_section **, struct bfd_section **);
-
-/* Linux shared library support routines for the linker. */
-
-extern bfd_boolean bfd_i386linux_size_dynamic_sections
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_sparclinux_size_dynamic_sections
- (bfd *, struct bfd_link_info *);
-
-/* mmap hacks */
-
-struct _bfd_window_internal;
-typedef struct _bfd_window_internal bfd_window_internal;
-
-typedef struct _bfd_window
-{
- /* What the user asked for. */
- void *data;
- bfd_size_type size;
- /* The actual window used by BFD. Small user-requested read-only
- regions sharing a page may share a single window into the object
- file. Read-write versions shouldn't until I've fixed things to
- keep track of which portions have been claimed by the
- application; don't want to give the same region back when the
- application wants two writable copies! */
- struct _bfd_window_internal *i;
-}
-bfd_window;
-
-extern void bfd_init_window
- (bfd_window *);
-extern void bfd_free_window
- (bfd_window *);
-extern bfd_boolean bfd_get_file_window
- (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean);
-
-/* XCOFF support routines for the linker. */
-
-extern bfd_boolean bfd_xcoff_split_import_path
- (bfd *, const char *, const char **, const char **);
-extern bfd_boolean bfd_xcoff_set_archive_import_path
- (struct bfd_link_info *, bfd *, const char *);
-extern bfd_boolean bfd_xcoff_link_record_set
- (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
-extern bfd_boolean bfd_xcoff_import_symbol
- (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
- const char *, const char *, const char *, unsigned int);
-extern bfd_boolean bfd_xcoff_export_symbol
- (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
-extern bfd_boolean bfd_xcoff_link_count_reloc
- (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_xcoff_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_xcoff_size_dynamic_sections
- (bfd *, struct bfd_link_info *, const char *, const char *,
- unsigned long, unsigned long, unsigned long, bfd_boolean,
- int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean);
-extern bfd_boolean bfd_xcoff_link_generate_rtinit
- (bfd *, const char *, const char *, bfd_boolean);
-
-/* XCOFF support routines for ar. */
-extern bfd_boolean bfd_xcoff_ar_archive_set_magic
- (bfd *, char *);
-
-/* Externally visible COFF routines. */
-
-#if defined(__STDC__) || defined(ALMOST_STDC)
-struct internal_syment;
-union internal_auxent;
-#endif
-
-extern bfd_boolean bfd_coff_set_symbol_class
- (bfd *, struct bfd_symbol *, unsigned int);
-
-/* ARM VFP11 erratum workaround support. */
-typedef enum
-{
- BFD_ARM_VFP11_FIX_DEFAULT,
- BFD_ARM_VFP11_FIX_NONE,
- BFD_ARM_VFP11_FIX_SCALAR,
- BFD_ARM_VFP11_FIX_VECTOR
-} bfd_arm_vfp11_fix;
-
-extern void bfd_elf32_arm_init_maps
- (bfd *);
-
-extern void bfd_elf32_arm_set_vfp11_fix
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_set_cortex_a8_fix
- (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_vfp11_fix_veneer_locations
- (bfd *, struct bfd_link_info *);
-
-/* ARM STM STM32L4XX erratum workaround support. */
-typedef enum
-{
- BFD_ARM_STM32L4XX_FIX_NONE,
- BFD_ARM_STM32L4XX_FIX_DEFAULT,
- BFD_ARM_STM32L4XX_FIX_ALL
-} bfd_arm_stm32l4xx_fix;
-
-extern void bfd_elf32_arm_set_stm32l4xx_fix
- (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations
- (bfd *, struct bfd_link_info *);
-
-/* ARM Interworking support. Called from linker. */
-extern bfd_boolean bfd_arm_allocate_interworking_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean bfd_arm_process_before_allocation
- (bfd *, struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_arm_get_bfd_for_interworking
- (bfd *, struct bfd_link_info *);
-
-/* PE ARM Interworking support. Called from linker. */
-extern bfd_boolean bfd_arm_pe_allocate_interworking_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean bfd_arm_pe_process_before_allocation
- (bfd *, struct bfd_link_info *, int);
-
-extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking
- (bfd *, struct bfd_link_info *);
-
-/* ELF ARM Interworking support. Called from linker. */
-extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_process_before_allocation
- (bfd *, struct bfd_link_info *);
-
-struct elf32_arm_params {
- char *thumb_entry_symbol;
- int byteswap_code;
- int target1_is_rel;
- char * target2_type;
- int fix_v4bx;
- int use_blx;
- bfd_arm_vfp11_fix vfp11_denorm_fix;
- bfd_arm_stm32l4xx_fix stm32l4xx_fix;
- int no_enum_size_warning;
- int no_wchar_size_warning;
- int pic_veneer;
- int fix_cortex_a8;
- int fix_arm1176;
- int merge_exidx_entries;
- int cmse_implib;
- bfd *in_implib_bfd;
-};
-
-void bfd_elf32_arm_set_target_params
- (bfd *, struct bfd_link_info *, struct elf32_arm_params *);
-
-extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
- (bfd *, struct bfd_link_info *);
-
-extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
- (bfd *, struct bfd_link_info *);
-
-extern void bfd_elf32_arm_keep_private_stub_output_sections
- (struct bfd_link_info *);
-
-/* ELF ARM mapping symbol support. */
-#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0)
-#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1)
-#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2)
-#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0)
-
-extern bfd_boolean bfd_is_arm_special_symbol_name
- (const char *, int);
-
-extern void bfd_elf32_arm_set_byteswap_code
- (struct bfd_link_info *, int);
-
-extern void bfd_elf32_arm_use_long_plt (void);
-
-/* ARM Note section processing. */
-extern bfd_boolean bfd_arm_merge_machines
- (bfd *, bfd *);
-
-extern bfd_boolean bfd_arm_update_notes
- (bfd *, const char *);
-
-extern unsigned int bfd_arm_get_mach_from_notes
- (bfd *, const char *);
-
-/* ARM stub generation support. Called from the linker. */
-extern int elf32_arm_setup_section_lists
- (bfd *, struct bfd_link_info *);
-extern void elf32_arm_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf32_arm_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *,
- struct bfd_section *, unsigned int),
- void (*) (void));
-extern bfd_boolean elf32_arm_build_stubs
- (struct bfd_link_info *);
-
-/* ARM unwind section editing support. */
-extern bfd_boolean elf32_arm_fix_exidx_coverage
-(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
-
-/* C6x unwind section editing support. */
-extern bfd_boolean elf32_tic6x_fix_exidx_coverage
-(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
-
-extern void bfd_elf64_aarch64_init_maps
- (bfd *);
-
-extern void bfd_elf32_aarch64_init_maps
- (bfd *);
-
-extern void bfd_elf64_aarch64_set_options
- (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
-
-extern void bfd_elf32_aarch64_set_options
- (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
-
-/* ELF AArch64 mapping symbol support. */
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0)
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1)
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2)
-#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0)
-extern bfd_boolean bfd_is_aarch64_special_symbol_name
- (const char * name, int type);
-
-/* AArch64 stub generation support for ELF64. Called from the linker. */
-extern int elf64_aarch64_setup_section_lists
- (bfd *, struct bfd_link_info *);
-extern void elf64_aarch64_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf64_aarch64_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *),
- void (*) (void));
-extern bfd_boolean elf64_aarch64_build_stubs
- (struct bfd_link_info *);
-/* AArch64 stub generation support for ELF32. Called from the linker. */
-extern int elf32_aarch64_setup_section_lists
- (bfd *, struct bfd_link_info *);
-extern void elf32_aarch64_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern bfd_boolean elf32_aarch64_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section * (*) (const char *, struct bfd_section *),
- void (*) (void));
-extern bfd_boolean elf32_aarch64_build_stubs
- (struct bfd_link_info *);
-
-
-/* TI COFF load page support. */
-extern void bfd_ticoff_set_section_load_page
- (struct bfd_section *, int);
-
-extern int bfd_ticoff_get_section_load_page
- (struct bfd_section *);
-
-/* H8/300 functions. */
-extern bfd_vma bfd_h8300_pad_address
- (bfd *, bfd_vma);
-
-/* IA64 Itanium code generation. Called from linker. */
-extern void bfd_elf32_ia64_after_parse
- (int);
-
-extern void bfd_elf64_ia64_after_parse
- (int);
-
-/* V850 Note manipulation routines. */
-extern bfd_boolean v850_elf_create_sections
- (struct bfd_link_info *);
-
-extern bfd_boolean v850_elf_set_note
- (bfd *, unsigned int, unsigned int);
-
-/* MIPS ABI flags data access. For the disassembler. */
-struct elf_internal_abiflags_v0;
-extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *);
-
-/* C-SKY functions. */
-extern bfd_boolean elf32_csky_build_stubs
- (struct bfd_link_info *);
-extern bfd_boolean elf32_csky_size_stubs
- (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- struct bfd_section *(*) (const char*, struct bfd_section*),
- void (*) (void));
-extern void elf32_csky_next_input_section
- (struct bfd_link_info *, struct bfd_section *);
-extern int elf32_csky_setup_section_lists
- (bfd *, struct bfd_link_info *);
-/* Extracted from init.c. */
-unsigned int bfd_init (void);
-
-
-/* Value returned by bfd_init. */
-
-#define BFD_INIT_MAGIC (sizeof (struct bfd_section))
-/* Extracted from opncls.c. */
-/* Set to N to open the next N BFDs using an alternate id space. */
-extern unsigned int bfd_use_reserved_id;
-bfd *bfd_fopen (const char *filename, const char *target,
- const char *mode, int fd);
-
-bfd *bfd_openr (const char *filename, const char *target);
-
-bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
-
-bfd *bfd_openstreamr (const char * filename, const char * target,
- void * stream);
-
-bfd *bfd_openr_iovec (const char *filename, const char *target,
- void *(*open_func) (struct bfd *nbfd,
- void *open_closure),
- void *open_closure,
- file_ptr (*pread_func) (struct bfd *nbfd,
- void *stream,
- void *buf,
- file_ptr nbytes,
- file_ptr offset),
- int (*close_func) (struct bfd *nbfd,
- void *stream),
- int (*stat_func) (struct bfd *abfd,
- void *stream,
- struct stat *sb));
-
-bfd *bfd_openw (const char *filename, const char *target);
-
-bfd_boolean bfd_close (bfd *abfd);
-
-bfd_boolean bfd_close_all_done (bfd *);
-
-bfd *bfd_create (const char *filename, bfd *templ);
-
-bfd_boolean bfd_make_writable (bfd *abfd);
-
-bfd_boolean bfd_make_readable (bfd *abfd);
-
-void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
-
-void *bfd_zalloc (bfd *abfd, bfd_size_type wanted);
-
-unsigned long bfd_calc_gnu_debuglink_crc32
- (unsigned long crc, const unsigned char *buf, bfd_size_type len);
-
-char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
-
-char *bfd_get_alt_debug_link_info (bfd * abfd,
- bfd_size_type *buildid_len,
- bfd_byte **buildid_out);
-
-char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
-
-char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir);
-
-struct bfd_section *bfd_create_gnu_debuglink_section
- (bfd *abfd, const char *filename);
-
-bfd_boolean bfd_fill_in_gnu_debuglink_section
- (bfd *abfd, struct bfd_section *sect, const char *filename);
-
-char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir);
-
-/* Extracted from libbfd.c. */
-
-/* Byte swapping macros for user section data. */
-
-#define bfd_put_8(abfd, val, ptr) \
- ((void) (*((unsigned char *) (ptr)) = (val) & 0xff))
-#define bfd_put_signed_8 \
- bfd_put_8
-#define bfd_get_8(abfd, ptr) \
- (*(const unsigned char *) (ptr) & 0xff)
-#define bfd_get_signed_8(abfd, ptr) \
- (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
-
-#define bfd_put_16(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
-#define bfd_put_signed_16 \
- bfd_put_16
-#define bfd_get_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx16, (ptr))
-#define bfd_get_signed_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
-
-#define bfd_put_24(abfd, val, ptr) \
- do \
- if (bfd_big_endian (abfd)) \
- bfd_putb24 ((val), (ptr)); \
- else \
- bfd_putl24 ((val), (ptr)); \
- while (0)
-
-bfd_vma bfd_getb24 (const void *p);
-bfd_vma bfd_getl24 (const void *p);
-
-#define bfd_get_24(abfd, ptr) \
- (bfd_big_endian (abfd) ? bfd_getb24 (ptr) : bfd_getl24 (ptr))
-
-#define bfd_put_32(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
-#define bfd_put_signed_32 \
- bfd_put_32
-#define bfd_get_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx32, (ptr))
-#define bfd_get_signed_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_32, (ptr))
-
-#define bfd_put_64(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx64, ((val), (ptr)))
-#define bfd_put_signed_64 \
- bfd_put_64
-#define bfd_get_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx64, (ptr))
-#define bfd_get_signed_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
-
-#define bfd_get(bits, abfd, ptr) \
- ((bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr) \
- : (bits) == 16 ? bfd_get_16 (abfd, ptr) \
- : (bits) == 32 ? bfd_get_32 (abfd, ptr) \
- : (bits) == 64 ? bfd_get_64 (abfd, ptr) \
- : (abort (), (bfd_vma) - 1))
-
-#define bfd_put(bits, abfd, val, ptr) \
- ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
- : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
- : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
- : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
- : (abort (), (void) 0))
-
-
-/* Byte swapping macros for file header data. */
-
-#define bfd_h_put_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
-#define bfd_h_put_signed_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
-#define bfd_h_get_8(abfd, ptr) \
- bfd_get_8 (abfd, ptr)
-#define bfd_h_get_signed_8(abfd, ptr) \
- bfd_get_signed_8 (abfd, ptr)
-
-#define bfd_h_put_16(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
-#define bfd_h_put_signed_16 \
- bfd_h_put_16
-#define bfd_h_get_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx16, (ptr))
-#define bfd_h_get_signed_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
-
-#define bfd_h_put_32(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
-#define bfd_h_put_signed_32 \
- bfd_h_put_32
-#define bfd_h_get_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx32, (ptr))
-#define bfd_h_get_signed_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
-
-#define bfd_h_put_64(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
-#define bfd_h_put_signed_64 \
- bfd_h_put_64
-#define bfd_h_get_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx64, (ptr))
-#define bfd_h_get_signed_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
-
-/* Aliases for the above, which should eventually go away. */
-
-#define H_PUT_64 bfd_h_put_64
-#define H_PUT_32 bfd_h_put_32
-#define H_PUT_16 bfd_h_put_16
-#define H_PUT_8 bfd_h_put_8
-#define H_PUT_S64 bfd_h_put_signed_64
-#define H_PUT_S32 bfd_h_put_signed_32
-#define H_PUT_S16 bfd_h_put_signed_16
-#define H_PUT_S8 bfd_h_put_signed_8
-#define H_GET_64 bfd_h_get_64
-#define H_GET_32 bfd_h_get_32
-#define H_GET_16 bfd_h_get_16
-#define H_GET_8 bfd_h_get_8
-#define H_GET_S64 bfd_h_get_signed_64
-#define H_GET_S32 bfd_h_get_signed_32
-#define H_GET_S16 bfd_h_get_signed_16
-#define H_GET_S8 bfd_h_get_signed_8
-
-
-/* Extracted from bfdio.c. */
-long bfd_get_mtime (bfd *abfd);
-
-ufile_ptr bfd_get_size (bfd *abfd);
-
-ufile_ptr bfd_get_file_size (bfd *abfd);
-
-void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
- int prot, int flags, file_ptr offset,
- void **map_addr, bfd_size_type *map_len);
-
-/* Extracted from bfdwin.c. */
-/* Extracted from section.c. */
-
-typedef struct bfd_section
-{
- /* The name of the section; the name isn't a copy, the pointer is
- the same as that passed to bfd_make_section. */
- const char *name;
-
- /* A unique sequence number. */
- unsigned int id;
-
- /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
- unsigned int index;
-
- /* The next section in the list belonging to the BFD, or NULL. */
- struct bfd_section *next;
-
- /* The previous section in the list belonging to the BFD, or NULL. */
- struct bfd_section *prev;
-
- /* The field flags contains attributes of the section. Some
- flags are read in from the object file, and some are
- synthesized from other information. */
- flagword flags;
-
-#define SEC_NO_FLAGS 0x0
-
- /* Tells the OS to allocate space for this section when loading.
- This is clear for a section containing debug information only. */
-#define SEC_ALLOC 0x1
-
- /* Tells the OS to load the section from the file when loading.
- This is clear for a .bss section. */
-#define SEC_LOAD 0x2
-
- /* The section contains data still to be relocated, so there is
- some relocation information too. */
-#define SEC_RELOC 0x4
-
- /* A signal to the OS that the section contains read only data. */
-#define SEC_READONLY 0x8
-
- /* The section contains code only. */
-#define SEC_CODE 0x10
-
- /* The section contains data only. */
-#define SEC_DATA 0x20
-
- /* The section will reside in ROM. */
-#define SEC_ROM 0x40
-
- /* The section contains constructor information. This section
- type is used by the linker to create lists of constructors and
- destructors used by <>. When a back end sees a symbol
- which should be used in a constructor list, it creates a new
- section for the type of name (e.g., <<__CTOR_LIST__>>), attaches
- the symbol to it, and builds a relocation. To build the lists
- of constructors, all the linker has to do is catenate all the
- sections called <<__CTOR_LIST__>> and relocate the data
- contained within - exactly the operations it would peform on
- standard data. */
-#define SEC_CONSTRUCTOR 0x80
-
- /* The section has contents - a data section could be
- <> | <>; a debug section could be
- <> */
-#define SEC_HAS_CONTENTS 0x100
-
- /* An instruction to the linker to not output the section
- even if it has information which would normally be written. */
-#define SEC_NEVER_LOAD 0x200
-
- /* The section contains thread local data. */
-#define SEC_THREAD_LOCAL 0x400
-
- /* The section's size is fixed. Generic linker code will not
- recalculate it and it is up to whoever has set this flag to
- get the size right. */
-#define SEC_FIXED_SIZE 0x800
-
- /* The section contains common symbols (symbols may be defined
- multiple times, the value of a symbol is the amount of
- space it requires, and the largest symbol value is the one
- used). Most targets have exactly one of these (which we
- translate to bfd_com_section_ptr), but ECOFF has two. */
-#define SEC_IS_COMMON 0x1000
-
- /* The section contains only debugging information. For
- example, this is set for ELF .debug and .stab sections.
- strip tests this flag to see if a section can be
- discarded. */
-#define SEC_DEBUGGING 0x2000
-
- /* The contents of this section are held in memory pointed to
- by the contents field. This is checked by bfd_get_section_contents,
- and the data is retrieved from memory if appropriate. */
-#define SEC_IN_MEMORY 0x4000
-
- /* The contents of this section are to be excluded by the
- linker for executable and shared objects unless those
- objects are to be further relocated. */
-#define SEC_EXCLUDE 0x8000
-
- /* The contents of this section are to be sorted based on the sum of
- the symbol and addend values specified by the associated relocation
- entries. Entries without associated relocation entries will be
- appended to the end of the section in an unspecified order. */
-#define SEC_SORT_ENTRIES 0x10000
-
- /* When linking, duplicate sections of the same name should be
- discarded, rather than being combined into a single section as
- is usually done. This is similar to how common symbols are
- handled. See SEC_LINK_DUPLICATES below. */
-#define SEC_LINK_ONCE 0x20000
-
- /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
- should handle duplicate sections. */
-#define SEC_LINK_DUPLICATES 0xc0000
-
- /* This value for SEC_LINK_DUPLICATES means that duplicate
- sections with the same name should simply be discarded. */
-#define SEC_LINK_DUPLICATES_DISCARD 0x0
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if there are any duplicate sections, although
- it should still only link one copy. */
-#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections are a different size. */
-#define SEC_LINK_DUPLICATES_SAME_SIZE 0x80000
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections contain different
- contents. */
-#define SEC_LINK_DUPLICATES_SAME_CONTENTS \
- (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
-
- /* This section was created by the linker as part of dynamic
- relocation or other arcane processing. It is skipped when
- going through the first-pass output, trusting that someone
- else up the line will take care of it later. */
-#define SEC_LINKER_CREATED 0x100000
-
- /* This section should not be subject to garbage collection.
- Also set to inform the linker that this section should not be
- listed in the link map as discarded. */
-#define SEC_KEEP 0x200000
-
- /* This section contains "short" data, and should be placed
- "near" the GP. */
-#define SEC_SMALL_DATA 0x400000
-
- /* Attempt to merge identical entities in the section.
- Entity size is given in the entsize field. */
-#define SEC_MERGE 0x800000
-
- /* If given with SEC_MERGE, entities to merge are zero terminated
- strings where entsize specifies character size instead of fixed
- size entries. */
-#define SEC_STRINGS 0x1000000
-
- /* This section contains data about section groups. */
-#define SEC_GROUP 0x2000000
-
- /* The section is a COFF shared library section. This flag is
- only for the linker. If this type of section appears in
- the input file, the linker must copy it to the output file
- without changing the vma or size. FIXME: Although this
- was originally intended to be general, it really is COFF
- specific (and the flag was renamed to indicate this). It
- might be cleaner to have some more general mechanism to
- allow the back end to control what the linker does with
- sections. */
-#define SEC_COFF_SHARED_LIBRARY 0x4000000
-
- /* This input section should be copied to output in reverse order
- as an array of pointers. This is for ELF linker internal use
- only. */
-#define SEC_ELF_REVERSE_COPY 0x4000000
-
- /* This section contains data which may be shared with other
- executables or shared objects. This is for COFF only. */
-#define SEC_COFF_SHARED 0x8000000
-
- /* This section should be compressed. This is for ELF linker
- internal use only. */
-#define SEC_ELF_COMPRESS 0x8000000
-
- /* When a section with this flag is being linked, then if the size of
- the input section is less than a page, it should not cross a page
- boundary. If the size of the input section is one page or more,
- it should be aligned on a page boundary. This is for TI
- TMS320C54X only. */
-#define SEC_TIC54X_BLOCK 0x10000000
-
- /* This section should be renamed. This is for ELF linker
- internal use only. */
-#define SEC_ELF_RENAME 0x10000000
-
- /* Conditionally link this section; do not link if there are no
- references found to any symbol in the section. This is for TI
- TMS320C54X only. */
-#define SEC_TIC54X_CLINK 0x20000000
-
- /* This section contains vliw code. This is for Toshiba MeP only. */
-#define SEC_MEP_VLIW 0x20000000
-
- /* Indicate that section has the no read flag set. This happens
- when memory read flag isn't set. */
-#define SEC_COFF_NOREAD 0x40000000
-
- /* Indicate that section has the purecode flag set. */
-#define SEC_ELF_PURECODE 0x80000000
-
- /* End of section flags. */
-
- /* Some internal packed boolean fields. */
-
- /* See the vma field. */
- unsigned int user_set_vma : 1;
-
- /* A mark flag used by some of the linker backends. */
- unsigned int linker_mark : 1;
-
- /* Another mark flag used by some of the linker backends. Set for
- output sections that have an input section. */
- unsigned int linker_has_input : 1;
-
- /* Mark flag used by some linker backends for garbage collection. */
- unsigned int gc_mark : 1;
-
- /* Section compression status. */
- unsigned int compress_status : 2;
-#define COMPRESS_SECTION_NONE 0
-#define COMPRESS_SECTION_DONE 1
-#define DECOMPRESS_SECTION_SIZED 2
-
- /* The following flags are used by the ELF linker. */
-
- /* Mark sections which have been allocated to segments. */
- unsigned int segment_mark : 1;
-
- /* Type of sec_info information. */
- unsigned int sec_info_type:3;
-#define SEC_INFO_TYPE_NONE 0
-#define SEC_INFO_TYPE_STABS 1
-#define SEC_INFO_TYPE_MERGE 2
-#define SEC_INFO_TYPE_EH_FRAME 3
-#define SEC_INFO_TYPE_JUST_SYMS 4
-#define SEC_INFO_TYPE_TARGET 5
-#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6
-
- /* Nonzero if this section uses RELA relocations, rather than REL. */
- unsigned int use_rela_p:1;
-
- /* Bits used by various backends. The generic code doesn't touch
- these fields. */
-
- unsigned int sec_flg0:1;
- unsigned int sec_flg1:1;
- unsigned int sec_flg2:1;
- unsigned int sec_flg3:1;
- unsigned int sec_flg4:1;
- unsigned int sec_flg5:1;
-
- /* End of internal packed boolean fields. */
-
- /* The virtual memory address of the section - where it will be
- at run time. The symbols are relocated against this. The
- user_set_vma flag is maintained by bfd; if it's not set, the
- backend can assign addresses (for example, in <>, where
- the default address for <<.data>> is dependent on the specific
- target and various flags). */
- bfd_vma vma;
-
- /* The load address of the section - where it would be in a
- rom image; really only used for writing section header
- information. */
- bfd_vma lma;
-
- /* The size of the section in *octets*, as it will be output.
- Contains a value even if the section has no contents (e.g., the
- size of <<.bss>>). */
- bfd_size_type size;
-
- /* For input sections, the original size on disk of the section, in
- octets. This field should be set for any section whose size is
- changed by linker relaxation. It is required for sections where
- the linker relaxation scheme doesn't cache altered section and
- reloc contents (stabs, eh_frame, SEC_MERGE, some coff relaxing
- targets), and thus the original size needs to be kept to read the
- section multiple times. For output sections, rawsize holds the
- section size calculated on a previous linker relaxation pass. */
- bfd_size_type rawsize;
-
- /* The compressed size of the section in octets. */
- bfd_size_type compressed_size;
-
- /* Relaxation table. */
- struct relax_table *relax;
-
- /* Count of used relaxation table entries. */
- int relax_count;
-
-
- /* If this section is going to be output, then this value is the
- offset in *bytes* into the output section of the first byte in the
- input section (byte ==> smallest addressable unit on the
- target). In most cases, if this was going to start at the
- 100th octet (8-bit quantity) in the output section, this value
- would be 100. However, if the target byte size is 16 bits
- (bfd_octets_per_byte is "2"), this value would be 50. */
- bfd_vma output_offset;
-
- /* The output section through which to map on output. */
- struct bfd_section *output_section;
-
- /* The alignment requirement of the section, as an exponent of 2 -
- e.g., 3 aligns to 2^3 (or 8). */
- unsigned int alignment_power;
-
- /* If an input section, a pointer to a vector of relocation
- records for the data in this section. */
- struct reloc_cache_entry *relocation;
-
- /* If an output section, a pointer to a vector of pointers to
- relocation records for the data in this section. */
- struct reloc_cache_entry **orelocation;
-
- /* The number of relocation records in one of the above. */
- unsigned reloc_count;
-
- /* Information below is back end specific - and not always used
- or updated. */
-
- /* File position of section data. */
- file_ptr filepos;
-
- /* File position of relocation info. */
- file_ptr rel_filepos;
-
- /* File position of line data. */
- file_ptr line_filepos;
-
- /* Pointer to data for applications. */
- void *userdata;
-
- /* If the SEC_IN_MEMORY flag is set, this points to the actual
- contents. */
- unsigned char *contents;
-
- /* Attached line number information. */
- alent *lineno;
-
- /* Number of line number records. */
- unsigned int lineno_count;
-
- /* Entity size for merging purposes. */
- unsigned int entsize;
-
- /* Points to the kept section if this section is a link-once section,
- and is discarded. */
- struct bfd_section *kept_section;
-
- /* When a section is being output, this value changes as more
- linenumbers are written out. */
- file_ptr moving_line_filepos;
-
- /* What the section number is in the target world. */
- int target_index;
-
- void *used_by_bfd;
-
- /* If this is a constructor section then here is a list of the
- relocations created to relocate items within it. */
- struct relent_chain *constructor_chain;
-
- /* The BFD which owns the section. */
- bfd *owner;
-
- /* A symbol which points at this section only. */
- struct bfd_symbol *symbol;
- struct bfd_symbol **symbol_ptr_ptr;
-
- /* Early in the link process, map_head and map_tail are used to build
- a list of input sections attached to an output section. Later,
- output sections use these fields for a list of bfd_link_order
- structs. */
- union {
- struct bfd_link_order *link_order;
- struct bfd_section *s;
- } map_head, map_tail;
-} asection;
-
-/* Relax table contains information about instructions which can
- be removed by relaxation -- replacing a long address with a
- short address. */
-struct relax_table {
- /* Address where bytes may be deleted. */
- bfd_vma addr;
-
- /* Number of bytes to be deleted. */
- int size;
-};
-
-/* Note: the following are provided as inline functions rather than macros
- because not all callers use the return value. A macro implementation
- would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
- compilers will complain about comma expressions that have no effect. */
-static inline bfd_boolean
-bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr,
- void * val)
-{
- ptr->userdata = val;
- return TRUE;
-}
-
-static inline bfd_boolean
-bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
-{
- ptr->vma = ptr->lma = val;
- ptr->user_set_vma = TRUE;
- return TRUE;
-}
-
-static inline bfd_boolean
-bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr,
- unsigned int val)
-{
- ptr->alignment_power = val;
- return TRUE;
-}
-
-/* These sections are global, and are managed by BFD. The application
- and target back end are not permitted to change the values in
- these sections. */
-extern asection _bfd_std_section[4];
-
-#define BFD_ABS_SECTION_NAME "*ABS*"
-#define BFD_UND_SECTION_NAME "*UND*"
-#define BFD_COM_SECTION_NAME "*COM*"
-#define BFD_IND_SECTION_NAME "*IND*"
-
-/* Pointer to the common section. */
-#define bfd_com_section_ptr (&_bfd_std_section[0])
-/* Pointer to the undefined section. */
-#define bfd_und_section_ptr (&_bfd_std_section[1])
-/* Pointer to the absolute section. */
-#define bfd_abs_section_ptr (&_bfd_std_section[2])
-/* Pointer to the indirect section. */
-#define bfd_ind_section_ptr (&_bfd_std_section[3])
-
-#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
-#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
-#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
-
-#define bfd_is_const_section(SEC) \
- ( ((SEC) == bfd_abs_section_ptr) \
- || ((SEC) == bfd_und_section_ptr) \
- || ((SEC) == bfd_com_section_ptr) \
- || ((SEC) == bfd_ind_section_ptr))
-
-/* Macros to handle insertion and deletion of a bfd's sections. These
- only handle the list pointers, ie. do not adjust section_count,
- target_index etc. */
-#define bfd_section_list_remove(ABFD, S) \
- do \
- { \
- asection *_s = S; \
- asection *_next = _s->next; \
- asection *_prev = _s->prev; \
- if (_prev) \
- _prev->next = _next; \
- else \
- (ABFD)->sections = _next; \
- if (_next) \
- _next->prev = _prev; \
- else \
- (ABFD)->section_last = _prev; \
- } \
- while (0)
-#define bfd_section_list_append(ABFD, S) \
- do \
- { \
- asection *_s = S; \
- bfd *_abfd = ABFD; \
- _s->next = NULL; \
- if (_abfd->section_last) \
- { \
- _s->prev = _abfd->section_last; \
- _abfd->section_last->next = _s; \
- } \
- else \
- { \
- _s->prev = NULL; \
- _abfd->sections = _s; \
- } \
- _abfd->section_last = _s; \
- } \
- while (0)
-#define bfd_section_list_prepend(ABFD, S) \
- do \
- { \
- asection *_s = S; \
- bfd *_abfd = ABFD; \
- _s->prev = NULL; \
- if (_abfd->sections) \
- { \
- _s->next = _abfd->sections; \
- _abfd->sections->prev = _s; \
- } \
- else \
- { \
- _s->next = NULL; \
- _abfd->section_last = _s; \
- } \
- _abfd->sections = _s; \
- } \
- while (0)
-#define bfd_section_list_insert_after(ABFD, A, S) \
- do \
- { \
- asection *_a = A; \
- asection *_s = S; \
- asection *_next = _a->next; \
- _s->next = _next; \
- _s->prev = _a; \
- _a->next = _s; \
- if (_next) \
- _next->prev = _s; \
- else \
- (ABFD)->section_last = _s; \
- } \
- while (0)
-#define bfd_section_list_insert_before(ABFD, B, S) \
- do \
- { \
- asection *_b = B; \
- asection *_s = S; \
- asection *_prev = _b->prev; \
- _s->prev = _prev; \
- _s->next = _b; \
- _b->prev = _s; \
- if (_prev) \
- _prev->next = _s; \
- else \
- (ABFD)->sections = _s; \
- } \
- while (0)
-#define bfd_section_removed_from_list(ABFD, S) \
- ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
-
-#define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS) \
- /* name, id, index, next, prev, flags, user_set_vma, */ \
- { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \
- \
- /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \
- 0, 0, 1, 0, \
- \
- /* segment_mark, sec_info_type, use_rela_p, */ \
- 0, 0, 0, \
- \
- /* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5, */ \
- 0, 0, 0, 0, 0, 0, \
- \
- /* vma, lma, size, rawsize, compressed_size, relax, relax_count, */ \
- 0, 0, 0, 0, 0, 0, 0, \
- \
- /* output_offset, output_section, alignment_power, */ \
- 0, &SEC, 0, \
- \
- /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
- NULL, NULL, 0, 0, 0, \
- \
- /* line_filepos, userdata, contents, lineno, lineno_count, */ \
- 0, NULL, NULL, NULL, 0, \
- \
- /* entsize, kept_section, moving_line_filepos, */ \
- 0, NULL, 0, \
- \
- /* target_index, used_by_bfd, constructor_chain, owner, */ \
- 0, NULL, NULL, NULL, \
- \
- /* symbol, symbol_ptr_ptr, */ \
- (struct bfd_symbol *) SYM, &SEC.symbol, \
- \
- /* map_head, map_tail */ \
- { NULL }, { NULL } \
- }
-
-/* We use a macro to initialize the static asymbol structures because
- traditional C does not permit us to initialize a union member while
- gcc warns if we don't initialize it.
- the_bfd, name, value, attr, section [, udata] */
-#ifdef __STDC__
-#define GLOBAL_SYM_INIT(NAME, SECTION) \
- { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }}
-#else
-#define GLOBAL_SYM_INIT(NAME, SECTION) \
- { 0, NAME, 0, BSF_SECTION_SYM, SECTION }
-#endif
-
-void bfd_section_list_clear (bfd *);
-
-asection *bfd_get_section_by_name (bfd *abfd, const char *name);
-
-asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec);
-
-asection *bfd_get_linker_section (bfd *abfd, const char *name);
-
-asection *bfd_get_section_by_name_if
- (bfd *abfd,
- const char *name,
- bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-
-char *bfd_get_unique_section_name
- (bfd *abfd, const char *templat, int *count);
-
-asection *bfd_make_section_old_way (bfd *abfd, const char *name);
-
-asection *bfd_make_section_anyway_with_flags
- (bfd *abfd, const char *name, flagword flags);
-
-asection *bfd_make_section_anyway (bfd *abfd, const char *name);
-
-asection *bfd_make_section_with_flags
- (bfd *, const char *name, flagword flags);
-
-asection *bfd_make_section (bfd *, const char *name);
-
-bfd_boolean bfd_set_section_flags
- (bfd *abfd, asection *sec, flagword flags);
-
-void bfd_rename_section
- (bfd *abfd, asection *sec, const char *newname);
-
-void bfd_map_over_sections
- (bfd *abfd,
- void (*func) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-
-asection *bfd_sections_find_if
- (bfd *abfd,
- bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-
-bfd_boolean bfd_set_section_size
- (bfd *abfd, asection *sec, bfd_size_type val);
-
-bfd_boolean bfd_set_section_contents
- (bfd *abfd, asection *section, const void *data,
- file_ptr offset, bfd_size_type count);
-
-bfd_boolean bfd_get_section_contents
- (bfd *abfd, asection *section, void *location, file_ptr offset,
- bfd_size_type count);
-
-bfd_boolean bfd_malloc_and_get_section
- (bfd *abfd, asection *section, bfd_byte **buf);
-
-bfd_boolean bfd_copy_private_section_data
- (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
-
-#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
- BFD_SEND (obfd, _bfd_copy_private_section_data, \
- (ibfd, isection, obfd, osection))
-bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
-
-bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
-
-/* Extracted from archures.c. */
-enum bfd_architecture
-{
- bfd_arch_unknown, /* File arch not known. */
- bfd_arch_obscure, /* Arch known, not one of these. */
- bfd_arch_m68k, /* Motorola 68xxx. */
-#define bfd_mach_m68000 1
-#define bfd_mach_m68008 2
-#define bfd_mach_m68010 3
-#define bfd_mach_m68020 4
-#define bfd_mach_m68030 5
-#define bfd_mach_m68040 6
-#define bfd_mach_m68060 7
-#define bfd_mach_cpu32 8
-#define bfd_mach_fido 9
-#define bfd_mach_mcf_isa_a_nodiv 10
-#define bfd_mach_mcf_isa_a 11
-#define bfd_mach_mcf_isa_a_mac 12
-#define bfd_mach_mcf_isa_a_emac 13
-#define bfd_mach_mcf_isa_aplus 14
-#define bfd_mach_mcf_isa_aplus_mac 15
-#define bfd_mach_mcf_isa_aplus_emac 16
-#define bfd_mach_mcf_isa_b_nousp 17
-#define bfd_mach_mcf_isa_b_nousp_mac 18
-#define bfd_mach_mcf_isa_b_nousp_emac 19
-#define bfd_mach_mcf_isa_b 20
-#define bfd_mach_mcf_isa_b_mac 21
-#define bfd_mach_mcf_isa_b_emac 22
-#define bfd_mach_mcf_isa_b_float 23
-#define bfd_mach_mcf_isa_b_float_mac 24
-#define bfd_mach_mcf_isa_b_float_emac 25
-#define bfd_mach_mcf_isa_c 26
-#define bfd_mach_mcf_isa_c_mac 27
-#define bfd_mach_mcf_isa_c_emac 28
-#define bfd_mach_mcf_isa_c_nodiv 29
-#define bfd_mach_mcf_isa_c_nodiv_mac 30
-#define bfd_mach_mcf_isa_c_nodiv_emac 31
- bfd_arch_vax, /* DEC Vax. */
-
- bfd_arch_or1k, /* OpenRISC 1000. */
-#define bfd_mach_or1k 1
-#define bfd_mach_or1knd 2
-
- bfd_arch_sparc, /* SPARC. */
-#define bfd_mach_sparc 1
-/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
-#define bfd_mach_sparc_sparclet 2
-#define bfd_mach_sparc_sparclite 3
-#define bfd_mach_sparc_v8plus 4
-#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */
-#define bfd_mach_sparc_sparclite_le 6
-#define bfd_mach_sparc_v9 7
-#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */
-#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */
-#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */
-#define bfd_mach_sparc_v8plusc 11 /* with UA2005 and T1 add'ns. */
-#define bfd_mach_sparc_v9c 12 /* with UA2005 and T1 add'ns. */
-#define bfd_mach_sparc_v8plusd 13 /* with UA2007 and T3 add'ns. */
-#define bfd_mach_sparc_v9d 14 /* with UA2007 and T3 add'ns. */
-#define bfd_mach_sparc_v8pluse 15 /* with OSA2001 and T4 add'ns (no IMA). */
-#define bfd_mach_sparc_v9e 16 /* with OSA2001 and T4 add'ns (no IMA). */
-#define bfd_mach_sparc_v8plusv 17 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
-#define bfd_mach_sparc_v9v 18 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
-#define bfd_mach_sparc_v8plusm 19 /* with OSA2015 and M7 add'ns. */
-#define bfd_mach_sparc_v9m 20 /* with OSA2015 and M7 add'ns. */
-#define bfd_mach_sparc_v8plusm8 21 /* with OSA2017 and M8 add'ns. */
-#define bfd_mach_sparc_v9m8 22 /* with OSA2017 and M8 add'ns. */
-/* Nonzero if MACH has the v9 instruction set. */
-#define bfd_mach_sparc_v9_p(mach) \
- ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9m8 \
- && (mach) != bfd_mach_sparc_sparclite_le)
-/* Nonzero if MACH is a 64 bit sparc architecture. */
-#define bfd_mach_sparc_64bit_p(mach) \
- ((mach) >= bfd_mach_sparc_v9 \
- && (mach) != bfd_mach_sparc_v8plusb \
- && (mach) != bfd_mach_sparc_v8plusc \
- && (mach) != bfd_mach_sparc_v8plusd \
- && (mach) != bfd_mach_sparc_v8pluse \
- && (mach) != bfd_mach_sparc_v8plusv \
- && (mach) != bfd_mach_sparc_v8plusm \
- && (mach) != bfd_mach_sparc_v8plusm8)
- bfd_arch_spu, /* PowerPC SPU. */
-#define bfd_mach_spu 256
- bfd_arch_mips, /* MIPS Rxxxx. */
-#define bfd_mach_mips3000 3000
-#define bfd_mach_mips3900 3900
-#define bfd_mach_mips4000 4000
-#define bfd_mach_mips4010 4010
-#define bfd_mach_mips4100 4100
-#define bfd_mach_mips4111 4111
-#define bfd_mach_mips4120 4120
-#define bfd_mach_mips4300 4300
-#define bfd_mach_mips4400 4400
-#define bfd_mach_mips4600 4600
-#define bfd_mach_mips4650 4650
-#define bfd_mach_mips5000 5000
-#define bfd_mach_mips5400 5400
-#define bfd_mach_mips5500 5500
-#define bfd_mach_mips5900 5900
-#define bfd_mach_mips6000 6000
-#define bfd_mach_mips7000 7000
-#define bfd_mach_mips8000 8000
-#define bfd_mach_mips9000 9000
-#define bfd_mach_mips10000 10000
-#define bfd_mach_mips12000 12000
-#define bfd_mach_mips14000 14000
-#define bfd_mach_mips16000 16000
-#define bfd_mach_mips16 16
-#define bfd_mach_mips5 5
-#define bfd_mach_mips_loongson_2e 3001
-#define bfd_mach_mips_loongson_2f 3002
-#define bfd_mach_mips_gs464 3003
-#define bfd_mach_mips_gs464e 3004
-#define bfd_mach_mips_gs264e 3005
-#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01. */
-#define bfd_mach_mips_octeon 6501
-#define bfd_mach_mips_octeonp 6601
-#define bfd_mach_mips_octeon2 6502
-#define bfd_mach_mips_octeon3 6503
-#define bfd_mach_mips_xlr 887682 /* decimal 'XLR'. */
-#define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2'. */
-#define bfd_mach_mipsisa32 32
-#define bfd_mach_mipsisa32r2 33
-#define bfd_mach_mipsisa32r3 34
-#define bfd_mach_mipsisa32r5 36
-#define bfd_mach_mipsisa32r6 37
-#define bfd_mach_mipsisa64 64
-#define bfd_mach_mipsisa64r2 65
-#define bfd_mach_mipsisa64r3 66
-#define bfd_mach_mipsisa64r5 68
-#define bfd_mach_mipsisa64r6 69
-#define bfd_mach_mips_micromips 96
- bfd_arch_i386, /* Intel 386. */
-#define bfd_mach_i386_intel_syntax (1 << 0)
-#define bfd_mach_i386_i8086 (1 << 1)
-#define bfd_mach_i386_i386 (1 << 2)
-#define bfd_mach_x86_64 (1 << 3)
-#define bfd_mach_x64_32 (1 << 4)
-#define bfd_mach_i386_i386_intel_syntax (bfd_mach_i386_i386 | bfd_mach_i386_intel_syntax)
-#define bfd_mach_x86_64_intel_syntax (bfd_mach_x86_64 | bfd_mach_i386_intel_syntax)
-#define bfd_mach_x64_32_intel_syntax (bfd_mach_x64_32 | bfd_mach_i386_intel_syntax)
- bfd_arch_l1om, /* Intel L1OM. */
-#define bfd_mach_l1om (1 << 5)
-#define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax)
- bfd_arch_k1om, /* Intel K1OM. */
-#define bfd_mach_k1om (1 << 6)
-#define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax)
-#define bfd_mach_i386_nacl (1 << 7)
-#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl)
-#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl)
-#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl)
- bfd_arch_iamcu, /* Intel MCU. */
-#define bfd_mach_iamcu (1 << 8)
-#define bfd_mach_i386_iamcu (bfd_mach_i386_i386 | bfd_mach_iamcu)
-#define bfd_mach_i386_iamcu_intel_syntax (bfd_mach_i386_iamcu | bfd_mach_i386_intel_syntax)
- bfd_arch_romp, /* IBM ROMP PC/RT. */
- bfd_arch_convex, /* Convex. */
- bfd_arch_m98k, /* Motorola 98xxx. */
- bfd_arch_pyramid, /* Pyramid Technology. */
- bfd_arch_h8300, /* Renesas H8/300 (formerly Hitachi H8/300). */
-#define bfd_mach_h8300 1
-#define bfd_mach_h8300h 2
-#define bfd_mach_h8300s 3
-#define bfd_mach_h8300hn 4
-#define bfd_mach_h8300sn 5
-#define bfd_mach_h8300sx 6
-#define bfd_mach_h8300sxn 7
- bfd_arch_pdp11, /* DEC PDP-11. */
- bfd_arch_plugin,
- bfd_arch_powerpc, /* PowerPC. */
-#define bfd_mach_ppc 32
-#define bfd_mach_ppc64 64
-#define bfd_mach_ppc_403 403
-#define bfd_mach_ppc_403gc 4030
-#define bfd_mach_ppc_405 405
-#define bfd_mach_ppc_505 505
-#define bfd_mach_ppc_601 601
-#define bfd_mach_ppc_602 602
-#define bfd_mach_ppc_603 603
-#define bfd_mach_ppc_ec603e 6031
-#define bfd_mach_ppc_604 604
-#define bfd_mach_ppc_620 620
-#define bfd_mach_ppc_630 630
-#define bfd_mach_ppc_750 750
-#define bfd_mach_ppc_860 860
-#define bfd_mach_ppc_a35 35
-#define bfd_mach_ppc_rs64ii 642
-#define bfd_mach_ppc_rs64iii 643
-#define bfd_mach_ppc_7400 7400
-#define bfd_mach_ppc_e500 500
-#define bfd_mach_ppc_e500mc 5001
-#define bfd_mach_ppc_e500mc64 5005
-#define bfd_mach_ppc_e5500 5006
-#define bfd_mach_ppc_e6500 5007
-#define bfd_mach_ppc_titan 83
-#define bfd_mach_ppc_vle 84
- bfd_arch_rs6000, /* IBM RS/6000. */
-#define bfd_mach_rs6k 6000
-#define bfd_mach_rs6k_rs1 6001
-#define bfd_mach_rs6k_rsc 6003
-#define bfd_mach_rs6k_rs2 6002
- bfd_arch_hppa, /* HP PA RISC. */
-#define bfd_mach_hppa10 10
-#define bfd_mach_hppa11 11
-#define bfd_mach_hppa20 20
-#define bfd_mach_hppa20w 25
- bfd_arch_d10v, /* Mitsubishi D10V. */
-#define bfd_mach_d10v 1
-#define bfd_mach_d10v_ts2 2
-#define bfd_mach_d10v_ts3 3
- bfd_arch_d30v, /* Mitsubishi D30V. */
- bfd_arch_dlx, /* DLX. */
- bfd_arch_m68hc11, /* Motorola 68HC11. */
- bfd_arch_m68hc12, /* Motorola 68HC12. */
-#define bfd_mach_m6812_default 0
-#define bfd_mach_m6812 1
-#define bfd_mach_m6812s 2
- bfd_arch_m9s12x, /* Freescale S12X. */
- bfd_arch_m9s12xg, /* Freescale XGATE. */
- bfd_arch_s12z, /* Freescale S12Z. */
-#define bfd_mach_s12z_default 0
- bfd_arch_z8k, /* Zilog Z8000. */
-#define bfd_mach_z8001 1
-#define bfd_mach_z8002 2
- bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */
-#define bfd_mach_sh 1
-#define bfd_mach_sh2 0x20
-#define bfd_mach_sh_dsp 0x2d
-#define bfd_mach_sh2a 0x2a
-#define bfd_mach_sh2a_nofpu 0x2b
-#define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
-#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2
-#define bfd_mach_sh2a_or_sh4 0x2a3
-#define bfd_mach_sh2a_or_sh3e 0x2a4
-#define bfd_mach_sh2e 0x2e
-#define bfd_mach_sh3 0x30
-#define bfd_mach_sh3_nommu 0x31
-#define bfd_mach_sh3_dsp 0x3d
-#define bfd_mach_sh3e 0x3e
-#define bfd_mach_sh4 0x40
-#define bfd_mach_sh4_nofpu 0x41
-#define bfd_mach_sh4_nommu_nofpu 0x42
-#define bfd_mach_sh4a 0x4a
-#define bfd_mach_sh4a_nofpu 0x4b
-#define bfd_mach_sh4al_dsp 0x4d
- bfd_arch_alpha, /* Dec Alpha. */
-#define bfd_mach_alpha_ev4 0x10
-#define bfd_mach_alpha_ev5 0x20
-#define bfd_mach_alpha_ev6 0x30
- bfd_arch_arm, /* Advanced Risc Machines ARM. */
-#define bfd_mach_arm_unknown 0
-#define bfd_mach_arm_2 1
-#define bfd_mach_arm_2a 2
-#define bfd_mach_arm_3 3
-#define bfd_mach_arm_3M 4
-#define bfd_mach_arm_4 5
-#define bfd_mach_arm_4T 6
-#define bfd_mach_arm_5 7
-#define bfd_mach_arm_5T 8
-#define bfd_mach_arm_5TE 9
-#define bfd_mach_arm_XScale 10
-#define bfd_mach_arm_ep9312 11
-#define bfd_mach_arm_iWMMXt 12
-#define bfd_mach_arm_iWMMXt2 13
-#define bfd_mach_arm_5TEJ 14
-#define bfd_mach_arm_6 15
-#define bfd_mach_arm_6KZ 16
-#define bfd_mach_arm_6T2 17
-#define bfd_mach_arm_6K 18
-#define bfd_mach_arm_7 19
-#define bfd_mach_arm_6M 20
-#define bfd_mach_arm_6SM 21
-#define bfd_mach_arm_7EM 22
-#define bfd_mach_arm_8 23
-#define bfd_mach_arm_8R 24
-#define bfd_mach_arm_8M_BASE 25
-#define bfd_mach_arm_8M_MAIN 26
- bfd_arch_nds32, /* Andes NDS32. */
-#define bfd_mach_n1 1
-#define bfd_mach_n1h 2
-#define bfd_mach_n1h_v2 3
-#define bfd_mach_n1h_v3 4
-#define bfd_mach_n1h_v3m 5
- bfd_arch_ns32k, /* National Semiconductors ns32000. */
- bfd_arch_tic30, /* Texas Instruments TMS320C30. */
- bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */
-#define bfd_mach_tic3x 30
-#define bfd_mach_tic4x 40
- bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */
- bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */
- bfd_arch_tic80, /* TI TMS320c80 (MVP). */
- bfd_arch_v850, /* NEC V850. */
- bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */
-#define bfd_mach_v850 1
-#define bfd_mach_v850e 'E'
-#define bfd_mach_v850e1 '1'
-#define bfd_mach_v850e2 0x4532
-#define bfd_mach_v850e2v3 0x45325633
-#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */
- bfd_arch_arc, /* ARC Cores. */
-#define bfd_mach_arc_a4 0
-#define bfd_mach_arc_a5 1
-#define bfd_mach_arc_arc600 2
-#define bfd_mach_arc_arc601 4
-#define bfd_mach_arc_arc700 3
-#define bfd_mach_arc_arcv2 5
- bfd_arch_m32c, /* Renesas M16C/M32C. */
-#define bfd_mach_m16c 0x75
-#define bfd_mach_m32c 0x78
- bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */
-#define bfd_mach_m32r 1 /* For backwards compatibility. */
-#define bfd_mach_m32rx 'x'
-#define bfd_mach_m32r2 '2'
- bfd_arch_mn10200, /* Matsushita MN10200. */
- bfd_arch_mn10300, /* Matsushita MN10300. */
-#define bfd_mach_mn10300 300
-#define bfd_mach_am33 330
-#define bfd_mach_am33_2 332
- bfd_arch_fr30,
-#define bfd_mach_fr30 0x46523330
- bfd_arch_frv,
-#define bfd_mach_frv 1
-#define bfd_mach_frvsimple 2
-#define bfd_mach_fr300 300
-#define bfd_mach_fr400 400
-#define bfd_mach_fr450 450
-#define bfd_mach_frvtomcat 499 /* fr500 prototype. */
-#define bfd_mach_fr500 500
-#define bfd_mach_fr550 550
- bfd_arch_moxie, /* The moxie processor. */
-#define bfd_mach_moxie 1
- bfd_arch_ft32, /* The ft32 processor. */
-#define bfd_mach_ft32 1
-#define bfd_mach_ft32b 2
- bfd_arch_mcore,
- bfd_arch_mep,
-#define bfd_mach_mep 1
-#define bfd_mach_mep_h1 0x6831
-#define bfd_mach_mep_c5 0x6335
- bfd_arch_metag,
-#define bfd_mach_metag 1
- bfd_arch_ia64, /* HP/Intel ia64. */
-#define bfd_mach_ia64_elf64 64
-#define bfd_mach_ia64_elf32 32
- bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */
-#define bfd_mach_ip2022 1
-#define bfd_mach_ip2022ext 2
- bfd_arch_iq2000, /* Vitesse IQ2000. */
-#define bfd_mach_iq2000 1
-#define bfd_mach_iq10 2
- bfd_arch_epiphany, /* Adapteva EPIPHANY. */
-#define bfd_mach_epiphany16 1
-#define bfd_mach_epiphany32 2
- bfd_arch_mt,
-#define bfd_mach_ms1 1
-#define bfd_mach_mrisc2 2
-#define bfd_mach_ms2 3
- bfd_arch_pj,
- bfd_arch_avr, /* Atmel AVR microcontrollers. */
-#define bfd_mach_avr1 1
-#define bfd_mach_avr2 2
-#define bfd_mach_avr25 25
-#define bfd_mach_avr3 3
-#define bfd_mach_avr31 31
-#define bfd_mach_avr35 35
-#define bfd_mach_avr4 4
-#define bfd_mach_avr5 5
-#define bfd_mach_avr51 51
-#define bfd_mach_avr6 6
-#define bfd_mach_avrtiny 100
-#define bfd_mach_avrxmega1 101
-#define bfd_mach_avrxmega2 102
-#define bfd_mach_avrxmega3 103
-#define bfd_mach_avrxmega4 104
-#define bfd_mach_avrxmega5 105
-#define bfd_mach_avrxmega6 106
-#define bfd_mach_avrxmega7 107
- bfd_arch_bfin, /* ADI Blackfin. */
-#define bfd_mach_bfin 1
- bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */
-#define bfd_mach_cr16 1
- bfd_arch_cr16c, /* National Semiconductor CompactRISC. */
-#define bfd_mach_cr16c 1
- bfd_arch_crx, /* National Semiconductor CRX. */
-#define bfd_mach_crx 1
- bfd_arch_cris, /* Axis CRIS. */
-#define bfd_mach_cris_v0_v10 255
-#define bfd_mach_cris_v32 32
-#define bfd_mach_cris_v10_v32 1032
- bfd_arch_riscv,
-#define bfd_mach_riscv32 132
-#define bfd_mach_riscv64 164
- bfd_arch_rl78,
-#define bfd_mach_rl78 0x75
- bfd_arch_rx, /* Renesas RX. */
-#define bfd_mach_rx 0x75
-#define bfd_mach_rx_v2 0x76
-#define bfd_mach_rx_v3 0x77
- bfd_arch_s390, /* IBM s390. */
-#define bfd_mach_s390_31 31
-#define bfd_mach_s390_64 64
- bfd_arch_score, /* Sunplus score. */
-#define bfd_mach_score3 3
-#define bfd_mach_score7 7
- bfd_arch_mmix, /* Donald Knuth's educational processor. */
- bfd_arch_xstormy16,
-#define bfd_mach_xstormy16 1
- bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */
-#define bfd_mach_msp11 11
-#define bfd_mach_msp110 110
-#define bfd_mach_msp12 12
-#define bfd_mach_msp13 13
-#define bfd_mach_msp14 14
-#define bfd_mach_msp15 15
-#define bfd_mach_msp16 16
-#define bfd_mach_msp20 20
-#define bfd_mach_msp21 21
-#define bfd_mach_msp22 22
-#define bfd_mach_msp23 23
-#define bfd_mach_msp24 24
-#define bfd_mach_msp26 26
-#define bfd_mach_msp31 31
-#define bfd_mach_msp32 32
-#define bfd_mach_msp33 33
-#define bfd_mach_msp41 41
-#define bfd_mach_msp42 42
-#define bfd_mach_msp43 43
-#define bfd_mach_msp44 44
-#define bfd_mach_msp430x 45
-#define bfd_mach_msp46 46
-#define bfd_mach_msp47 47
-#define bfd_mach_msp54 54
- bfd_arch_xc16x, /* Infineon's XC16X Series. */
-#define bfd_mach_xc16x 1
-#define bfd_mach_xc16xl 2
-#define bfd_mach_xc16xs 3
- bfd_arch_xgate, /* Freescale XGATE. */
-#define bfd_mach_xgate 1
- bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
-#define bfd_mach_xtensa 1
- bfd_arch_z80,
-#define bfd_mach_z80strict 1 /* No undocumented opcodes. */
-#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */
-#define bfd_mach_z80full 7 /* All undocumented instructions. */
-#define bfd_mach_r800 11 /* R800: successor with multiplication. */
- bfd_arch_lm32, /* Lattice Mico32. */
-#define bfd_mach_lm32 1
- bfd_arch_microblaze,/* Xilinx MicroBlaze. */
- bfd_arch_tilepro, /* Tilera TILEPro. */
- bfd_arch_tilegx, /* Tilera TILE-Gx. */
-#define bfd_mach_tilepro 1
-#define bfd_mach_tilegx 1
-#define bfd_mach_tilegx32 2
- bfd_arch_aarch64, /* AArch64. */
-#define bfd_mach_aarch64 0
-#define bfd_mach_aarch64_ilp32 32
- bfd_arch_nios2, /* Nios II. */
-#define bfd_mach_nios2 0
-#define bfd_mach_nios2r1 1
-#define bfd_mach_nios2r2 2
- bfd_arch_visium, /* Visium. */
-#define bfd_mach_visium 1
- bfd_arch_wasm32, /* WebAssembly. */
-#define bfd_mach_wasm32 1
- bfd_arch_pru, /* PRU. */
-#define bfd_mach_pru 0
- bfd_arch_nfp, /* Netronome Flow Processor */
-#define bfd_mach_nfp3200 0x3200
-#define bfd_mach_nfp6000 0x6000
- bfd_arch_csky, /* C-SKY. */
-#define bfd_mach_ck_unknown 0
-#define bfd_mach_ck510 1
-#define bfd_mach_ck610 2
-#define bfd_mach_ck801 3
-#define bfd_mach_ck802 4
-#define bfd_mach_ck803 5
-#define bfd_mach_ck807 6
-#define bfd_mach_ck810 7
- bfd_arch_last
- };
-
-typedef struct bfd_arch_info
-{
- int bits_per_word;
- int bits_per_address;
- int bits_per_byte;
- enum bfd_architecture arch;
- unsigned long mach;
- const char *arch_name;
- const char *printable_name;
- unsigned int section_align_power;
- /* TRUE if this is the default machine for the architecture.
- The default arch should be the first entry for an arch so that
- all the entries for that arch can be accessed via <>. */
- bfd_boolean the_default;
- const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *,
- const struct bfd_arch_info *);
-
- bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
-
- /* Allocate via bfd_malloc and return a fill buffer of size COUNT. If
- IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is
- TRUE, the buffer contains code. */
- void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian,
- bfd_boolean code);
-
- const struct bfd_arch_info *next;
-}
-bfd_arch_info_type;
-
-const char *bfd_printable_name (bfd *abfd);
-
-const bfd_arch_info_type *bfd_scan_arch (const char *string);
-
-const char **bfd_arch_list (void);
-
-const bfd_arch_info_type *bfd_arch_get_compatible
- (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
-
-void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
-
-bfd_boolean bfd_default_set_arch_mach
- (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
-
-enum bfd_architecture bfd_get_arch (bfd *abfd);
-
-unsigned long bfd_get_mach (bfd *abfd);
-
-unsigned int bfd_arch_bits_per_byte (bfd *abfd);
-
-unsigned int bfd_arch_bits_per_address (bfd *abfd);
-
-const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
-
-const bfd_arch_info_type *bfd_lookup_arch
- (enum bfd_architecture arch, unsigned long machine);
-
-const char *bfd_printable_arch_mach
- (enum bfd_architecture arch, unsigned long machine);
-
-unsigned int bfd_octets_per_byte (bfd *abfd);
-
-unsigned int bfd_arch_mach_octets_per_byte
- (enum bfd_architecture arch, unsigned long machine);
-
-/* Extracted from reloc.c. */
-
-typedef enum bfd_reloc_status
-{
- /* No errors detected. Note - the value 2 is used so that it
- will not be mistaken for the boolean TRUE or FALSE values. */
- bfd_reloc_ok = 2,
-
- /* The relocation was performed, but there was an overflow. */
- bfd_reloc_overflow,
-
- /* The address to relocate was not within the section supplied. */
- bfd_reloc_outofrange,
-
- /* Used by special functions. */
- bfd_reloc_continue,
-
- /* Unsupported relocation size requested. */
- bfd_reloc_notsupported,
-
- /* Unused. */
- bfd_reloc_other,
-
- /* The symbol to relocate against was undefined. */
- bfd_reloc_undefined,
-
- /* The relocation was performed, but may not be ok. If this type is
- returned, the error_message argument to bfd_perform_relocation
- will be set. */
- bfd_reloc_dangerous
- }
- bfd_reloc_status_type;
-
-typedef const struct reloc_howto_struct reloc_howto_type;
-
-typedef struct reloc_cache_entry
-{
- /* A pointer into the canonical table of pointers. */
- struct bfd_symbol **sym_ptr_ptr;
-
- /* offset in section. */
- bfd_size_type address;
-
- /* addend for relocation value. */
- bfd_vma addend;
-
- /* Pointer to how to perform the required relocation. */
- reloc_howto_type *howto;
-
-}
-arelent;
-
-
-enum complain_overflow
-{
- /* Do not complain on overflow. */
- complain_overflow_dont,
-
- /* Complain if the value overflows when considered as a signed
- number one bit larger than the field. ie. A bitfield of N bits
- is allowed to represent -2**n to 2**n-1. */
- complain_overflow_bitfield,
-
- /* Complain if the value overflows when considered as a signed
- number. */
- complain_overflow_signed,
-
- /* Complain if the value overflows when considered as an
- unsigned number. */
- complain_overflow_unsigned
-};
-struct reloc_howto_struct
-{
- /* The type field has mainly a documentary use - the back end can
- do what it wants with it, though normally the back end's idea of
- an external reloc number is stored in this field. */
- unsigned int type;
-
- /* The encoded size of the item to be relocated. This is *not* a
- power-of-two measure. Use bfd_get_reloc_size to find the size
- of the item in bytes. */
- unsigned int size:3;
-
- /* The number of bits in the field to be relocated. This is used
- when doing overflow checking. */
- unsigned int bitsize:7;
-
- /* The value the final relocation is shifted right by. This drops
- unwanted data from the relocation. */
- unsigned int rightshift:6;
-
- /* The bit position of the reloc value in the destination.
- The relocated value is left shifted by this amount. */
- unsigned int bitpos:6;
-
- /* What type of overflow error should be checked for when
- relocating. */
- ENUM_BITFIELD (complain_overflow) complain_on_overflow:2;
-
- /* The relocation value should be negated before applying. */
- unsigned int negate:1;
-
- /* The relocation is relative to the item being relocated. */
- unsigned int pc_relative:1;
-
- /* Some formats record a relocation addend in the section contents
- rather than with the relocation. For ELF formats this is the
- distinction between USE_REL and USE_RELA (though the code checks
- for USE_REL == 1/0). The value of this field is TRUE if the
- addend is recorded with the section contents; when performing a
- partial link (ld -r) the section contents (the data) will be
- modified. The value of this field is FALSE if addends are
- recorded with the relocation (in arelent.addend); when performing
- a partial link the relocation will be modified.
- All relocations for all ELF USE_RELA targets should set this field
- to FALSE (values of TRUE should be looked on with suspicion).
- However, the converse is not true: not all relocations of all ELF
- USE_REL targets set this field to TRUE. Why this is so is peculiar
- to each particular target. For relocs that aren't used in partial
- links (e.g. GOT stuff) it doesn't matter what this is set to. */
- unsigned int partial_inplace:1;
-
- /* When some formats create PC relative instructions, they leave
- the value of the pc of the place being relocated in the offset
- slot of the instruction, so that a PC relative relocation can
- be made just by adding in an ordinary offset (e.g., sun3 a.out).
- Some formats leave the displacement part of an instruction
- empty (e.g., ELF); this flag signals the fact. */
- unsigned int pcrel_offset:1;
-
- /* src_mask selects the part of the instruction (or data) to be used
- in the relocation sum. If the target relocations don't have an
- addend in the reloc, eg. ELF USE_REL, src_mask will normally equal
- dst_mask to extract the addend from the section contents. If
- relocations do have an addend in the reloc, eg. ELF USE_RELA, this
- field should normally be zero. Non-zero values for ELF USE_RELA
- targets should be viewed with suspicion as normally the value in
- the dst_mask part of the section contents should be ignored. */
- bfd_vma src_mask;
-
- /* dst_mask selects which parts of the instruction (or data) are
- replaced with a relocated value. */
- bfd_vma dst_mask;
-
- /* If this field is non null, then the supplied function is
- called rather than the normal function. This allows really
- strange relocation methods to be accommodated. */
- bfd_reloc_status_type (*special_function)
- (bfd *, arelent *, struct bfd_symbol *, void *, asection *,
- bfd *, char **);
-
- /* The textual name of the relocation type. */
- char *name;
-};
-
-#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \
- inplace, src_mask, dst_mask, pcrel_off) \
- { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \
- size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name }
-#define EMPTY_HOWTO(C) \
- HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \
- NULL, FALSE, 0, 0, FALSE)
-
-unsigned int bfd_get_reloc_size (reloc_howto_type *);
-
-typedef struct relent_chain
-{
- arelent relent;
- struct relent_chain *next;
-}
-arelent_chain;
-
-bfd_reloc_status_type bfd_check_overflow
- (enum complain_overflow how,
- unsigned int bitsize,
- unsigned int rightshift,
- unsigned int addrsize,
- bfd_vma relocation);
-
-bfd_boolean bfd_reloc_offset_in_range
- (reloc_howto_type *howto,
- bfd *abfd,
- asection *section,
- bfd_size_type offset);
-
-bfd_reloc_status_type bfd_perform_relocation
- (bfd *abfd,
- arelent *reloc_entry,
- void *data,
- asection *input_section,
- bfd *output_bfd,
- char **error_message);
-
-bfd_reloc_status_type bfd_install_relocation
- (bfd *abfd,
- arelent *reloc_entry,
- void *data, bfd_vma data_start,
- asection *input_section,
- char **error_message);
-
-enum bfd_reloc_code_real {
- _dummy_first_bfd_reloc_code_real,
-
-
-/* Basic absolute relocations of N bits. */
- BFD_RELOC_64,
- BFD_RELOC_32,
- BFD_RELOC_26,
- BFD_RELOC_24,
- BFD_RELOC_16,
- BFD_RELOC_14,
- BFD_RELOC_8,
-
-/* PC-relative relocations. Sometimes these are relative to the address
-of the relocation itself; sometimes they are relative to the start of
-the section containing the relocation. It depends on the specific target. */
- BFD_RELOC_64_PCREL,
- BFD_RELOC_32_PCREL,
- BFD_RELOC_24_PCREL,
- BFD_RELOC_16_PCREL,
- BFD_RELOC_12_PCREL,
- BFD_RELOC_8_PCREL,
-
-/* Section relative relocations. Some targets need this for DWARF2. */
- BFD_RELOC_32_SECREL,
-
-/* For ELF. */
- BFD_RELOC_32_GOT_PCREL,
- BFD_RELOC_16_GOT_PCREL,
- BFD_RELOC_8_GOT_PCREL,
- BFD_RELOC_32_GOTOFF,
- BFD_RELOC_16_GOTOFF,
- BFD_RELOC_LO16_GOTOFF,
- BFD_RELOC_HI16_GOTOFF,
- BFD_RELOC_HI16_S_GOTOFF,
- BFD_RELOC_8_GOTOFF,
- BFD_RELOC_64_PLT_PCREL,
- BFD_RELOC_32_PLT_PCREL,
- BFD_RELOC_24_PLT_PCREL,
- BFD_RELOC_16_PLT_PCREL,
- BFD_RELOC_8_PLT_PCREL,
- BFD_RELOC_64_PLTOFF,
- BFD_RELOC_32_PLTOFF,
- BFD_RELOC_16_PLTOFF,
- BFD_RELOC_LO16_PLTOFF,
- BFD_RELOC_HI16_PLTOFF,
- BFD_RELOC_HI16_S_PLTOFF,
- BFD_RELOC_8_PLTOFF,
-
-/* Size relocations. */
- BFD_RELOC_SIZE32,
- BFD_RELOC_SIZE64,
-
-/* Relocations used by 68K ELF. */
- BFD_RELOC_68K_GLOB_DAT,
- BFD_RELOC_68K_JMP_SLOT,
- BFD_RELOC_68K_RELATIVE,
- BFD_RELOC_68K_TLS_GD32,
- BFD_RELOC_68K_TLS_GD16,
- BFD_RELOC_68K_TLS_GD8,
- BFD_RELOC_68K_TLS_LDM32,
- BFD_RELOC_68K_TLS_LDM16,
- BFD_RELOC_68K_TLS_LDM8,
- BFD_RELOC_68K_TLS_LDO32,
- BFD_RELOC_68K_TLS_LDO16,
- BFD_RELOC_68K_TLS_LDO8,
- BFD_RELOC_68K_TLS_IE32,
- BFD_RELOC_68K_TLS_IE16,
- BFD_RELOC_68K_TLS_IE8,
- BFD_RELOC_68K_TLS_LE32,
- BFD_RELOC_68K_TLS_LE16,
- BFD_RELOC_68K_TLS_LE8,
-
-/* Linkage-table relative. */
- BFD_RELOC_32_BASEREL,
- BFD_RELOC_16_BASEREL,
- BFD_RELOC_LO16_BASEREL,
- BFD_RELOC_HI16_BASEREL,
- BFD_RELOC_HI16_S_BASEREL,
- BFD_RELOC_8_BASEREL,
- BFD_RELOC_RVA,
-
-/* Absolute 8-bit relocation, but used to form an address like 0xFFnn. */
- BFD_RELOC_8_FFnn,
-
-/* These PC-relative relocations are stored as word displacements --
-i.e., byte displacements shifted right two bits. The 30-bit word
-displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the
-SPARC. (SPARC tools generally refer to this as <>.) The
-signed 16-bit displacement is used on the MIPS, and the 23-bit
-displacement is used on the Alpha. */
- BFD_RELOC_32_PCREL_S2,
- BFD_RELOC_16_PCREL_S2,
- BFD_RELOC_23_PCREL_S2,
-
-/* High 22 bits and low 10 bits of 32-bit value, placed into lower bits of
-the target word. These are used on the SPARC. */
- BFD_RELOC_HI22,
- BFD_RELOC_LO10,
-
-/* For systems that allocate a Global Pointer register, these are
-displacements off that register. These relocation types are
-handled specially, because the value the register will have is
-decided relatively late. */
- BFD_RELOC_GPREL16,
- BFD_RELOC_GPREL32,
-
-/* SPARC ELF relocations. There is probably some overlap with other
-relocation types already defined. */
- BFD_RELOC_NONE,
- BFD_RELOC_SPARC_WDISP22,
- BFD_RELOC_SPARC22,
- BFD_RELOC_SPARC13,
- BFD_RELOC_SPARC_GOT10,
- BFD_RELOC_SPARC_GOT13,
- BFD_RELOC_SPARC_GOT22,
- BFD_RELOC_SPARC_PC10,
- BFD_RELOC_SPARC_PC22,
- BFD_RELOC_SPARC_WPLT30,
- BFD_RELOC_SPARC_COPY,
- BFD_RELOC_SPARC_GLOB_DAT,
- BFD_RELOC_SPARC_JMP_SLOT,
- BFD_RELOC_SPARC_RELATIVE,
- BFD_RELOC_SPARC_UA16,
- BFD_RELOC_SPARC_UA32,
- BFD_RELOC_SPARC_UA64,
- BFD_RELOC_SPARC_GOTDATA_HIX22,
- BFD_RELOC_SPARC_GOTDATA_LOX10,
- BFD_RELOC_SPARC_GOTDATA_OP_HIX22,
- BFD_RELOC_SPARC_GOTDATA_OP_LOX10,
- BFD_RELOC_SPARC_GOTDATA_OP,
- BFD_RELOC_SPARC_JMP_IREL,
- BFD_RELOC_SPARC_IRELATIVE,
-
-/* I think these are specific to SPARC a.out (e.g., Sun 4). */
- BFD_RELOC_SPARC_BASE13,
- BFD_RELOC_SPARC_BASE22,
-
-/* SPARC64 relocations */
-#define BFD_RELOC_SPARC_64 BFD_RELOC_64
- BFD_RELOC_SPARC_10,
- BFD_RELOC_SPARC_11,
- BFD_RELOC_SPARC_OLO10,
- BFD_RELOC_SPARC_HH22,
- BFD_RELOC_SPARC_HM10,
- BFD_RELOC_SPARC_LM22,
- BFD_RELOC_SPARC_PC_HH22,
- BFD_RELOC_SPARC_PC_HM10,
- BFD_RELOC_SPARC_PC_LM22,
- BFD_RELOC_SPARC_WDISP16,
- BFD_RELOC_SPARC_WDISP19,
- BFD_RELOC_SPARC_7,
- BFD_RELOC_SPARC_6,
- BFD_RELOC_SPARC_5,
-#define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL
- BFD_RELOC_SPARC_PLT32,
- BFD_RELOC_SPARC_PLT64,
- BFD_RELOC_SPARC_HIX22,
- BFD_RELOC_SPARC_LOX10,
- BFD_RELOC_SPARC_H44,
- BFD_RELOC_SPARC_M44,
- BFD_RELOC_SPARC_L44,
- BFD_RELOC_SPARC_REGISTER,
- BFD_RELOC_SPARC_H34,
- BFD_RELOC_SPARC_SIZE32,
- BFD_RELOC_SPARC_SIZE64,
- BFD_RELOC_SPARC_WDISP10,
-
-/* SPARC little endian relocation */
- BFD_RELOC_SPARC_REV32,
-
-/* SPARC TLS relocations */
- BFD_RELOC_SPARC_TLS_GD_HI22,
- BFD_RELOC_SPARC_TLS_GD_LO10,
- BFD_RELOC_SPARC_TLS_GD_ADD,
- BFD_RELOC_SPARC_TLS_GD_CALL,
- BFD_RELOC_SPARC_TLS_LDM_HI22,
- BFD_RELOC_SPARC_TLS_LDM_LO10,
- BFD_RELOC_SPARC_TLS_LDM_ADD,
- BFD_RELOC_SPARC_TLS_LDM_CALL,
- BFD_RELOC_SPARC_TLS_LDO_HIX22,
- BFD_RELOC_SPARC_TLS_LDO_LOX10,
- BFD_RELOC_SPARC_TLS_LDO_ADD,
- BFD_RELOC_SPARC_TLS_IE_HI22,
- BFD_RELOC_SPARC_TLS_IE_LO10,
- BFD_RELOC_SPARC_TLS_IE_LD,
- BFD_RELOC_SPARC_TLS_IE_LDX,
- BFD_RELOC_SPARC_TLS_IE_ADD,
- BFD_RELOC_SPARC_TLS_LE_HIX22,
- BFD_RELOC_SPARC_TLS_LE_LOX10,
- BFD_RELOC_SPARC_TLS_DTPMOD32,
- BFD_RELOC_SPARC_TLS_DTPMOD64,
- BFD_RELOC_SPARC_TLS_DTPOFF32,
- BFD_RELOC_SPARC_TLS_DTPOFF64,
- BFD_RELOC_SPARC_TLS_TPOFF32,
- BFD_RELOC_SPARC_TLS_TPOFF64,
-
-/* SPU Relocations. */
- BFD_RELOC_SPU_IMM7,
- BFD_RELOC_SPU_IMM8,
- BFD_RELOC_SPU_IMM10,
- BFD_RELOC_SPU_IMM10W,
- BFD_RELOC_SPU_IMM16,
- BFD_RELOC_SPU_IMM16W,
- BFD_RELOC_SPU_IMM18,
- BFD_RELOC_SPU_PCREL9a,
- BFD_RELOC_SPU_PCREL9b,
- BFD_RELOC_SPU_PCREL16,
- BFD_RELOC_SPU_LO16,
- BFD_RELOC_SPU_HI16,
- BFD_RELOC_SPU_PPU32,
- BFD_RELOC_SPU_PPU64,
- BFD_RELOC_SPU_ADD_PIC,
-
-/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
-"addend" in some special way.
-For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
-writing; when reading, it will be the absolute section symbol. The
-addend is the displacement in bytes of the "lda" instruction from
-the "ldah" instruction (which is at the address of this reloc). */
- BFD_RELOC_ALPHA_GPDISP_HI16,
-
-/* For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
-with GPDISP_HI16 relocs. The addend is ignored when writing the
-relocations out, and is filled in with the file's GP value on
-reading, for convenience. */
- BFD_RELOC_ALPHA_GPDISP_LO16,
-
-/* The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
-relocation except that there is no accompanying GPDISP_LO16
-relocation. */
- BFD_RELOC_ALPHA_GPDISP,
-
-/* The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
-the assembler turns it into a LDQ instruction to load the address of
-the symbol, and then fills in a register in the real instruction.
-
-The LITERAL reloc, at the LDQ instruction, refers to the .lita
-section symbol. The addend is ignored when writing, but is filled
-in with the file's GP value on reading, for convenience, as with the
-GPDISP_LO16 reloc.
-
-The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16.
-It should refer to the symbol to be referenced, as with 16_GOTOFF,
-but it generates output not based on the position within the .got
-section, but relative to the GP value chosen for the file during the
-final link stage.
-
-The LITUSE reloc, on the instruction using the loaded address, gives
-information to the linker that it might be able to use to optimize
-away some literal section references. The symbol is ignored (read
-as the absolute section symbol), and the "addend" indicates the type
-of instruction using the register:
-1 - "memory" fmt insn
-2 - byte-manipulation (byte offset reg)
-3 - jsr (target of branch) */
- BFD_RELOC_ALPHA_LITERAL,
- BFD_RELOC_ALPHA_ELF_LITERAL,
- BFD_RELOC_ALPHA_LITUSE,
-
-/* The HINT relocation indicates a value that should be filled into the
-"hint" field of a jmp/jsr/ret instruction, for possible branch-
-prediction logic which may be provided on some processors. */
- BFD_RELOC_ALPHA_HINT,
-
-/* The LINKAGE relocation outputs a linkage pair in the object file,
-which is filled by the linker. */
- BFD_RELOC_ALPHA_LINKAGE,
-
-/* The CODEADDR relocation outputs a STO_CA in the object file,
-which is filled by the linker. */
- BFD_RELOC_ALPHA_CODEADDR,
-
-/* The GPREL_HI/LO relocations together form a 32-bit offset from the
-GP register. */
- BFD_RELOC_ALPHA_GPREL_HI16,
- BFD_RELOC_ALPHA_GPREL_LO16,
-
-/* Like BFD_RELOC_23_PCREL_S2, except that the source and target must
-share a common GP, and the target address is adjusted for
-STO_ALPHA_STD_GPLOAD. */
- BFD_RELOC_ALPHA_BRSGP,
-
-/* The NOP relocation outputs a NOP if the longword displacement
-between two procedure entry points is < 2^21. */
- BFD_RELOC_ALPHA_NOP,
-
-/* The BSR relocation outputs a BSR if the longword displacement
-between two procedure entry points is < 2^21. */
- BFD_RELOC_ALPHA_BSR,
-
-/* The LDA relocation outputs a LDA if the longword displacement
-between two procedure entry points is < 2^16. */
- BFD_RELOC_ALPHA_LDA,
-
-/* The BOH relocation outputs a BSR if the longword displacement
-between two procedure entry points is < 2^21, or else a hint. */
- BFD_RELOC_ALPHA_BOH,
-
-/* Alpha thread-local storage relocations. */
- BFD_RELOC_ALPHA_TLSGD,
- BFD_RELOC_ALPHA_TLSLDM,
- BFD_RELOC_ALPHA_DTPMOD64,
- BFD_RELOC_ALPHA_GOTDTPREL16,
- BFD_RELOC_ALPHA_DTPREL64,
- BFD_RELOC_ALPHA_DTPREL_HI16,
- BFD_RELOC_ALPHA_DTPREL_LO16,
- BFD_RELOC_ALPHA_DTPREL16,
- BFD_RELOC_ALPHA_GOTTPREL16,
- BFD_RELOC_ALPHA_TPREL64,
- BFD_RELOC_ALPHA_TPREL_HI16,
- BFD_RELOC_ALPHA_TPREL_LO16,
- BFD_RELOC_ALPHA_TPREL16,
-
-/* The MIPS jump instruction. */
- BFD_RELOC_MIPS_JMP,
- BFD_RELOC_MICROMIPS_JMP,
-
-/* The MIPS16 jump instruction. */
- BFD_RELOC_MIPS16_JMP,
-
-/* MIPS16 GP relative reloc. */
- BFD_RELOC_MIPS16_GPREL,
-
-/* High 16 bits of 32-bit value; simple reloc. */
- BFD_RELOC_HI16,
-
-/* High 16 bits of 32-bit value but the low 16 bits will be sign
-extended and added to form the final result. If the low 16
-bits form a negative number, we need to add one to the high value
-to compensate for the borrow when the low bits are added. */
- BFD_RELOC_HI16_S,
-
-/* Low 16 bits. */
- BFD_RELOC_LO16,
-
-/* High 16 bits of 32-bit pc-relative value */
- BFD_RELOC_HI16_PCREL,
-
-/* High 16 bits of 32-bit pc-relative value, adjusted */
- BFD_RELOC_HI16_S_PCREL,
-
-/* Low 16 bits of pc-relative value */
- BFD_RELOC_LO16_PCREL,
-
-/* Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of
-16-bit immediate fields */
- BFD_RELOC_MIPS16_GOT16,
- BFD_RELOC_MIPS16_CALL16,
-
-/* MIPS16 high 16 bits of 32-bit value. */
- BFD_RELOC_MIPS16_HI16,
-
-/* MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign
-extended and added to form the final result. If the low 16
-bits form a negative number, we need to add one to the high value
-to compensate for the borrow when the low bits are added. */
- BFD_RELOC_MIPS16_HI16_S,
-
-/* MIPS16 low 16 bits. */
- BFD_RELOC_MIPS16_LO16,
-
-/* MIPS16 TLS relocations */
- BFD_RELOC_MIPS16_TLS_GD,
- BFD_RELOC_MIPS16_TLS_LDM,
- BFD_RELOC_MIPS16_TLS_DTPREL_HI16,
- BFD_RELOC_MIPS16_TLS_DTPREL_LO16,
- BFD_RELOC_MIPS16_TLS_GOTTPREL,
- BFD_RELOC_MIPS16_TLS_TPREL_HI16,
- BFD_RELOC_MIPS16_TLS_TPREL_LO16,
-
-/* Relocation against a MIPS literal section. */
- BFD_RELOC_MIPS_LITERAL,
- BFD_RELOC_MICROMIPS_LITERAL,
-
-/* microMIPS PC-relative relocations. */
- BFD_RELOC_MICROMIPS_7_PCREL_S1,
- BFD_RELOC_MICROMIPS_10_PCREL_S1,
- BFD_RELOC_MICROMIPS_16_PCREL_S1,
-
-/* MIPS16 PC-relative relocation. */
- BFD_RELOC_MIPS16_16_PCREL_S1,
-
-/* MIPS PC-relative relocations. */
- BFD_RELOC_MIPS_21_PCREL_S2,
- BFD_RELOC_MIPS_26_PCREL_S2,
- BFD_RELOC_MIPS_18_PCREL_S3,
- BFD_RELOC_MIPS_19_PCREL_S2,
-
-/* microMIPS versions of generic BFD relocs. */
- BFD_RELOC_MICROMIPS_GPREL16,
- BFD_RELOC_MICROMIPS_HI16,
- BFD_RELOC_MICROMIPS_HI16_S,
- BFD_RELOC_MICROMIPS_LO16,
-
-/* MIPS ELF relocations. */
- BFD_RELOC_MIPS_GOT16,
- BFD_RELOC_MICROMIPS_GOT16,
- BFD_RELOC_MIPS_CALL16,
- BFD_RELOC_MICROMIPS_CALL16,
- BFD_RELOC_MIPS_GOT_HI16,
- BFD_RELOC_MICROMIPS_GOT_HI16,
- BFD_RELOC_MIPS_GOT_LO16,
- BFD_RELOC_MICROMIPS_GOT_LO16,
- BFD_RELOC_MIPS_CALL_HI16,
- BFD_RELOC_MICROMIPS_CALL_HI16,
- BFD_RELOC_MIPS_CALL_LO16,
- BFD_RELOC_MICROMIPS_CALL_LO16,
- BFD_RELOC_MIPS_SUB,
- BFD_RELOC_MICROMIPS_SUB,
- BFD_RELOC_MIPS_GOT_PAGE,
- BFD_RELOC_MICROMIPS_GOT_PAGE,
- BFD_RELOC_MIPS_GOT_OFST,
- BFD_RELOC_MICROMIPS_GOT_OFST,
- BFD_RELOC_MIPS_GOT_DISP,
- BFD_RELOC_MICROMIPS_GOT_DISP,
- BFD_RELOC_MIPS_SHIFT5,
- BFD_RELOC_MIPS_SHIFT6,
- BFD_RELOC_MIPS_INSERT_A,
- BFD_RELOC_MIPS_INSERT_B,
- BFD_RELOC_MIPS_DELETE,
- BFD_RELOC_MIPS_HIGHEST,
- BFD_RELOC_MICROMIPS_HIGHEST,
- BFD_RELOC_MIPS_HIGHER,
- BFD_RELOC_MICROMIPS_HIGHER,
- BFD_RELOC_MIPS_SCN_DISP,
- BFD_RELOC_MICROMIPS_SCN_DISP,
- BFD_RELOC_MIPS_REL16,
- BFD_RELOC_MIPS_RELGOT,
- BFD_RELOC_MIPS_JALR,
- BFD_RELOC_MICROMIPS_JALR,
- BFD_RELOC_MIPS_TLS_DTPMOD32,
- BFD_RELOC_MIPS_TLS_DTPREL32,
- BFD_RELOC_MIPS_TLS_DTPMOD64,
- BFD_RELOC_MIPS_TLS_DTPREL64,
- BFD_RELOC_MIPS_TLS_GD,
- BFD_RELOC_MICROMIPS_TLS_GD,
- BFD_RELOC_MIPS_TLS_LDM,
- BFD_RELOC_MICROMIPS_TLS_LDM,
- BFD_RELOC_MIPS_TLS_DTPREL_HI16,
- BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16,
- BFD_RELOC_MIPS_TLS_DTPREL_LO16,
- BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16,
- BFD_RELOC_MIPS_TLS_GOTTPREL,
- BFD_RELOC_MICROMIPS_TLS_GOTTPREL,
- BFD_RELOC_MIPS_TLS_TPREL32,
- BFD_RELOC_MIPS_TLS_TPREL64,
- BFD_RELOC_MIPS_TLS_TPREL_HI16,
- BFD_RELOC_MICROMIPS_TLS_TPREL_HI16,
- BFD_RELOC_MIPS_TLS_TPREL_LO16,
- BFD_RELOC_MICROMIPS_TLS_TPREL_LO16,
- BFD_RELOC_MIPS_EH,
-
-
-/* MIPS ELF relocations (VxWorks and PLT extensions). */
- BFD_RELOC_MIPS_COPY,
- BFD_RELOC_MIPS_JUMP_SLOT,
-
-
-/* Moxie ELF relocations. */
- BFD_RELOC_MOXIE_10_PCREL,
-
-
-/* FT32 ELF relocations. */
- BFD_RELOC_FT32_10,
- BFD_RELOC_FT32_20,
- BFD_RELOC_FT32_17,
- BFD_RELOC_FT32_18,
- BFD_RELOC_FT32_RELAX,
- BFD_RELOC_FT32_SC0,
- BFD_RELOC_FT32_SC1,
- BFD_RELOC_FT32_15,
- BFD_RELOC_FT32_DIFF32,
-
-
-/* Fujitsu Frv Relocations. */
- BFD_RELOC_FRV_LABEL16,
- BFD_RELOC_FRV_LABEL24,
- BFD_RELOC_FRV_LO16,
- BFD_RELOC_FRV_HI16,
- BFD_RELOC_FRV_GPREL12,
- BFD_RELOC_FRV_GPRELU12,
- BFD_RELOC_FRV_GPREL32,
- BFD_RELOC_FRV_GPRELHI,
- BFD_RELOC_FRV_GPRELLO,
- BFD_RELOC_FRV_GOT12,
- BFD_RELOC_FRV_GOTHI,
- BFD_RELOC_FRV_GOTLO,
- BFD_RELOC_FRV_FUNCDESC,
- BFD_RELOC_FRV_FUNCDESC_GOT12,
- BFD_RELOC_FRV_FUNCDESC_GOTHI,
- BFD_RELOC_FRV_FUNCDESC_GOTLO,
- BFD_RELOC_FRV_FUNCDESC_VALUE,
- BFD_RELOC_FRV_FUNCDESC_GOTOFF12,
- BFD_RELOC_FRV_FUNCDESC_GOTOFFHI,
- BFD_RELOC_FRV_FUNCDESC_GOTOFFLO,
- BFD_RELOC_FRV_GOTOFF12,
- BFD_RELOC_FRV_GOTOFFHI,
- BFD_RELOC_FRV_GOTOFFLO,
- BFD_RELOC_FRV_GETTLSOFF,
- BFD_RELOC_FRV_TLSDESC_VALUE,
- BFD_RELOC_FRV_GOTTLSDESC12,
- BFD_RELOC_FRV_GOTTLSDESCHI,
- BFD_RELOC_FRV_GOTTLSDESCLO,
- BFD_RELOC_FRV_TLSMOFF12,
- BFD_RELOC_FRV_TLSMOFFHI,
- BFD_RELOC_FRV_TLSMOFFLO,
- BFD_RELOC_FRV_GOTTLSOFF12,
- BFD_RELOC_FRV_GOTTLSOFFHI,
- BFD_RELOC_FRV_GOTTLSOFFLO,
- BFD_RELOC_FRV_TLSOFF,
- BFD_RELOC_FRV_TLSDESC_RELAX,
- BFD_RELOC_FRV_GETTLSOFF_RELAX,
- BFD_RELOC_FRV_TLSOFF_RELAX,
- BFD_RELOC_FRV_TLSMOFF,
-
-
-/* This is a 24bit GOT-relative reloc for the mn10300. */
- BFD_RELOC_MN10300_GOTOFF24,
-
-/* This is a 32bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction. */
- BFD_RELOC_MN10300_GOT32,
-
-/* This is a 24bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction. */
- BFD_RELOC_MN10300_GOT24,
-
-/* This is a 16bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction. */
- BFD_RELOC_MN10300_GOT16,
-
-/* Copy symbol at runtime. */
- BFD_RELOC_MN10300_COPY,
-
-/* Create GOT entry. */
- BFD_RELOC_MN10300_GLOB_DAT,
-
-/* Create PLT entry. */
- BFD_RELOC_MN10300_JMP_SLOT,
-
-/* Adjust by program base. */
- BFD_RELOC_MN10300_RELATIVE,
-
-/* Together with another reloc targeted at the same location,
-allows for a value that is the difference of two symbols
-in the same section. */
- BFD_RELOC_MN10300_SYM_DIFF,
-
-/* The addend of this reloc is an alignment power that must
-be honoured at the offset's location, regardless of linker
-relaxation. */
- BFD_RELOC_MN10300_ALIGN,
-
-/* Various TLS-related relocations. */
- BFD_RELOC_MN10300_TLS_GD,
- BFD_RELOC_MN10300_TLS_LD,
- BFD_RELOC_MN10300_TLS_LDO,
- BFD_RELOC_MN10300_TLS_GOTIE,
- BFD_RELOC_MN10300_TLS_IE,
- BFD_RELOC_MN10300_TLS_LE,
- BFD_RELOC_MN10300_TLS_DTPMOD,
- BFD_RELOC_MN10300_TLS_DTPOFF,
- BFD_RELOC_MN10300_TLS_TPOFF,
-
-/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction. */
- BFD_RELOC_MN10300_32_PCREL,
-
-/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction. */
- BFD_RELOC_MN10300_16_PCREL,
-
-
-/* i386/elf relocations */
- BFD_RELOC_386_GOT32,
- BFD_RELOC_386_PLT32,
- BFD_RELOC_386_COPY,
- BFD_RELOC_386_GLOB_DAT,
- BFD_RELOC_386_JUMP_SLOT,
- BFD_RELOC_386_RELATIVE,
- BFD_RELOC_386_GOTOFF,
- BFD_RELOC_386_GOTPC,
- BFD_RELOC_386_TLS_TPOFF,
- BFD_RELOC_386_TLS_IE,
- BFD_RELOC_386_TLS_GOTIE,
- BFD_RELOC_386_TLS_LE,
- BFD_RELOC_386_TLS_GD,
- BFD_RELOC_386_TLS_LDM,
- BFD_RELOC_386_TLS_LDO_32,
- BFD_RELOC_386_TLS_IE_32,
- BFD_RELOC_386_TLS_LE_32,
- BFD_RELOC_386_TLS_DTPMOD32,
- BFD_RELOC_386_TLS_DTPOFF32,
- BFD_RELOC_386_TLS_TPOFF32,
- BFD_RELOC_386_TLS_GOTDESC,
- BFD_RELOC_386_TLS_DESC_CALL,
- BFD_RELOC_386_TLS_DESC,
- BFD_RELOC_386_IRELATIVE,
- BFD_RELOC_386_GOT32X,
-
-/* x86-64/elf relocations */
- BFD_RELOC_X86_64_GOT32,
- BFD_RELOC_X86_64_PLT32,
- BFD_RELOC_X86_64_COPY,
- BFD_RELOC_X86_64_GLOB_DAT,
- BFD_RELOC_X86_64_JUMP_SLOT,
- BFD_RELOC_X86_64_RELATIVE,
- BFD_RELOC_X86_64_GOTPCREL,
- BFD_RELOC_X86_64_32S,
- BFD_RELOC_X86_64_DTPMOD64,
- BFD_RELOC_X86_64_DTPOFF64,
- BFD_RELOC_X86_64_TPOFF64,
- BFD_RELOC_X86_64_TLSGD,
- BFD_RELOC_X86_64_TLSLD,
- BFD_RELOC_X86_64_DTPOFF32,
- BFD_RELOC_X86_64_GOTTPOFF,
- BFD_RELOC_X86_64_TPOFF32,
- BFD_RELOC_X86_64_GOTOFF64,
- BFD_RELOC_X86_64_GOTPC32,
- BFD_RELOC_X86_64_GOT64,
- BFD_RELOC_X86_64_GOTPCREL64,
- BFD_RELOC_X86_64_GOTPC64,
- BFD_RELOC_X86_64_GOTPLT64,
- BFD_RELOC_X86_64_PLTOFF64,
- BFD_RELOC_X86_64_GOTPC32_TLSDESC,
- BFD_RELOC_X86_64_TLSDESC_CALL,
- BFD_RELOC_X86_64_TLSDESC,
- BFD_RELOC_X86_64_IRELATIVE,
- BFD_RELOC_X86_64_PC32_BND,
- BFD_RELOC_X86_64_PLT32_BND,
- BFD_RELOC_X86_64_GOTPCRELX,
- BFD_RELOC_X86_64_REX_GOTPCRELX,
-
-/* ns32k relocations */
- BFD_RELOC_NS32K_IMM_8,
- BFD_RELOC_NS32K_IMM_16,
- BFD_RELOC_NS32K_IMM_32,
- BFD_RELOC_NS32K_IMM_8_PCREL,
- BFD_RELOC_NS32K_IMM_16_PCREL,
- BFD_RELOC_NS32K_IMM_32_PCREL,
- BFD_RELOC_NS32K_DISP_8,
- BFD_RELOC_NS32K_DISP_16,
- BFD_RELOC_NS32K_DISP_32,
- BFD_RELOC_NS32K_DISP_8_PCREL,
- BFD_RELOC_NS32K_DISP_16_PCREL,
- BFD_RELOC_NS32K_DISP_32_PCREL,
-
-/* PDP11 relocations */
- BFD_RELOC_PDP11_DISP_8_PCREL,
- BFD_RELOC_PDP11_DISP_6_PCREL,
-
-/* Picojava relocs. Not all of these appear in object files. */
- BFD_RELOC_PJ_CODE_HI16,
- BFD_RELOC_PJ_CODE_LO16,
- BFD_RELOC_PJ_CODE_DIR16,
- BFD_RELOC_PJ_CODE_DIR32,
- BFD_RELOC_PJ_CODE_REL16,
- BFD_RELOC_PJ_CODE_REL32,
-
-/* Power(rs6000) and PowerPC relocations. */
- BFD_RELOC_PPC_B26,
- BFD_RELOC_PPC_BA26,
- BFD_RELOC_PPC_TOC16,
- BFD_RELOC_PPC_B16,
- BFD_RELOC_PPC_B16_BRTAKEN,
- BFD_RELOC_PPC_B16_BRNTAKEN,
- BFD_RELOC_PPC_BA16,
- BFD_RELOC_PPC_BA16_BRTAKEN,
- BFD_RELOC_PPC_BA16_BRNTAKEN,
- BFD_RELOC_PPC_COPY,
- BFD_RELOC_PPC_GLOB_DAT,
- BFD_RELOC_PPC_JMP_SLOT,
- BFD_RELOC_PPC_RELATIVE,
- BFD_RELOC_PPC_LOCAL24PC,
- BFD_RELOC_PPC_EMB_NADDR32,
- BFD_RELOC_PPC_EMB_NADDR16,
- BFD_RELOC_PPC_EMB_NADDR16_LO,
- BFD_RELOC_PPC_EMB_NADDR16_HI,
- BFD_RELOC_PPC_EMB_NADDR16_HA,
- BFD_RELOC_PPC_EMB_SDAI16,
- BFD_RELOC_PPC_EMB_SDA2I16,
- BFD_RELOC_PPC_EMB_SDA2REL,
- BFD_RELOC_PPC_EMB_SDA21,
- BFD_RELOC_PPC_EMB_MRKREF,
- BFD_RELOC_PPC_EMB_RELSEC16,
- BFD_RELOC_PPC_EMB_RELST_LO,
- BFD_RELOC_PPC_EMB_RELST_HI,
- BFD_RELOC_PPC_EMB_RELST_HA,
- BFD_RELOC_PPC_EMB_BIT_FLD,
- BFD_RELOC_PPC_EMB_RELSDA,
- BFD_RELOC_PPC_VLE_REL8,
- BFD_RELOC_PPC_VLE_REL15,
- BFD_RELOC_PPC_VLE_REL24,
- BFD_RELOC_PPC_VLE_LO16A,
- BFD_RELOC_PPC_VLE_LO16D,
- BFD_RELOC_PPC_VLE_HI16A,
- BFD_RELOC_PPC_VLE_HI16D,
- BFD_RELOC_PPC_VLE_HA16A,
- BFD_RELOC_PPC_VLE_HA16D,
- BFD_RELOC_PPC_VLE_SDA21,
- BFD_RELOC_PPC_VLE_SDA21_LO,
- BFD_RELOC_PPC_VLE_SDAREL_LO16A,
- BFD_RELOC_PPC_VLE_SDAREL_LO16D,
- BFD_RELOC_PPC_VLE_SDAREL_HI16A,
- BFD_RELOC_PPC_VLE_SDAREL_HI16D,
- BFD_RELOC_PPC_VLE_SDAREL_HA16A,
- BFD_RELOC_PPC_VLE_SDAREL_HA16D,
- BFD_RELOC_PPC_16DX_HA,
- BFD_RELOC_PPC_REL16DX_HA,
- BFD_RELOC_PPC64_HIGHER,
- BFD_RELOC_PPC64_HIGHER_S,
- BFD_RELOC_PPC64_HIGHEST,
- BFD_RELOC_PPC64_HIGHEST_S,
- BFD_RELOC_PPC64_TOC16_LO,
- BFD_RELOC_PPC64_TOC16_HI,
- BFD_RELOC_PPC64_TOC16_HA,
- BFD_RELOC_PPC64_TOC,
- BFD_RELOC_PPC64_PLTGOT16,
- BFD_RELOC_PPC64_PLTGOT16_LO,
- BFD_RELOC_PPC64_PLTGOT16_HI,
- BFD_RELOC_PPC64_PLTGOT16_HA,
- BFD_RELOC_PPC64_ADDR16_DS,
- BFD_RELOC_PPC64_ADDR16_LO_DS,
- BFD_RELOC_PPC64_GOT16_DS,
- BFD_RELOC_PPC64_GOT16_LO_DS,
- BFD_RELOC_PPC64_PLT16_LO_DS,
- BFD_RELOC_PPC64_SECTOFF_DS,
- BFD_RELOC_PPC64_SECTOFF_LO_DS,
- BFD_RELOC_PPC64_TOC16_DS,
- BFD_RELOC_PPC64_TOC16_LO_DS,
- BFD_RELOC_PPC64_PLTGOT16_DS,
- BFD_RELOC_PPC64_PLTGOT16_LO_DS,
- BFD_RELOC_PPC64_ADDR16_HIGH,
- BFD_RELOC_PPC64_ADDR16_HIGHA,
- BFD_RELOC_PPC64_REL16_HIGH,
- BFD_RELOC_PPC64_REL16_HIGHA,
- BFD_RELOC_PPC64_REL16_HIGHER,
- BFD_RELOC_PPC64_REL16_HIGHERA,
- BFD_RELOC_PPC64_REL16_HIGHEST,
- BFD_RELOC_PPC64_REL16_HIGHESTA,
- BFD_RELOC_PPC64_ADDR64_LOCAL,
- BFD_RELOC_PPC64_ENTRY,
- BFD_RELOC_PPC64_REL24_NOTOC,
-
-/* PowerPC and PowerPC64 thread-local storage relocations. */
- BFD_RELOC_PPC_TLS,
- BFD_RELOC_PPC_TLSGD,
- BFD_RELOC_PPC_TLSLD,
- BFD_RELOC_PPC_DTPMOD,
- BFD_RELOC_PPC_TPREL16,
- BFD_RELOC_PPC_TPREL16_LO,
- BFD_RELOC_PPC_TPREL16_HI,
- BFD_RELOC_PPC_TPREL16_HA,
- BFD_RELOC_PPC_TPREL,
- BFD_RELOC_PPC_DTPREL16,
- BFD_RELOC_PPC_DTPREL16_LO,
- BFD_RELOC_PPC_DTPREL16_HI,
- BFD_RELOC_PPC_DTPREL16_HA,
- BFD_RELOC_PPC_DTPREL,
- BFD_RELOC_PPC_GOT_TLSGD16,
- BFD_RELOC_PPC_GOT_TLSGD16_LO,
- BFD_RELOC_PPC_GOT_TLSGD16_HI,
- BFD_RELOC_PPC_GOT_TLSGD16_HA,
- BFD_RELOC_PPC_GOT_TLSLD16,
- BFD_RELOC_PPC_GOT_TLSLD16_LO,
- BFD_RELOC_PPC_GOT_TLSLD16_HI,
- BFD_RELOC_PPC_GOT_TLSLD16_HA,
- BFD_RELOC_PPC_GOT_TPREL16,
- BFD_RELOC_PPC_GOT_TPREL16_LO,
- BFD_RELOC_PPC_GOT_TPREL16_HI,
- BFD_RELOC_PPC_GOT_TPREL16_HA,
- BFD_RELOC_PPC_GOT_DTPREL16,
- BFD_RELOC_PPC_GOT_DTPREL16_LO,
- BFD_RELOC_PPC_GOT_DTPREL16_HI,
- BFD_RELOC_PPC_GOT_DTPREL16_HA,
- BFD_RELOC_PPC64_TPREL16_DS,
- BFD_RELOC_PPC64_TPREL16_LO_DS,
- BFD_RELOC_PPC64_TPREL16_HIGHER,
- BFD_RELOC_PPC64_TPREL16_HIGHERA,
- BFD_RELOC_PPC64_TPREL16_HIGHEST,
- BFD_RELOC_PPC64_TPREL16_HIGHESTA,
- BFD_RELOC_PPC64_DTPREL16_DS,
- BFD_RELOC_PPC64_DTPREL16_LO_DS,
- BFD_RELOC_PPC64_DTPREL16_HIGHER,
- BFD_RELOC_PPC64_DTPREL16_HIGHERA,
- BFD_RELOC_PPC64_DTPREL16_HIGHEST,
- BFD_RELOC_PPC64_DTPREL16_HIGHESTA,
- BFD_RELOC_PPC64_TPREL16_HIGH,
- BFD_RELOC_PPC64_TPREL16_HIGHA,
- BFD_RELOC_PPC64_DTPREL16_HIGH,
- BFD_RELOC_PPC64_DTPREL16_HIGHA,
-
-/* IBM 370/390 relocations */
- BFD_RELOC_I370_D12,
-
-/* The type of reloc used to build a constructor table - at the moment
-probably a 32 bit wide absolute relocation, but the target can choose.
-It generally does map to one of the other relocation types. */
- BFD_RELOC_CTOR,
-
-/* ARM 26 bit pc-relative branch. The lowest two bits must be zero and are
-not stored in the instruction. */
- BFD_RELOC_ARM_PCREL_BRANCH,
-
-/* ARM 26 bit pc-relative branch. The lowest bit must be zero and is
-not stored in the instruction. The 2nd lowest bit comes from a 1 bit
-field in the instruction. */
- BFD_RELOC_ARM_PCREL_BLX,
-
-/* Thumb 22 bit pc-relative branch. The lowest bit must be zero and is
-not stored in the instruction. The 2nd lowest bit comes from a 1 bit
-field in the instruction. */
- BFD_RELOC_THUMB_PCREL_BLX,
-
-/* ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction. */
- BFD_RELOC_ARM_PCREL_CALL,
-
-/* ARM 26-bit pc-relative branch for B or conditional BL instruction. */
- BFD_RELOC_ARM_PCREL_JUMP,
-
-/* Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches.
-The lowest bit must be zero and is not stored in the instruction.
-Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an
-"nn" one smaller in all cases. Note further that BRANCH23
-corresponds to R_ARM_THM_CALL. */
- BFD_RELOC_THUMB_PCREL_BRANCH7,
- BFD_RELOC_THUMB_PCREL_BRANCH9,
- BFD_RELOC_THUMB_PCREL_BRANCH12,
- BFD_RELOC_THUMB_PCREL_BRANCH20,
- BFD_RELOC_THUMB_PCREL_BRANCH23,
- BFD_RELOC_THUMB_PCREL_BRANCH25,
-
-/* 12-bit immediate offset, used in ARM-format ldr and str instructions. */
- BFD_RELOC_ARM_OFFSET_IMM,
-
-/* 5-bit immediate offset, used in Thumb-format ldr and str instructions. */
- BFD_RELOC_ARM_THUMB_OFFSET,
-
-/* Pc-relative or absolute relocation depending on target. Used for
-entries in .init_array sections. */
- BFD_RELOC_ARM_TARGET1,
-
-/* Read-only segment base relative address. */
- BFD_RELOC_ARM_ROSEGREL32,
-
-/* Data segment base relative address. */
- BFD_RELOC_ARM_SBREL32,
-
-/* This reloc is used for references to RTTI data from exception handling
-tables. The actual definition depends on the target. It may be a
-pc-relative or some form of GOT-indirect relocation. */
- BFD_RELOC_ARM_TARGET2,
-
-/* 31-bit PC relative address. */
- BFD_RELOC_ARM_PREL31,
-
-/* Low and High halfword relocations for MOVW and MOVT instructions. */
- BFD_RELOC_ARM_MOVW,
- BFD_RELOC_ARM_MOVT,
- BFD_RELOC_ARM_MOVW_PCREL,
- BFD_RELOC_ARM_MOVT_PCREL,
- BFD_RELOC_ARM_THUMB_MOVW,
- BFD_RELOC_ARM_THUMB_MOVT,
- BFD_RELOC_ARM_THUMB_MOVW_PCREL,
- BFD_RELOC_ARM_THUMB_MOVT_PCREL,
-
-/* ARM FDPIC specific relocations. */
- BFD_RELOC_ARM_GOTFUNCDESC,
- BFD_RELOC_ARM_GOTOFFFUNCDESC,
- BFD_RELOC_ARM_FUNCDESC,
- BFD_RELOC_ARM_FUNCDESC_VALUE,
- BFD_RELOC_ARM_TLS_GD32_FDPIC,
- BFD_RELOC_ARM_TLS_LDM32_FDPIC,
- BFD_RELOC_ARM_TLS_IE32_FDPIC,
-
-/* Relocations for setting up GOTs and PLTs for shared libraries. */
- BFD_RELOC_ARM_JUMP_SLOT,
- BFD_RELOC_ARM_GLOB_DAT,
- BFD_RELOC_ARM_GOT32,
- BFD_RELOC_ARM_PLT32,
- BFD_RELOC_ARM_RELATIVE,
- BFD_RELOC_ARM_GOTOFF,
- BFD_RELOC_ARM_GOTPC,
- BFD_RELOC_ARM_GOT_PREL,
-
-/* ARM thread-local storage relocations. */
- BFD_RELOC_ARM_TLS_GD32,
- BFD_RELOC_ARM_TLS_LDO32,
- BFD_RELOC_ARM_TLS_LDM32,
- BFD_RELOC_ARM_TLS_DTPOFF32,
- BFD_RELOC_ARM_TLS_DTPMOD32,
- BFD_RELOC_ARM_TLS_TPOFF32,
- BFD_RELOC_ARM_TLS_IE32,
- BFD_RELOC_ARM_TLS_LE32,
- BFD_RELOC_ARM_TLS_GOTDESC,
- BFD_RELOC_ARM_TLS_CALL,
- BFD_RELOC_ARM_THM_TLS_CALL,
- BFD_RELOC_ARM_TLS_DESCSEQ,
- BFD_RELOC_ARM_THM_TLS_DESCSEQ,
- BFD_RELOC_ARM_TLS_DESC,
-
-/* ARM group relocations. */
- BFD_RELOC_ARM_ALU_PC_G0_NC,
- BFD_RELOC_ARM_ALU_PC_G0,
- BFD_RELOC_ARM_ALU_PC_G1_NC,
- BFD_RELOC_ARM_ALU_PC_G1,
- BFD_RELOC_ARM_ALU_PC_G2,
- BFD_RELOC_ARM_LDR_PC_G0,
- BFD_RELOC_ARM_LDR_PC_G1,
- BFD_RELOC_ARM_LDR_PC_G2,
- BFD_RELOC_ARM_LDRS_PC_G0,
- BFD_RELOC_ARM_LDRS_PC_G1,
- BFD_RELOC_ARM_LDRS_PC_G2,
- BFD_RELOC_ARM_LDC_PC_G0,
- BFD_RELOC_ARM_LDC_PC_G1,
- BFD_RELOC_ARM_LDC_PC_G2,
- BFD_RELOC_ARM_ALU_SB_G0_NC,
- BFD_RELOC_ARM_ALU_SB_G0,
- BFD_RELOC_ARM_ALU_SB_G1_NC,
- BFD_RELOC_ARM_ALU_SB_G1,
- BFD_RELOC_ARM_ALU_SB_G2,
- BFD_RELOC_ARM_LDR_SB_G0,
- BFD_RELOC_ARM_LDR_SB_G1,
- BFD_RELOC_ARM_LDR_SB_G2,
- BFD_RELOC_ARM_LDRS_SB_G0,
- BFD_RELOC_ARM_LDRS_SB_G1,
- BFD_RELOC_ARM_LDRS_SB_G2,
- BFD_RELOC_ARM_LDC_SB_G0,
- BFD_RELOC_ARM_LDC_SB_G1,
- BFD_RELOC_ARM_LDC_SB_G2,
-
-/* Annotation of BX instructions. */
- BFD_RELOC_ARM_V4BX,
-
-/* ARM support for STT_GNU_IFUNC. */
- BFD_RELOC_ARM_IRELATIVE,
-
-/* Thumb1 relocations to support execute-only code. */
- BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC,
- BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC,
- BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC,
- BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC,
-
-/* These relocs are only used within the ARM assembler. They are not
-(at present) written to any object files. */
- BFD_RELOC_ARM_IMMEDIATE,
- BFD_RELOC_ARM_ADRL_IMMEDIATE,
- BFD_RELOC_ARM_T32_IMMEDIATE,
- BFD_RELOC_ARM_T32_ADD_IMM,
- BFD_RELOC_ARM_T32_IMM12,
- BFD_RELOC_ARM_T32_ADD_PC12,
- BFD_RELOC_ARM_SHIFT_IMM,
- BFD_RELOC_ARM_SMC,
- BFD_RELOC_ARM_HVC,
- BFD_RELOC_ARM_SWI,
- BFD_RELOC_ARM_MULTI,
- BFD_RELOC_ARM_CP_OFF_IMM,
- BFD_RELOC_ARM_CP_OFF_IMM_S2,
- BFD_RELOC_ARM_T32_CP_OFF_IMM,
- BFD_RELOC_ARM_T32_CP_OFF_IMM_S2,
- BFD_RELOC_ARM_ADR_IMM,
- BFD_RELOC_ARM_LDR_IMM,
- BFD_RELOC_ARM_LITERAL,
- BFD_RELOC_ARM_IN_POOL,
- BFD_RELOC_ARM_OFFSET_IMM8,
- BFD_RELOC_ARM_T32_OFFSET_U8,
- BFD_RELOC_ARM_T32_OFFSET_IMM,
- BFD_RELOC_ARM_HWLITERAL,
- BFD_RELOC_ARM_THUMB_ADD,
- BFD_RELOC_ARM_THUMB_IMM,
- BFD_RELOC_ARM_THUMB_SHIFT,
-
-/* Renesas / SuperH SH relocs. Not all of these appear in object files. */
- BFD_RELOC_SH_PCDISP8BY2,
- BFD_RELOC_SH_PCDISP12BY2,
- BFD_RELOC_SH_IMM3,
- BFD_RELOC_SH_IMM3U,
- BFD_RELOC_SH_DISP12,
- BFD_RELOC_SH_DISP12BY2,
- BFD_RELOC_SH_DISP12BY4,
- BFD_RELOC_SH_DISP12BY8,
- BFD_RELOC_SH_DISP20,
- BFD_RELOC_SH_DISP20BY8,
- BFD_RELOC_SH_IMM4,
- BFD_RELOC_SH_IMM4BY2,
- BFD_RELOC_SH_IMM4BY4,
- BFD_RELOC_SH_IMM8,
- BFD_RELOC_SH_IMM8BY2,
- BFD_RELOC_SH_IMM8BY4,
- BFD_RELOC_SH_PCRELIMM8BY2,
- BFD_RELOC_SH_PCRELIMM8BY4,
- BFD_RELOC_SH_SWITCH16,
- BFD_RELOC_SH_SWITCH32,
- BFD_RELOC_SH_USES,
- BFD_RELOC_SH_COUNT,
- BFD_RELOC_SH_ALIGN,
- BFD_RELOC_SH_CODE,
- BFD_RELOC_SH_DATA,
- BFD_RELOC_SH_LABEL,
- BFD_RELOC_SH_LOOP_START,
- BFD_RELOC_SH_LOOP_END,
- BFD_RELOC_SH_COPY,
- BFD_RELOC_SH_GLOB_DAT,
- BFD_RELOC_SH_JMP_SLOT,
- BFD_RELOC_SH_RELATIVE,
- BFD_RELOC_SH_GOTPC,
- BFD_RELOC_SH_GOT_LOW16,
- BFD_RELOC_SH_GOT_MEDLOW16,
- BFD_RELOC_SH_GOT_MEDHI16,
- BFD_RELOC_SH_GOT_HI16,
- BFD_RELOC_SH_GOTPLT_LOW16,
- BFD_RELOC_SH_GOTPLT_MEDLOW16,
- BFD_RELOC_SH_GOTPLT_MEDHI16,
- BFD_RELOC_SH_GOTPLT_HI16,
- BFD_RELOC_SH_PLT_LOW16,
- BFD_RELOC_SH_PLT_MEDLOW16,
- BFD_RELOC_SH_PLT_MEDHI16,
- BFD_RELOC_SH_PLT_HI16,
- BFD_RELOC_SH_GOTOFF_LOW16,
- BFD_RELOC_SH_GOTOFF_MEDLOW16,
- BFD_RELOC_SH_GOTOFF_MEDHI16,
- BFD_RELOC_SH_GOTOFF_HI16,
- BFD_RELOC_SH_GOTPC_LOW16,
- BFD_RELOC_SH_GOTPC_MEDLOW16,
- BFD_RELOC_SH_GOTPC_MEDHI16,
- BFD_RELOC_SH_GOTPC_HI16,
- BFD_RELOC_SH_COPY64,
- BFD_RELOC_SH_GLOB_DAT64,
- BFD_RELOC_SH_JMP_SLOT64,
- BFD_RELOC_SH_RELATIVE64,
- BFD_RELOC_SH_GOT10BY4,
- BFD_RELOC_SH_GOT10BY8,
- BFD_RELOC_SH_GOTPLT10BY4,
- BFD_RELOC_SH_GOTPLT10BY8,
- BFD_RELOC_SH_GOTPLT32,
- BFD_RELOC_SH_SHMEDIA_CODE,
- BFD_RELOC_SH_IMMU5,
- BFD_RELOC_SH_IMMS6,
- BFD_RELOC_SH_IMMS6BY32,
- BFD_RELOC_SH_IMMU6,
- BFD_RELOC_SH_IMMS10,
- BFD_RELOC_SH_IMMS10BY2,
- BFD_RELOC_SH_IMMS10BY4,
- BFD_RELOC_SH_IMMS10BY8,
- BFD_RELOC_SH_IMMS16,
- BFD_RELOC_SH_IMMU16,
- BFD_RELOC_SH_IMM_LOW16,
- BFD_RELOC_SH_IMM_LOW16_PCREL,
- BFD_RELOC_SH_IMM_MEDLOW16,
- BFD_RELOC_SH_IMM_MEDLOW16_PCREL,
- BFD_RELOC_SH_IMM_MEDHI16,
- BFD_RELOC_SH_IMM_MEDHI16_PCREL,
- BFD_RELOC_SH_IMM_HI16,
- BFD_RELOC_SH_IMM_HI16_PCREL,
- BFD_RELOC_SH_PT_16,
- BFD_RELOC_SH_TLS_GD_32,
- BFD_RELOC_SH_TLS_LD_32,
- BFD_RELOC_SH_TLS_LDO_32,
- BFD_RELOC_SH_TLS_IE_32,
- BFD_RELOC_SH_TLS_LE_32,
- BFD_RELOC_SH_TLS_DTPMOD32,
- BFD_RELOC_SH_TLS_DTPOFF32,
- BFD_RELOC_SH_TLS_TPOFF32,
- BFD_RELOC_SH_GOT20,
- BFD_RELOC_SH_GOTOFF20,
- BFD_RELOC_SH_GOTFUNCDESC,
- BFD_RELOC_SH_GOTFUNCDESC20,
- BFD_RELOC_SH_GOTOFFFUNCDESC,
- BFD_RELOC_SH_GOTOFFFUNCDESC20,
- BFD_RELOC_SH_FUNCDESC,
-
-/* ARC relocs. */
- BFD_RELOC_ARC_NONE,
- BFD_RELOC_ARC_8,
- BFD_RELOC_ARC_16,
- BFD_RELOC_ARC_24,
- BFD_RELOC_ARC_32,
- BFD_RELOC_ARC_N8,
- BFD_RELOC_ARC_N16,
- BFD_RELOC_ARC_N24,
- BFD_RELOC_ARC_N32,
- BFD_RELOC_ARC_SDA,
- BFD_RELOC_ARC_SECTOFF,
- BFD_RELOC_ARC_S21H_PCREL,
- BFD_RELOC_ARC_S21W_PCREL,
- BFD_RELOC_ARC_S25H_PCREL,
- BFD_RELOC_ARC_S25W_PCREL,
- BFD_RELOC_ARC_SDA32,
- BFD_RELOC_ARC_SDA_LDST,
- BFD_RELOC_ARC_SDA_LDST1,
- BFD_RELOC_ARC_SDA_LDST2,
- BFD_RELOC_ARC_SDA16_LD,
- BFD_RELOC_ARC_SDA16_LD1,
- BFD_RELOC_ARC_SDA16_LD2,
- BFD_RELOC_ARC_S13_PCREL,
- BFD_RELOC_ARC_W,
- BFD_RELOC_ARC_32_ME,
- BFD_RELOC_ARC_32_ME_S,
- BFD_RELOC_ARC_N32_ME,
- BFD_RELOC_ARC_SECTOFF_ME,
- BFD_RELOC_ARC_SDA32_ME,
- BFD_RELOC_ARC_W_ME,
- BFD_RELOC_AC_SECTOFF_U8,
- BFD_RELOC_AC_SECTOFF_U8_1,
- BFD_RELOC_AC_SECTOFF_U8_2,
- BFD_RELOC_AC_SECTOFF_S9,
- BFD_RELOC_AC_SECTOFF_S9_1,
- BFD_RELOC_AC_SECTOFF_S9_2,
- BFD_RELOC_ARC_SECTOFF_ME_1,
- BFD_RELOC_ARC_SECTOFF_ME_2,
- BFD_RELOC_ARC_SECTOFF_1,
- BFD_RELOC_ARC_SECTOFF_2,
- BFD_RELOC_ARC_SDA_12,
- BFD_RELOC_ARC_SDA16_ST2,
- BFD_RELOC_ARC_32_PCREL,
- BFD_RELOC_ARC_PC32,
- BFD_RELOC_ARC_GOT32,
- BFD_RELOC_ARC_GOTPC32,
- BFD_RELOC_ARC_PLT32,
- BFD_RELOC_ARC_COPY,
- BFD_RELOC_ARC_GLOB_DAT,
- BFD_RELOC_ARC_JMP_SLOT,
- BFD_RELOC_ARC_RELATIVE,
- BFD_RELOC_ARC_GOTOFF,
- BFD_RELOC_ARC_GOTPC,
- BFD_RELOC_ARC_S21W_PCREL_PLT,
- BFD_RELOC_ARC_S25H_PCREL_PLT,
- BFD_RELOC_ARC_TLS_DTPMOD,
- BFD_RELOC_ARC_TLS_TPOFF,
- BFD_RELOC_ARC_TLS_GD_GOT,
- BFD_RELOC_ARC_TLS_GD_LD,
- BFD_RELOC_ARC_TLS_GD_CALL,
- BFD_RELOC_ARC_TLS_IE_GOT,
- BFD_RELOC_ARC_TLS_DTPOFF,
- BFD_RELOC_ARC_TLS_DTPOFF_S9,
- BFD_RELOC_ARC_TLS_LE_S9,
- BFD_RELOC_ARC_TLS_LE_32,
- BFD_RELOC_ARC_S25W_PCREL_PLT,
- BFD_RELOC_ARC_S21H_PCREL_PLT,
- BFD_RELOC_ARC_NPS_CMEM16,
- BFD_RELOC_ARC_JLI_SECTOFF,
-
-/* ADI Blackfin 16 bit immediate absolute reloc. */
- BFD_RELOC_BFIN_16_IMM,
-
-/* ADI Blackfin 16 bit immediate absolute reloc higher 16 bits. */
- BFD_RELOC_BFIN_16_HIGH,
-
-/* ADI Blackfin 'a' part of LSETUP. */
- BFD_RELOC_BFIN_4_PCREL,
-
-/* ADI Blackfin. */
- BFD_RELOC_BFIN_5_PCREL,
-
-/* ADI Blackfin 16 bit immediate absolute reloc lower 16 bits. */
- BFD_RELOC_BFIN_16_LOW,
-
-/* ADI Blackfin. */
- BFD_RELOC_BFIN_10_PCREL,
-
-/* ADI Blackfin 'b' part of LSETUP. */
- BFD_RELOC_BFIN_11_PCREL,
-
-/* ADI Blackfin. */
- BFD_RELOC_BFIN_12_PCREL_JUMP,
-
-/* ADI Blackfin Short jump, pcrel. */
- BFD_RELOC_BFIN_12_PCREL_JUMP_S,
-
-/* ADI Blackfin Call.x not implemented. */
- BFD_RELOC_BFIN_24_PCREL_CALL_X,
-
-/* ADI Blackfin Long Jump pcrel. */
- BFD_RELOC_BFIN_24_PCREL_JUMP_L,
-
-/* ADI Blackfin FD-PIC relocations. */
- BFD_RELOC_BFIN_GOT17M4,
- BFD_RELOC_BFIN_GOTHI,
- BFD_RELOC_BFIN_GOTLO,
- BFD_RELOC_BFIN_FUNCDESC,
- BFD_RELOC_BFIN_FUNCDESC_GOT17M4,
- BFD_RELOC_BFIN_FUNCDESC_GOTHI,
- BFD_RELOC_BFIN_FUNCDESC_GOTLO,
- BFD_RELOC_BFIN_FUNCDESC_VALUE,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO,
- BFD_RELOC_BFIN_GOTOFF17M4,
- BFD_RELOC_BFIN_GOTOFFHI,
- BFD_RELOC_BFIN_GOTOFFLO,
-
-/* ADI Blackfin GOT relocation. */
- BFD_RELOC_BFIN_GOT,
-
-/* ADI Blackfin PLTPC relocation. */
- BFD_RELOC_BFIN_PLTPC,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_PUSH,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_CONST,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_ADD,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_SUB,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_MULT,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_DIV,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_MOD,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LSHIFT,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_RSHIFT,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_AND,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_OR,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_XOR,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LAND,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LOR,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_LEN,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_NEG,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_COMP,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_PAGE,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_HWPAGE,
-
-/* ADI Blackfin arithmetic relocation. */
- BFD_ARELOC_BFIN_ADDR,
-
-/* Mitsubishi D10V relocs.
-This is a 10-bit reloc with the right 2 bits
-assumed to be 0. */
- BFD_RELOC_D10V_10_PCREL_R,
-
-/* Mitsubishi D10V relocs.
-This is a 10-bit reloc with the right 2 bits
-assumed to be 0. This is the same as the previous reloc
-except it is in the left container, i.e.,
-shifted left 15 bits. */
- BFD_RELOC_D10V_10_PCREL_L,
-
-/* This is an 18-bit reloc with the right 2 bits
-assumed to be 0. */
- BFD_RELOC_D10V_18,
-
-/* This is an 18-bit reloc with the right 2 bits
-assumed to be 0. */
- BFD_RELOC_D10V_18_PCREL,
-
-/* Mitsubishi D30V relocs.
-This is a 6-bit absolute reloc. */
- BFD_RELOC_D30V_6,
-
-/* This is a 6-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_9_PCREL,
-
-/* This is a 6-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
- BFD_RELOC_D30V_9_PCREL_R,
-
-/* This is a 12-bit absolute reloc with the
-right 3 bitsassumed to be 0. */
- BFD_RELOC_D30V_15,
-
-/* This is a 12-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_15_PCREL,
-
-/* This is a 12-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
- BFD_RELOC_D30V_15_PCREL_R,
-
-/* This is an 18-bit absolute reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_21,
-
-/* This is an 18-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
- BFD_RELOC_D30V_21_PCREL,
-
-/* This is an 18-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
- BFD_RELOC_D30V_21_PCREL_R,
-
-/* This is a 32-bit absolute reloc. */
- BFD_RELOC_D30V_32,
-
-/* This is a 32-bit pc-relative reloc. */
- BFD_RELOC_D30V_32_PCREL,
-
-/* DLX relocs */
- BFD_RELOC_DLX_HI16_S,
-
-/* DLX relocs */
- BFD_RELOC_DLX_LO16,
-
-/* DLX relocs */
- BFD_RELOC_DLX_JMP26,
-
-/* Renesas M16C/M32C Relocations. */
- BFD_RELOC_M32C_HI8,
- BFD_RELOC_M32C_RL_JUMP,
- BFD_RELOC_M32C_RL_1ADDR,
- BFD_RELOC_M32C_RL_2ADDR,
-
-/* Renesas M32R (formerly Mitsubishi M32R) relocs.
-This is a 24 bit absolute address. */
- BFD_RELOC_M32R_24,
-
-/* This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0. */
- BFD_RELOC_M32R_10_PCREL,
-
-/* This is an 18-bit reloc with the right 2 bits assumed to be 0. */
- BFD_RELOC_M32R_18_PCREL,
-
-/* This is a 26-bit reloc with the right 2 bits assumed to be 0. */
- BFD_RELOC_M32R_26_PCREL,
-
-/* This is a 16-bit reloc containing the high 16 bits of an address
-used when the lower 16 bits are treated as unsigned. */
- BFD_RELOC_M32R_HI16_ULO,
-
-/* This is a 16-bit reloc containing the high 16 bits of an address
-used when the lower 16 bits are treated as signed. */
- BFD_RELOC_M32R_HI16_SLO,
-
-/* This is a 16-bit reloc containing the lower 16 bits of an address. */
- BFD_RELOC_M32R_LO16,
-
-/* This is a 16-bit reloc containing the small data area offset for use in
-add3, load, and store instructions. */
- BFD_RELOC_M32R_SDA16,
-
-/* For PIC. */
- BFD_RELOC_M32R_GOT24,
- BFD_RELOC_M32R_26_PLTREL,
- BFD_RELOC_M32R_COPY,
- BFD_RELOC_M32R_GLOB_DAT,
- BFD_RELOC_M32R_JMP_SLOT,
- BFD_RELOC_M32R_RELATIVE,
- BFD_RELOC_M32R_GOTOFF,
- BFD_RELOC_M32R_GOTOFF_HI_ULO,
- BFD_RELOC_M32R_GOTOFF_HI_SLO,
- BFD_RELOC_M32R_GOTOFF_LO,
- BFD_RELOC_M32R_GOTPC24,
- BFD_RELOC_M32R_GOT16_HI_ULO,
- BFD_RELOC_M32R_GOT16_HI_SLO,
- BFD_RELOC_M32R_GOT16_LO,
- BFD_RELOC_M32R_GOTPC_HI_ULO,
- BFD_RELOC_M32R_GOTPC_HI_SLO,
- BFD_RELOC_M32R_GOTPC_LO,
-
-/* NDS32 relocs.
-This is a 20 bit absolute address. */
- BFD_RELOC_NDS32_20,
-
-/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_9_PCREL,
-
-/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_WORD_9_PCREL,
-
-/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_15_PCREL,
-
-/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_17_PCREL,
-
-/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_25_PCREL,
-
-/* This is a 20-bit reloc containing the high 20 bits of an address
-used with the lower 12 bits */
- BFD_RELOC_NDS32_HI20,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift right by 3. This is used with ldi,sdi... */
- BFD_RELOC_NDS32_LO12S3,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 2. This is used with lwi,swi... */
- BFD_RELOC_NDS32_LO12S2,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 1. This is used with lhi,shi... */
- BFD_RELOC_NDS32_LO12S1,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 0. This is used with lbisbi... */
- BFD_RELOC_NDS32_LO12S0,
-
-/* This is a 12-bit reloc containing the lower 12 bits of an address
-then shift left by 0. This is only used with branch relaxations */
- BFD_RELOC_NDS32_LO12S0_ORI,
-
-/* This is a 15-bit reloc containing the small data area 18-bit signed offset
-and shift left by 3 for use in ldi, sdi... */
- BFD_RELOC_NDS32_SDA15S3,
-
-/* This is a 15-bit reloc containing the small data area 17-bit signed offset
-and shift left by 2 for use in lwi, swi... */
- BFD_RELOC_NDS32_SDA15S2,
-
-/* This is a 15-bit reloc containing the small data area 16-bit signed offset
-and shift left by 1 for use in lhi, shi... */
- BFD_RELOC_NDS32_SDA15S1,
-
-/* This is a 15-bit reloc containing the small data area 15-bit signed offset
-and shift left by 0 for use in lbi, sbi... */
- BFD_RELOC_NDS32_SDA15S0,
-
-/* This is a 16-bit reloc containing the small data area 16-bit signed offset
-and shift left by 3 */
- BFD_RELOC_NDS32_SDA16S3,
-
-/* This is a 17-bit reloc containing the small data area 17-bit signed offset
-and shift left by 2 for use in lwi.gp, swi.gp... */
- BFD_RELOC_NDS32_SDA17S2,
-
-/* This is a 18-bit reloc containing the small data area 18-bit signed offset
-and shift left by 1 for use in lhi.gp, shi.gp... */
- BFD_RELOC_NDS32_SDA18S1,
-
-/* This is a 19-bit reloc containing the small data area 19-bit signed offset
-and shift left by 0 for use in lbi.gp, sbi.gp... */
- BFD_RELOC_NDS32_SDA19S0,
-
-/* for PIC */
- BFD_RELOC_NDS32_GOT20,
- BFD_RELOC_NDS32_9_PLTREL,
- BFD_RELOC_NDS32_25_PLTREL,
- BFD_RELOC_NDS32_COPY,
- BFD_RELOC_NDS32_GLOB_DAT,
- BFD_RELOC_NDS32_JMP_SLOT,
- BFD_RELOC_NDS32_RELATIVE,
- BFD_RELOC_NDS32_GOTOFF,
- BFD_RELOC_NDS32_GOTOFF_HI20,
- BFD_RELOC_NDS32_GOTOFF_LO12,
- BFD_RELOC_NDS32_GOTPC20,
- BFD_RELOC_NDS32_GOT_HI20,
- BFD_RELOC_NDS32_GOT_LO12,
- BFD_RELOC_NDS32_GOTPC_HI20,
- BFD_RELOC_NDS32_GOTPC_LO12,
-
-/* for relax */
- BFD_RELOC_NDS32_INSN16,
- BFD_RELOC_NDS32_LABEL,
- BFD_RELOC_NDS32_LONGCALL1,
- BFD_RELOC_NDS32_LONGCALL2,
- BFD_RELOC_NDS32_LONGCALL3,
- BFD_RELOC_NDS32_LONGJUMP1,
- BFD_RELOC_NDS32_LONGJUMP2,
- BFD_RELOC_NDS32_LONGJUMP3,
- BFD_RELOC_NDS32_LOADSTORE,
- BFD_RELOC_NDS32_9_FIXED,
- BFD_RELOC_NDS32_15_FIXED,
- BFD_RELOC_NDS32_17_FIXED,
- BFD_RELOC_NDS32_25_FIXED,
- BFD_RELOC_NDS32_LONGCALL4,
- BFD_RELOC_NDS32_LONGCALL5,
- BFD_RELOC_NDS32_LONGCALL6,
- BFD_RELOC_NDS32_LONGJUMP4,
- BFD_RELOC_NDS32_LONGJUMP5,
- BFD_RELOC_NDS32_LONGJUMP6,
- BFD_RELOC_NDS32_LONGJUMP7,
-
-/* for PIC */
- BFD_RELOC_NDS32_PLTREL_HI20,
- BFD_RELOC_NDS32_PLTREL_LO12,
- BFD_RELOC_NDS32_PLT_GOTREL_HI20,
- BFD_RELOC_NDS32_PLT_GOTREL_LO12,
-
-/* for floating point */
- BFD_RELOC_NDS32_SDA12S2_DP,
- BFD_RELOC_NDS32_SDA12S2_SP,
- BFD_RELOC_NDS32_LO12S2_DP,
- BFD_RELOC_NDS32_LO12S2_SP,
-
-/* for dwarf2 debug_line. */
- BFD_RELOC_NDS32_DWARF2_OP1,
- BFD_RELOC_NDS32_DWARF2_OP2,
- BFD_RELOC_NDS32_DWARF2_LEB,
-
-/* for eliminate 16-bit instructions */
- BFD_RELOC_NDS32_UPDATE_TA,
-
-/* for PIC object relaxation */
- BFD_RELOC_NDS32_PLT_GOTREL_LO20,
- BFD_RELOC_NDS32_PLT_GOTREL_LO15,
- BFD_RELOC_NDS32_PLT_GOTREL_LO19,
- BFD_RELOC_NDS32_GOT_LO15,
- BFD_RELOC_NDS32_GOT_LO19,
- BFD_RELOC_NDS32_GOTOFF_LO15,
- BFD_RELOC_NDS32_GOTOFF_LO19,
- BFD_RELOC_NDS32_GOT15S2,
- BFD_RELOC_NDS32_GOT17S2,
-
-/* NDS32 relocs.
-This is a 5 bit absolute address. */
- BFD_RELOC_NDS32_5,
-
-/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */
- BFD_RELOC_NDS32_10_UPCREL,
-
-/* If fp were omitted, fp can used as another gp. */
- BFD_RELOC_NDS32_SDA_FP7U2_RELA,
-
-/* relaxation relative relocation types */
- BFD_RELOC_NDS32_RELAX_ENTRY,
- BFD_RELOC_NDS32_GOT_SUFF,
- BFD_RELOC_NDS32_GOTOFF_SUFF,
- BFD_RELOC_NDS32_PLT_GOT_SUFF,
- BFD_RELOC_NDS32_MULCALL_SUFF,
- BFD_RELOC_NDS32_PTR,
- BFD_RELOC_NDS32_PTR_COUNT,
- BFD_RELOC_NDS32_PTR_RESOLVED,
- BFD_RELOC_NDS32_PLTBLOCK,
- BFD_RELOC_NDS32_RELAX_REGION_BEGIN,
- BFD_RELOC_NDS32_RELAX_REGION_END,
- BFD_RELOC_NDS32_MINUEND,
- BFD_RELOC_NDS32_SUBTRAHEND,
- BFD_RELOC_NDS32_DIFF8,
- BFD_RELOC_NDS32_DIFF16,
- BFD_RELOC_NDS32_DIFF32,
- BFD_RELOC_NDS32_DIFF_ULEB128,
- BFD_RELOC_NDS32_EMPTY,
-
-/* This is a 25 bit absolute address. */
- BFD_RELOC_NDS32_25_ABS,
-
-/* For ex9 and ifc using. */
- BFD_RELOC_NDS32_DATA,
- BFD_RELOC_NDS32_TRAN,
- BFD_RELOC_NDS32_17IFC_PCREL,
- BFD_RELOC_NDS32_10IFCU_PCREL,
-
-/* For TLS. */
- BFD_RELOC_NDS32_TPOFF,
- BFD_RELOC_NDS32_GOTTPOFF,
- BFD_RELOC_NDS32_TLS_LE_HI20,
- BFD_RELOC_NDS32_TLS_LE_LO12,
- BFD_RELOC_NDS32_TLS_LE_20,
- BFD_RELOC_NDS32_TLS_LE_15S0,
- BFD_RELOC_NDS32_TLS_LE_15S1,
- BFD_RELOC_NDS32_TLS_LE_15S2,
- BFD_RELOC_NDS32_TLS_LE_ADD,
- BFD_RELOC_NDS32_TLS_LE_LS,
- BFD_RELOC_NDS32_TLS_IE_HI20,
- BFD_RELOC_NDS32_TLS_IE_LO12,
- BFD_RELOC_NDS32_TLS_IE_LO12S2,
- BFD_RELOC_NDS32_TLS_IEGP_HI20,
- BFD_RELOC_NDS32_TLS_IEGP_LO12,
- BFD_RELOC_NDS32_TLS_IEGP_LO12S2,
- BFD_RELOC_NDS32_TLS_IEGP_LW,
- BFD_RELOC_NDS32_TLS_DESC,
- BFD_RELOC_NDS32_TLS_DESC_HI20,
- BFD_RELOC_NDS32_TLS_DESC_LO12,
- BFD_RELOC_NDS32_TLS_DESC_20,
- BFD_RELOC_NDS32_TLS_DESC_SDA17S2,
- BFD_RELOC_NDS32_TLS_DESC_ADD,
- BFD_RELOC_NDS32_TLS_DESC_FUNC,
- BFD_RELOC_NDS32_TLS_DESC_CALL,
- BFD_RELOC_NDS32_TLS_DESC_MEM,
- BFD_RELOC_NDS32_REMOVE,
- BFD_RELOC_NDS32_GROUP,
-
-/* For floating load store relaxation. */
- BFD_RELOC_NDS32_LSI,
-
-/* This is a 9-bit reloc */
- BFD_RELOC_V850_9_PCREL,
-
-/* This is a 22-bit reloc */
- BFD_RELOC_V850_22_PCREL,
-
-/* This is a 16 bit offset from the short data area pointer. */
- BFD_RELOC_V850_SDA_16_16_OFFSET,
-
-/* This is a 16 bit offset (of which only 15 bits are used) from the
-short data area pointer. */
- BFD_RELOC_V850_SDA_15_16_OFFSET,
-
-/* This is a 16 bit offset from the zero data area pointer. */
- BFD_RELOC_V850_ZDA_16_16_OFFSET,
-
-/* This is a 16 bit offset (of which only 15 bits are used) from the
-zero data area pointer. */
- BFD_RELOC_V850_ZDA_15_16_OFFSET,
-
-/* This is an 8 bit offset (of which only 6 bits are used) from the
-tiny data area pointer. */
- BFD_RELOC_V850_TDA_6_8_OFFSET,
-
-/* This is an 8bit offset (of which only 7 bits are used) from the tiny
-data area pointer. */
- BFD_RELOC_V850_TDA_7_8_OFFSET,
-
-/* This is a 7 bit offset from the tiny data area pointer. */
- BFD_RELOC_V850_TDA_7_7_OFFSET,
-
-/* This is a 16 bit offset from the tiny data area pointer. */
- BFD_RELOC_V850_TDA_16_16_OFFSET,
-
-/* This is a 5 bit offset (of which only 4 bits are used) from the tiny
-data area pointer. */
- BFD_RELOC_V850_TDA_4_5_OFFSET,
-
-/* This is a 4 bit offset from the tiny data area pointer. */
- BFD_RELOC_V850_TDA_4_4_OFFSET,
-
-/* This is a 16 bit offset from the short data area pointer, with the
-bits placed non-contiguously in the instruction. */
- BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET,
-
-/* This is a 16 bit offset from the zero data area pointer, with the
-bits placed non-contiguously in the instruction. */
- BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET,
-
-/* This is a 6 bit offset from the call table base pointer. */
- BFD_RELOC_V850_CALLT_6_7_OFFSET,
-
-/* This is a 16 bit offset from the call table base pointer. */
- BFD_RELOC_V850_CALLT_16_16_OFFSET,
-
-/* Used for relaxing indirect function calls. */
- BFD_RELOC_V850_LONGCALL,
-
-/* Used for relaxing indirect jumps. */
- BFD_RELOC_V850_LONGJUMP,
-
-/* Used to maintain alignment whilst relaxing. */
- BFD_RELOC_V850_ALIGN,
-
-/* This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu
-instructions. */
- BFD_RELOC_V850_LO16_SPLIT_OFFSET,
-
-/* This is a 16-bit reloc. */
- BFD_RELOC_V850_16_PCREL,
-
-/* This is a 17-bit reloc. */
- BFD_RELOC_V850_17_PCREL,
-
-/* This is a 23-bit reloc. */
- BFD_RELOC_V850_23,
-
-/* This is a 32-bit reloc. */
- BFD_RELOC_V850_32_PCREL,
-
-/* This is a 32-bit reloc. */
- BFD_RELOC_V850_32_ABS,
-
-/* This is a 16-bit reloc. */
- BFD_RELOC_V850_16_SPLIT_OFFSET,
-
-/* This is a 16-bit reloc. */
- BFD_RELOC_V850_16_S1,
-
-/* Low 16 bits. 16 bit shifted by 1. */
- BFD_RELOC_V850_LO16_S1,
-
-/* This is a 16 bit offset from the call table base pointer. */
- BFD_RELOC_V850_CALLT_15_16_OFFSET,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_GOTPCREL,
-
-/* DSO relocations. */
- BFD_RELOC_V850_16_GOT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_GOT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_22_PLT_PCREL,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_PLT_PCREL,
-
-/* DSO relocations. */
- BFD_RELOC_V850_COPY,
-
-/* DSO relocations. */
- BFD_RELOC_V850_GLOB_DAT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_JMP_SLOT,
-
-/* DSO relocations. */
- BFD_RELOC_V850_RELATIVE,
-
-/* DSO relocations. */
- BFD_RELOC_V850_16_GOTOFF,
-
-/* DSO relocations. */
- BFD_RELOC_V850_32_GOTOFF,
-
-/* start code. */
- BFD_RELOC_V850_CODE,
-
-/* start data in text. */
- BFD_RELOC_V850_DATA,
-
-/* This is a 8bit DP reloc for the tms320c30, where the most
-significant 8 bits of a 24 bit word are placed into the least
-significant 8 bits of the opcode. */
- BFD_RELOC_TIC30_LDP,
-
-/* This is a 7bit reloc for the tms320c54x, where the least
-significant 7 bits of a 16 bit word are placed into the least
-significant 7 bits of the opcode. */
- BFD_RELOC_TIC54X_PARTLS7,
-
-/* This is a 9bit DP reloc for the tms320c54x, where the most
-significant 9 bits of a 16 bit word are placed into the least
-significant 9 bits of the opcode. */
- BFD_RELOC_TIC54X_PARTMS9,
-
-/* This is an extended address 23-bit reloc for the tms320c54x. */
- BFD_RELOC_TIC54X_23,
-
-/* This is a 16-bit reloc for the tms320c54x, where the least
-significant 16 bits of a 23-bit extended address are placed into
-the opcode. */
- BFD_RELOC_TIC54X_16_OF_23,
-
-/* This is a reloc for the tms320c54x, where the most
-significant 7 bits of a 23-bit extended address are placed into
-the opcode. */
- BFD_RELOC_TIC54X_MS7_OF_23,
-
-/* TMS320C6000 relocations. */
- BFD_RELOC_C6000_PCR_S21,
- BFD_RELOC_C6000_PCR_S12,
- BFD_RELOC_C6000_PCR_S10,
- BFD_RELOC_C6000_PCR_S7,
- BFD_RELOC_C6000_ABS_S16,
- BFD_RELOC_C6000_ABS_L16,
- BFD_RELOC_C6000_ABS_H16,
- BFD_RELOC_C6000_SBR_U15_B,
- BFD_RELOC_C6000_SBR_U15_H,
- BFD_RELOC_C6000_SBR_U15_W,
- BFD_RELOC_C6000_SBR_S16,
- BFD_RELOC_C6000_SBR_L16_B,
- BFD_RELOC_C6000_SBR_L16_H,
- BFD_RELOC_C6000_SBR_L16_W,
- BFD_RELOC_C6000_SBR_H16_B,
- BFD_RELOC_C6000_SBR_H16_H,
- BFD_RELOC_C6000_SBR_H16_W,
- BFD_RELOC_C6000_SBR_GOT_U15_W,
- BFD_RELOC_C6000_SBR_GOT_L16_W,
- BFD_RELOC_C6000_SBR_GOT_H16_W,
- BFD_RELOC_C6000_DSBT_INDEX,
- BFD_RELOC_C6000_PREL31,
- BFD_RELOC_C6000_COPY,
- BFD_RELOC_C6000_JUMP_SLOT,
- BFD_RELOC_C6000_EHTYPE,
- BFD_RELOC_C6000_PCR_H16,
- BFD_RELOC_C6000_PCR_L16,
- BFD_RELOC_C6000_ALIGN,
- BFD_RELOC_C6000_FPHEAD,
- BFD_RELOC_C6000_NOCMP,
-
-/* This is a 48 bit reloc for the FR30 that stores 32 bits. */
- BFD_RELOC_FR30_48,
-
-/* This is a 32 bit reloc for the FR30 that stores 20 bits split up into
-two sections. */
- BFD_RELOC_FR30_20,
-
-/* This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in
-4 bits. */
- BFD_RELOC_FR30_6_IN_4,
-
-/* This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset
-into 8 bits. */
- BFD_RELOC_FR30_8_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 9 bit short offset
-into 8 bits. */
- BFD_RELOC_FR30_9_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 10 bit word offset
-into 8 bits. */
- BFD_RELOC_FR30_10_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
-short offset into 8 bits. */
- BFD_RELOC_FR30_9_PCREL,
-
-/* This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative
-short offset into 11 bits. */
- BFD_RELOC_FR30_12_PCREL,
-
-/* Motorola Mcore relocations. */
- BFD_RELOC_MCORE_PCREL_IMM8BY4,
- BFD_RELOC_MCORE_PCREL_IMM11BY2,
- BFD_RELOC_MCORE_PCREL_IMM4BY2,
- BFD_RELOC_MCORE_PCREL_32,
- BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2,
- BFD_RELOC_MCORE_RVA,
-
-/* Toshiba Media Processor Relocations. */
- BFD_RELOC_MEP_8,
- BFD_RELOC_MEP_16,
- BFD_RELOC_MEP_32,
- BFD_RELOC_MEP_PCREL8A2,
- BFD_RELOC_MEP_PCREL12A2,
- BFD_RELOC_MEP_PCREL17A2,
- BFD_RELOC_MEP_PCREL24A2,
- BFD_RELOC_MEP_PCABS24A2,
- BFD_RELOC_MEP_LOW16,
- BFD_RELOC_MEP_HI16U,
- BFD_RELOC_MEP_HI16S,
- BFD_RELOC_MEP_GPREL,
- BFD_RELOC_MEP_TPREL,
- BFD_RELOC_MEP_TPREL7,
- BFD_RELOC_MEP_TPREL7A2,
- BFD_RELOC_MEP_TPREL7A4,
- BFD_RELOC_MEP_UIMM24,
- BFD_RELOC_MEP_ADDR24A4,
- BFD_RELOC_MEP_GNU_VTINHERIT,
- BFD_RELOC_MEP_GNU_VTENTRY,
-
-
-/* Imagination Technologies Meta relocations. */
- BFD_RELOC_METAG_HIADDR16,
- BFD_RELOC_METAG_LOADDR16,
- BFD_RELOC_METAG_RELBRANCH,
- BFD_RELOC_METAG_GETSETOFF,
- BFD_RELOC_METAG_HIOG,
- BFD_RELOC_METAG_LOOG,
- BFD_RELOC_METAG_REL8,
- BFD_RELOC_METAG_REL16,
- BFD_RELOC_METAG_HI16_GOTOFF,
- BFD_RELOC_METAG_LO16_GOTOFF,
- BFD_RELOC_METAG_GETSET_GOTOFF,
- BFD_RELOC_METAG_GETSET_GOT,
- BFD_RELOC_METAG_HI16_GOTPC,
- BFD_RELOC_METAG_LO16_GOTPC,
- BFD_RELOC_METAG_HI16_PLT,
- BFD_RELOC_METAG_LO16_PLT,
- BFD_RELOC_METAG_RELBRANCH_PLT,
- BFD_RELOC_METAG_GOTOFF,
- BFD_RELOC_METAG_PLT,
- BFD_RELOC_METAG_COPY,
- BFD_RELOC_METAG_JMP_SLOT,
- BFD_RELOC_METAG_RELATIVE,
- BFD_RELOC_METAG_GLOB_DAT,
- BFD_RELOC_METAG_TLS_GD,
- BFD_RELOC_METAG_TLS_LDM,
- BFD_RELOC_METAG_TLS_LDO_HI16,
- BFD_RELOC_METAG_TLS_LDO_LO16,
- BFD_RELOC_METAG_TLS_LDO,
- BFD_RELOC_METAG_TLS_IE,
- BFD_RELOC_METAG_TLS_IENONPIC,
- BFD_RELOC_METAG_TLS_IENONPIC_HI16,
- BFD_RELOC_METAG_TLS_IENONPIC_LO16,
- BFD_RELOC_METAG_TLS_TPOFF,
- BFD_RELOC_METAG_TLS_DTPMOD,
- BFD_RELOC_METAG_TLS_DTPOFF,
- BFD_RELOC_METAG_TLS_LE,
- BFD_RELOC_METAG_TLS_LE_HI16,
- BFD_RELOC_METAG_TLS_LE_LO16,
-
-/* These are relocations for the GETA instruction. */
- BFD_RELOC_MMIX_GETA,
- BFD_RELOC_MMIX_GETA_1,
- BFD_RELOC_MMIX_GETA_2,
- BFD_RELOC_MMIX_GETA_3,
-
-/* These are relocations for a conditional branch instruction. */
- BFD_RELOC_MMIX_CBRANCH,
- BFD_RELOC_MMIX_CBRANCH_J,
- BFD_RELOC_MMIX_CBRANCH_1,
- BFD_RELOC_MMIX_CBRANCH_2,
- BFD_RELOC_MMIX_CBRANCH_3,
-
-/* These are relocations for the PUSHJ instruction. */
- BFD_RELOC_MMIX_PUSHJ,
- BFD_RELOC_MMIX_PUSHJ_1,
- BFD_RELOC_MMIX_PUSHJ_2,
- BFD_RELOC_MMIX_PUSHJ_3,
- BFD_RELOC_MMIX_PUSHJ_STUBBABLE,
-
-/* These are relocations for the JMP instruction. */
- BFD_RELOC_MMIX_JMP,
- BFD_RELOC_MMIX_JMP_1,
- BFD_RELOC_MMIX_JMP_2,
- BFD_RELOC_MMIX_JMP_3,
-
-/* This is a relocation for a relative address as in a GETA instruction or
-a branch. */
- BFD_RELOC_MMIX_ADDR19,
-
-/* This is a relocation for a relative address as in a JMP instruction. */
- BFD_RELOC_MMIX_ADDR27,
-
-/* This is a relocation for an instruction field that may be a general
-register or a value 0..255. */
- BFD_RELOC_MMIX_REG_OR_BYTE,
-
-/* This is a relocation for an instruction field that may be a general
-register. */
- BFD_RELOC_MMIX_REG,
-
-/* This is a relocation for two instruction fields holding a register and
-an offset, the equivalent of the relocation. */
- BFD_RELOC_MMIX_BASE_PLUS_OFFSET,
-
-/* This relocation is an assertion that the expression is not allocated as
-a global register. It does not modify contents. */
- BFD_RELOC_MMIX_LOCAL,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit pc relative
-short offset into 7 bits. */
- BFD_RELOC_AVR_7_PCREL,
-
-/* This is a 16 bit reloc for the AVR that stores 13 bit pc relative
-short offset into 12 bits. */
- BFD_RELOC_AVR_13_PCREL,
-
-/* This is a 16 bit reloc for the AVR that stores 17 bit value (usually
-program memory address) into 16 bits. */
- BFD_RELOC_AVR_16_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
-data memory address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_LO8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of data memory address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HI8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of program memory address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HH8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of 32 bit value) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_MS8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(usually data memory address) into 8 bit immediate value of SUBI insn. */
- BFD_RELOC_AVR_LO8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 8 bit of data memory address) into 8 bit immediate value of
-SUBI insn. */
- BFD_RELOC_AVR_HI8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(most high 8 bit of program memory address) into 8 bit immediate value
-of LDI or SUBI insn. */
- BFD_RELOC_AVR_HH8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value (msb
-of 32 bit value) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_MS8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
-command address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_LO8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value
-(command address) into 8 bit immediate value of LDI insn. If the address
-is beyond the 128k boundary, the linker inserts a jump stub for this reloc
-in the lower 128k. */
- BFD_RELOC_AVR_LO8_LDI_GS,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of command address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HI8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of command address) into 8 bit immediate value of LDI insn. If the address
-is beyond the 128k boundary, the linker inserts a jump stub for this reloc
-below 128k. */
- BFD_RELOC_AVR_HI8_LDI_GS,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of command address) into 8 bit immediate value of LDI insn. */
- BFD_RELOC_AVR_HH8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(usually command address) into 8 bit immediate value of SUBI insn. */
- BFD_RELOC_AVR_LO8_LDI_PM_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 8 bit of 16 bit command address) into 8 bit immediate value
-of SUBI insn. */
- BFD_RELOC_AVR_HI8_LDI_PM_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 6 bit of 22 bit command address) into 8 bit immediate
-value of SUBI insn. */
- BFD_RELOC_AVR_HH8_LDI_PM_NEG,
-
-/* This is a 32 bit reloc for the AVR that stores 23 bit value
-into 22 bits. */
- BFD_RELOC_AVR_CALL,
-
-/* This is a 16 bit reloc for the AVR that stores all needed bits
-for absolute addressing with ldi with overflow check to linktime */
- BFD_RELOC_AVR_LDI,
-
-/* This is a 6 bit reloc for the AVR that stores offset for ldd/std
-instructions */
- BFD_RELOC_AVR_6,
-
-/* This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
-instructions */
- BFD_RELOC_AVR_6_ADIW,
-
-/* This is a 8 bit reloc for the AVR that stores bits 0..7 of a symbol
-in .byte lo8(symbol) */
- BFD_RELOC_AVR_8_LO,
-
-/* This is a 8 bit reloc for the AVR that stores bits 8..15 of a symbol
-in .byte hi8(symbol) */
- BFD_RELOC_AVR_8_HI,
-
-/* This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol
-in .byte hlo8(symbol) */
- BFD_RELOC_AVR_8_HLO,
-
-/* AVR relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-second symbol so the linker can determine whether to adjust the field
-value. */
- BFD_RELOC_AVR_DIFF8,
- BFD_RELOC_AVR_DIFF16,
- BFD_RELOC_AVR_DIFF32,
-
-/* This is a 7 bit reloc for the AVR that stores SRAM address for 16bit
-lds and sts instructions supported only tiny core. */
- BFD_RELOC_AVR_LDS_STS_16,
-
-/* This is a 6 bit reloc for the AVR that stores an I/O register
-number for the IN and OUT instructions */
- BFD_RELOC_AVR_PORT6,
-
-/* This is a 5 bit reloc for the AVR that stores an I/O register
-number for the SBIC, SBIS, SBI and CBI instructions */
- BFD_RELOC_AVR_PORT5,
-
-/* RISC-V relocations. */
- BFD_RELOC_RISCV_HI20,
- BFD_RELOC_RISCV_PCREL_HI20,
- BFD_RELOC_RISCV_PCREL_LO12_I,
- BFD_RELOC_RISCV_PCREL_LO12_S,
- BFD_RELOC_RISCV_LO12_I,
- BFD_RELOC_RISCV_LO12_S,
- BFD_RELOC_RISCV_GPREL12_I,
- BFD_RELOC_RISCV_GPREL12_S,
- BFD_RELOC_RISCV_TPREL_HI20,
- BFD_RELOC_RISCV_TPREL_LO12_I,
- BFD_RELOC_RISCV_TPREL_LO12_S,
- BFD_RELOC_RISCV_TPREL_ADD,
- BFD_RELOC_RISCV_CALL,
- BFD_RELOC_RISCV_CALL_PLT,
- BFD_RELOC_RISCV_ADD8,
- BFD_RELOC_RISCV_ADD16,
- BFD_RELOC_RISCV_ADD32,
- BFD_RELOC_RISCV_ADD64,
- BFD_RELOC_RISCV_SUB8,
- BFD_RELOC_RISCV_SUB16,
- BFD_RELOC_RISCV_SUB32,
- BFD_RELOC_RISCV_SUB64,
- BFD_RELOC_RISCV_GOT_HI20,
- BFD_RELOC_RISCV_TLS_GOT_HI20,
- BFD_RELOC_RISCV_TLS_GD_HI20,
- BFD_RELOC_RISCV_JMP,
- BFD_RELOC_RISCV_TLS_DTPMOD32,
- BFD_RELOC_RISCV_TLS_DTPREL32,
- BFD_RELOC_RISCV_TLS_DTPMOD64,
- BFD_RELOC_RISCV_TLS_DTPREL64,
- BFD_RELOC_RISCV_TLS_TPREL32,
- BFD_RELOC_RISCV_TLS_TPREL64,
- BFD_RELOC_RISCV_ALIGN,
- BFD_RELOC_RISCV_RVC_BRANCH,
- BFD_RELOC_RISCV_RVC_JUMP,
- BFD_RELOC_RISCV_RVC_LUI,
- BFD_RELOC_RISCV_GPREL_I,
- BFD_RELOC_RISCV_GPREL_S,
- BFD_RELOC_RISCV_TPREL_I,
- BFD_RELOC_RISCV_TPREL_S,
- BFD_RELOC_RISCV_RELAX,
- BFD_RELOC_RISCV_CFA,
- BFD_RELOC_RISCV_SUB6,
- BFD_RELOC_RISCV_SET6,
- BFD_RELOC_RISCV_SET8,
- BFD_RELOC_RISCV_SET16,
- BFD_RELOC_RISCV_SET32,
- BFD_RELOC_RISCV_32_PCREL,
-
-/* Renesas RL78 Relocations. */
- BFD_RELOC_RL78_NEG8,
- BFD_RELOC_RL78_NEG16,
- BFD_RELOC_RL78_NEG24,
- BFD_RELOC_RL78_NEG32,
- BFD_RELOC_RL78_16_OP,
- BFD_RELOC_RL78_24_OP,
- BFD_RELOC_RL78_32_OP,
- BFD_RELOC_RL78_8U,
- BFD_RELOC_RL78_16U,
- BFD_RELOC_RL78_24U,
- BFD_RELOC_RL78_DIR3U_PCREL,
- BFD_RELOC_RL78_DIFF,
- BFD_RELOC_RL78_GPRELB,
- BFD_RELOC_RL78_GPRELW,
- BFD_RELOC_RL78_GPRELL,
- BFD_RELOC_RL78_SYM,
- BFD_RELOC_RL78_OP_SUBTRACT,
- BFD_RELOC_RL78_OP_NEG,
- BFD_RELOC_RL78_OP_AND,
- BFD_RELOC_RL78_OP_SHRA,
- BFD_RELOC_RL78_ABS8,
- BFD_RELOC_RL78_ABS16,
- BFD_RELOC_RL78_ABS16_REV,
- BFD_RELOC_RL78_ABS32,
- BFD_RELOC_RL78_ABS32_REV,
- BFD_RELOC_RL78_ABS16U,
- BFD_RELOC_RL78_ABS16UW,
- BFD_RELOC_RL78_ABS16UL,
- BFD_RELOC_RL78_RELAX,
- BFD_RELOC_RL78_HI16,
- BFD_RELOC_RL78_HI8,
- BFD_RELOC_RL78_LO16,
- BFD_RELOC_RL78_CODE,
- BFD_RELOC_RL78_SADDR,
-
-/* Renesas RX Relocations. */
- BFD_RELOC_RX_NEG8,
- BFD_RELOC_RX_NEG16,
- BFD_RELOC_RX_NEG24,
- BFD_RELOC_RX_NEG32,
- BFD_RELOC_RX_16_OP,
- BFD_RELOC_RX_24_OP,
- BFD_RELOC_RX_32_OP,
- BFD_RELOC_RX_8U,
- BFD_RELOC_RX_16U,
- BFD_RELOC_RX_24U,
- BFD_RELOC_RX_DIR3U_PCREL,
- BFD_RELOC_RX_DIFF,
- BFD_RELOC_RX_GPRELB,
- BFD_RELOC_RX_GPRELW,
- BFD_RELOC_RX_GPRELL,
- BFD_RELOC_RX_SYM,
- BFD_RELOC_RX_OP_SUBTRACT,
- BFD_RELOC_RX_OP_NEG,
- BFD_RELOC_RX_ABS8,
- BFD_RELOC_RX_ABS16,
- BFD_RELOC_RX_ABS16_REV,
- BFD_RELOC_RX_ABS32,
- BFD_RELOC_RX_ABS32_REV,
- BFD_RELOC_RX_ABS16U,
- BFD_RELOC_RX_ABS16UW,
- BFD_RELOC_RX_ABS16UL,
- BFD_RELOC_RX_RELAX,
-
-/* Direct 12 bit. */
- BFD_RELOC_390_12,
-
-/* 12 bit GOT offset. */
- BFD_RELOC_390_GOT12,
-
-/* 32 bit PC relative PLT address. */
- BFD_RELOC_390_PLT32,
-
-/* Copy symbol at runtime. */
- BFD_RELOC_390_COPY,
-
-/* Create GOT entry. */
- BFD_RELOC_390_GLOB_DAT,
-
-/* Create PLT entry. */
- BFD_RELOC_390_JMP_SLOT,
-
-/* Adjust by program base. */
- BFD_RELOC_390_RELATIVE,
-
-/* 32 bit PC relative offset to GOT. */
- BFD_RELOC_390_GOTPC,
-
-/* 16 bit GOT offset. */
- BFD_RELOC_390_GOT16,
-
-/* PC relative 12 bit shifted by 1. */
- BFD_RELOC_390_PC12DBL,
-
-/* 12 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT12DBL,
-
-/* PC relative 16 bit shifted by 1. */
- BFD_RELOC_390_PC16DBL,
-
-/* 16 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT16DBL,
-
-/* PC relative 24 bit shifted by 1. */
- BFD_RELOC_390_PC24DBL,
-
-/* 24 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT24DBL,
-
-/* PC relative 32 bit shifted by 1. */
- BFD_RELOC_390_PC32DBL,
-
-/* 32 bit PC rel. PLT shifted by 1. */
- BFD_RELOC_390_PLT32DBL,
-
-/* 32 bit PC rel. GOT shifted by 1. */
- BFD_RELOC_390_GOTPCDBL,
-
-/* 64 bit GOT offset. */
- BFD_RELOC_390_GOT64,
-
-/* 64 bit PC relative PLT address. */
- BFD_RELOC_390_PLT64,
-
-/* 32 bit rel. offset to GOT entry. */
- BFD_RELOC_390_GOTENT,
-
-/* 64 bit offset to GOT. */
- BFD_RELOC_390_GOTOFF64,
-
-/* 12-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT12,
-
-/* 16-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT16,
-
-/* 32-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT32,
-
-/* 64-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLT64,
-
-/* 32-bit rel. offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_390_GOTPLTENT,
-
-/* 16-bit rel. offset from the GOT to a PLT entry. */
- BFD_RELOC_390_PLTOFF16,
-
-/* 32-bit rel. offset from the GOT to a PLT entry. */
- BFD_RELOC_390_PLTOFF32,
-
-/* 64-bit rel. offset from the GOT to a PLT entry. */
- BFD_RELOC_390_PLTOFF64,
-
-/* s390 tls relocations. */
- BFD_RELOC_390_TLS_LOAD,
- BFD_RELOC_390_TLS_GDCALL,
- BFD_RELOC_390_TLS_LDCALL,
- BFD_RELOC_390_TLS_GD32,
- BFD_RELOC_390_TLS_GD64,
- BFD_RELOC_390_TLS_GOTIE12,
- BFD_RELOC_390_TLS_GOTIE32,
- BFD_RELOC_390_TLS_GOTIE64,
- BFD_RELOC_390_TLS_LDM32,
- BFD_RELOC_390_TLS_LDM64,
- BFD_RELOC_390_TLS_IE32,
- BFD_RELOC_390_TLS_IE64,
- BFD_RELOC_390_TLS_IEENT,
- BFD_RELOC_390_TLS_LE32,
- BFD_RELOC_390_TLS_LE64,
- BFD_RELOC_390_TLS_LDO32,
- BFD_RELOC_390_TLS_LDO64,
- BFD_RELOC_390_TLS_DTPMOD,
- BFD_RELOC_390_TLS_DTPOFF,
- BFD_RELOC_390_TLS_TPOFF,
-
-/* Long displacement extension. */
- BFD_RELOC_390_20,
- BFD_RELOC_390_GOT20,
- BFD_RELOC_390_GOTPLT20,
- BFD_RELOC_390_TLS_GOTIE20,
-
-/* STT_GNU_IFUNC relocation. */
- BFD_RELOC_390_IRELATIVE,
-
-/* Score relocations
-Low 16 bit for load/store */
- BFD_RELOC_SCORE_GPREL15,
-
-/* This is a 24-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_DUMMY2,
- BFD_RELOC_SCORE_JMP,
-
-/* This is a 19-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_BRANCH,
-
-/* This is a 32-bit reloc for 48-bit instructions. */
- BFD_RELOC_SCORE_IMM30,
-
-/* This is a 32-bit reloc for 48-bit instructions. */
- BFD_RELOC_SCORE_IMM32,
-
-/* This is a 11-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE16_JMP,
-
-/* This is a 8-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE16_BRANCH,
-
-/* This is a 9-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_BCMP,
-
-/* Undocumented Score relocs */
- BFD_RELOC_SCORE_GOT15,
- BFD_RELOC_SCORE_GOT_LO16,
- BFD_RELOC_SCORE_CALL15,
- BFD_RELOC_SCORE_DUMMY_HI16,
-
-/* Scenix IP2K - 9-bit register number / data address */
- BFD_RELOC_IP2K_FR9,
-
-/* Scenix IP2K - 4-bit register/data bank number */
- BFD_RELOC_IP2K_BANK,
-
-/* Scenix IP2K - low 13 bits of instruction word address */
- BFD_RELOC_IP2K_ADDR16CJP,
-
-/* Scenix IP2K - high 3 bits of instruction word address */
- BFD_RELOC_IP2K_PAGE3,
-
-/* Scenix IP2K - ext/low/high 8 bits of data address */
- BFD_RELOC_IP2K_LO8DATA,
- BFD_RELOC_IP2K_HI8DATA,
- BFD_RELOC_IP2K_EX8DATA,
-
-/* Scenix IP2K - low/high 8 bits of instruction word address */
- BFD_RELOC_IP2K_LO8INSN,
- BFD_RELOC_IP2K_HI8INSN,
-
-/* Scenix IP2K - even/odd PC modifier to modify snb pcl.0 */
- BFD_RELOC_IP2K_PC_SKIP,
-
-/* Scenix IP2K - 16 bit word address in text section. */
- BFD_RELOC_IP2K_TEXT,
-
-/* Scenix IP2K - 7-bit sp or dp offset */
- BFD_RELOC_IP2K_FR_OFFSET,
-
-/* Scenix VPE4K coprocessor - data/insn-space addressing */
- BFD_RELOC_VPE4KMATH_DATA,
- BFD_RELOC_VPE4KMATH_INSN,
-
-/* These two relocations are used by the linker to determine which of
-the entries in a C++ virtual function table are actually used. When
-the --gc-sections option is given, the linker will zero out the entries
-that are not used, so that the code for those functions need not be
-included in the output.
-
-VTABLE_INHERIT is a zero-space relocation used to describe to the
-linker the inheritance tree of a C++ virtual function table. The
-relocation's symbol should be the parent class' vtable, and the
-relocation should be located at the child vtable.
-
-VTABLE_ENTRY is a zero-space relocation that describes the use of a
-virtual function table entry. The reloc's symbol should refer to the
-table of the class mentioned in the code. Off of that base, an offset
-describes the entry that is being used. For Rela hosts, this offset
-is stored in the reloc's addend. For Rel hosts, we are forced to put
-this offset in the reloc's section offset. */
- BFD_RELOC_VTABLE_INHERIT,
- BFD_RELOC_VTABLE_ENTRY,
-
-/* Intel IA64 Relocations. */
- BFD_RELOC_IA64_IMM14,
- BFD_RELOC_IA64_IMM22,
- BFD_RELOC_IA64_IMM64,
- BFD_RELOC_IA64_DIR32MSB,
- BFD_RELOC_IA64_DIR32LSB,
- BFD_RELOC_IA64_DIR64MSB,
- BFD_RELOC_IA64_DIR64LSB,
- BFD_RELOC_IA64_GPREL22,
- BFD_RELOC_IA64_GPREL64I,
- BFD_RELOC_IA64_GPREL32MSB,
- BFD_RELOC_IA64_GPREL32LSB,
- BFD_RELOC_IA64_GPREL64MSB,
- BFD_RELOC_IA64_GPREL64LSB,
- BFD_RELOC_IA64_LTOFF22,
- BFD_RELOC_IA64_LTOFF64I,
- BFD_RELOC_IA64_PLTOFF22,
- BFD_RELOC_IA64_PLTOFF64I,
- BFD_RELOC_IA64_PLTOFF64MSB,
- BFD_RELOC_IA64_PLTOFF64LSB,
- BFD_RELOC_IA64_FPTR64I,
- BFD_RELOC_IA64_FPTR32MSB,
- BFD_RELOC_IA64_FPTR32LSB,
- BFD_RELOC_IA64_FPTR64MSB,
- BFD_RELOC_IA64_FPTR64LSB,
- BFD_RELOC_IA64_PCREL21B,
- BFD_RELOC_IA64_PCREL21BI,
- BFD_RELOC_IA64_PCREL21M,
- BFD_RELOC_IA64_PCREL21F,
- BFD_RELOC_IA64_PCREL22,
- BFD_RELOC_IA64_PCREL60B,
- BFD_RELOC_IA64_PCREL64I,
- BFD_RELOC_IA64_PCREL32MSB,
- BFD_RELOC_IA64_PCREL32LSB,
- BFD_RELOC_IA64_PCREL64MSB,
- BFD_RELOC_IA64_PCREL64LSB,
- BFD_RELOC_IA64_LTOFF_FPTR22,
- BFD_RELOC_IA64_LTOFF_FPTR64I,
- BFD_RELOC_IA64_LTOFF_FPTR32MSB,
- BFD_RELOC_IA64_LTOFF_FPTR32LSB,
- BFD_RELOC_IA64_LTOFF_FPTR64MSB,
- BFD_RELOC_IA64_LTOFF_FPTR64LSB,
- BFD_RELOC_IA64_SEGREL32MSB,
- BFD_RELOC_IA64_SEGREL32LSB,
- BFD_RELOC_IA64_SEGREL64MSB,
- BFD_RELOC_IA64_SEGREL64LSB,
- BFD_RELOC_IA64_SECREL32MSB,
- BFD_RELOC_IA64_SECREL32LSB,
- BFD_RELOC_IA64_SECREL64MSB,
- BFD_RELOC_IA64_SECREL64LSB,
- BFD_RELOC_IA64_REL32MSB,
- BFD_RELOC_IA64_REL32LSB,
- BFD_RELOC_IA64_REL64MSB,
- BFD_RELOC_IA64_REL64LSB,
- BFD_RELOC_IA64_LTV32MSB,
- BFD_RELOC_IA64_LTV32LSB,
- BFD_RELOC_IA64_LTV64MSB,
- BFD_RELOC_IA64_LTV64LSB,
- BFD_RELOC_IA64_IPLTMSB,
- BFD_RELOC_IA64_IPLTLSB,
- BFD_RELOC_IA64_COPY,
- BFD_RELOC_IA64_LTOFF22X,
- BFD_RELOC_IA64_LDXMOV,
- BFD_RELOC_IA64_TPREL14,
- BFD_RELOC_IA64_TPREL22,
- BFD_RELOC_IA64_TPREL64I,
- BFD_RELOC_IA64_TPREL64MSB,
- BFD_RELOC_IA64_TPREL64LSB,
- BFD_RELOC_IA64_LTOFF_TPREL22,
- BFD_RELOC_IA64_DTPMOD64MSB,
- BFD_RELOC_IA64_DTPMOD64LSB,
- BFD_RELOC_IA64_LTOFF_DTPMOD22,
- BFD_RELOC_IA64_DTPREL14,
- BFD_RELOC_IA64_DTPREL22,
- BFD_RELOC_IA64_DTPREL64I,
- BFD_RELOC_IA64_DTPREL32MSB,
- BFD_RELOC_IA64_DTPREL32LSB,
- BFD_RELOC_IA64_DTPREL64MSB,
- BFD_RELOC_IA64_DTPREL64LSB,
- BFD_RELOC_IA64_LTOFF_DTPREL22,
-
-/* Motorola 68HC11 reloc.
-This is the 8 bit high part of an absolute address. */
- BFD_RELOC_M68HC11_HI8,
-
-/* Motorola 68HC11 reloc.
-This is the 8 bit low part of an absolute address. */
- BFD_RELOC_M68HC11_LO8,
-
-/* Motorola 68HC11 reloc.
-This is the 3 bit of a value. */
- BFD_RELOC_M68HC11_3B,
-
-/* Motorola 68HC11 reloc.
-This reloc marks the beginning of a jump/call instruction.
-It is used for linker relaxation to correctly identify beginning
-of instruction and change some branches to use PC-relative
-addressing mode. */
- BFD_RELOC_M68HC11_RL_JUMP,
-
-/* Motorola 68HC11 reloc.
-This reloc marks a group of several instructions that gcc generates
-and for which the linker relaxation pass can modify and/or remove
-some of them. */
- BFD_RELOC_M68HC11_RL_GROUP,
-
-/* Motorola 68HC11 reloc.
-This is the 16-bit lower part of an address. It is used for 'call'
-instruction to specify the symbol address without any special
-transformation (due to memory bank window). */
- BFD_RELOC_M68HC11_LO16,
-
-/* Motorola 68HC11 reloc.
-This is a 8-bit reloc that specifies the page number of an address.
-It is used by 'call' instruction to specify the page number of
-the symbol. */
- BFD_RELOC_M68HC11_PAGE,
-
-/* Motorola 68HC11 reloc.
-This is a 24-bit reloc that represents the address with a 16-bit
-value and a 8-bit page number. The symbol address is transformed
-to follow the 16K memory bank of 68HC12 (seen as mapped in the window). */
- BFD_RELOC_M68HC11_24,
-
-/* Motorola 68HC12 reloc.
-This is the 5 bits of a value. */
- BFD_RELOC_M68HC12_5B,
-
-/* Freescale XGATE reloc.
-This reloc marks the beginning of a bra/jal instruction. */
- BFD_RELOC_XGATE_RL_JUMP,
-
-/* Freescale XGATE reloc.
-This reloc marks a group of several instructions that gcc generates
-and for which the linker relaxation pass can modify and/or remove
-some of them. */
- BFD_RELOC_XGATE_RL_GROUP,
-
-/* Freescale XGATE reloc.
-This is the 16-bit lower part of an address. It is used for the '16-bit'
-instructions. */
- BFD_RELOC_XGATE_LO16,
-
-/* Freescale XGATE reloc. */
- BFD_RELOC_XGATE_GPAGE,
-
-/* Freescale XGATE reloc. */
- BFD_RELOC_XGATE_24,
-
-/* Freescale XGATE reloc.
-This is a 9-bit pc-relative reloc. */
- BFD_RELOC_XGATE_PCREL_9,
-
-/* Freescale XGATE reloc.
-This is a 10-bit pc-relative reloc. */
- BFD_RELOC_XGATE_PCREL_10,
-
-/* Freescale XGATE reloc.
-This is the 16-bit lower part of an address. It is used for the '16-bit'
-instructions. */
- BFD_RELOC_XGATE_IMM8_LO,
-
-/* Freescale XGATE reloc.
-This is the 16-bit higher part of an address. It is used for the '16-bit'
-instructions. */
- BFD_RELOC_XGATE_IMM8_HI,
-
-/* Freescale XGATE reloc.
-This is a 3-bit pc-relative reloc. */
- BFD_RELOC_XGATE_IMM3,
-
-/* Freescale XGATE reloc.
-This is a 4-bit pc-relative reloc. */
- BFD_RELOC_XGATE_IMM4,
-
-/* Freescale XGATE reloc.
-This is a 5-bit pc-relative reloc. */
- BFD_RELOC_XGATE_IMM5,
-
-/* Motorola 68HC12 reloc.
-This is the 9 bits of a value. */
- BFD_RELOC_M68HC12_9B,
-
-/* Motorola 68HC12 reloc.
-This is the 16 bits of a value. */
- BFD_RELOC_M68HC12_16B,
-
-/* Motorola 68HC12/XGATE reloc.
-This is a PCREL9 branch. */
- BFD_RELOC_M68HC12_9_PCREL,
-
-/* Motorola 68HC12/XGATE reloc.
-This is a PCREL10 branch. */
- BFD_RELOC_M68HC12_10_PCREL,
-
-/* Motorola 68HC12/XGATE reloc.
-This is the 8 bit low part of an absolute address and immediately precedes
-a matching HI8XG part. */
- BFD_RELOC_M68HC12_LO8XG,
-
-/* Motorola 68HC12/XGATE reloc.
-This is the 8 bit high part of an absolute address and immediately follows
-a matching LO8XG part. */
- BFD_RELOC_M68HC12_HI8XG,
-
-/* Freescale S12Z reloc.
-This is a 15 bit relative address. If the most significant bits are all zero
-then it may be truncated to 8 bits. */
- BFD_RELOC_S12Z_15_PCREL,
-
-/* NS CR16C Relocations. */
- BFD_RELOC_16C_NUM08,
- BFD_RELOC_16C_NUM08_C,
- BFD_RELOC_16C_NUM16,
- BFD_RELOC_16C_NUM16_C,
- BFD_RELOC_16C_NUM32,
- BFD_RELOC_16C_NUM32_C,
- BFD_RELOC_16C_DISP04,
- BFD_RELOC_16C_DISP04_C,
- BFD_RELOC_16C_DISP08,
- BFD_RELOC_16C_DISP08_C,
- BFD_RELOC_16C_DISP16,
- BFD_RELOC_16C_DISP16_C,
- BFD_RELOC_16C_DISP24,
- BFD_RELOC_16C_DISP24_C,
- BFD_RELOC_16C_DISP24a,
- BFD_RELOC_16C_DISP24a_C,
- BFD_RELOC_16C_REG04,
- BFD_RELOC_16C_REG04_C,
- BFD_RELOC_16C_REG04a,
- BFD_RELOC_16C_REG04a_C,
- BFD_RELOC_16C_REG14,
- BFD_RELOC_16C_REG14_C,
- BFD_RELOC_16C_REG16,
- BFD_RELOC_16C_REG16_C,
- BFD_RELOC_16C_REG20,
- BFD_RELOC_16C_REG20_C,
- BFD_RELOC_16C_ABS20,
- BFD_RELOC_16C_ABS20_C,
- BFD_RELOC_16C_ABS24,
- BFD_RELOC_16C_ABS24_C,
- BFD_RELOC_16C_IMM04,
- BFD_RELOC_16C_IMM04_C,
- BFD_RELOC_16C_IMM16,
- BFD_RELOC_16C_IMM16_C,
- BFD_RELOC_16C_IMM20,
- BFD_RELOC_16C_IMM20_C,
- BFD_RELOC_16C_IMM24,
- BFD_RELOC_16C_IMM24_C,
- BFD_RELOC_16C_IMM32,
- BFD_RELOC_16C_IMM32_C,
-
-/* NS CR16 Relocations. */
- BFD_RELOC_CR16_NUM8,
- BFD_RELOC_CR16_NUM16,
- BFD_RELOC_CR16_NUM32,
- BFD_RELOC_CR16_NUM32a,
- BFD_RELOC_CR16_REGREL0,
- BFD_RELOC_CR16_REGREL4,
- BFD_RELOC_CR16_REGREL4a,
- BFD_RELOC_CR16_REGREL14,
- BFD_RELOC_CR16_REGREL14a,
- BFD_RELOC_CR16_REGREL16,
- BFD_RELOC_CR16_REGREL20,
- BFD_RELOC_CR16_REGREL20a,
- BFD_RELOC_CR16_ABS20,
- BFD_RELOC_CR16_ABS24,
- BFD_RELOC_CR16_IMM4,
- BFD_RELOC_CR16_IMM8,
- BFD_RELOC_CR16_IMM16,
- BFD_RELOC_CR16_IMM20,
- BFD_RELOC_CR16_IMM24,
- BFD_RELOC_CR16_IMM32,
- BFD_RELOC_CR16_IMM32a,
- BFD_RELOC_CR16_DISP4,
- BFD_RELOC_CR16_DISP8,
- BFD_RELOC_CR16_DISP16,
- BFD_RELOC_CR16_DISP20,
- BFD_RELOC_CR16_DISP24,
- BFD_RELOC_CR16_DISP24a,
- BFD_RELOC_CR16_SWITCH8,
- BFD_RELOC_CR16_SWITCH16,
- BFD_RELOC_CR16_SWITCH32,
- BFD_RELOC_CR16_GOT_REGREL20,
- BFD_RELOC_CR16_GOTC_REGREL20,
- BFD_RELOC_CR16_GLOB_DAT,
-
-/* NS CRX Relocations. */
- BFD_RELOC_CRX_REL4,
- BFD_RELOC_CRX_REL8,
- BFD_RELOC_CRX_REL8_CMP,
- BFD_RELOC_CRX_REL16,
- BFD_RELOC_CRX_REL24,
- BFD_RELOC_CRX_REL32,
- BFD_RELOC_CRX_REGREL12,
- BFD_RELOC_CRX_REGREL22,
- BFD_RELOC_CRX_REGREL28,
- BFD_RELOC_CRX_REGREL32,
- BFD_RELOC_CRX_ABS16,
- BFD_RELOC_CRX_ABS32,
- BFD_RELOC_CRX_NUM8,
- BFD_RELOC_CRX_NUM16,
- BFD_RELOC_CRX_NUM32,
- BFD_RELOC_CRX_IMM16,
- BFD_RELOC_CRX_IMM32,
- BFD_RELOC_CRX_SWITCH8,
- BFD_RELOC_CRX_SWITCH16,
- BFD_RELOC_CRX_SWITCH32,
-
-/* These relocs are only used within the CRIS assembler. They are not
-(at present) written to any object files. */
- BFD_RELOC_CRIS_BDISP8,
- BFD_RELOC_CRIS_UNSIGNED_5,
- BFD_RELOC_CRIS_SIGNED_6,
- BFD_RELOC_CRIS_UNSIGNED_6,
- BFD_RELOC_CRIS_SIGNED_8,
- BFD_RELOC_CRIS_UNSIGNED_8,
- BFD_RELOC_CRIS_SIGNED_16,
- BFD_RELOC_CRIS_UNSIGNED_16,
- BFD_RELOC_CRIS_LAPCQ_OFFSET,
- BFD_RELOC_CRIS_UNSIGNED_4,
-
-/* Relocs used in ELF shared libraries for CRIS. */
- BFD_RELOC_CRIS_COPY,
- BFD_RELOC_CRIS_GLOB_DAT,
- BFD_RELOC_CRIS_JUMP_SLOT,
- BFD_RELOC_CRIS_RELATIVE,
-
-/* 32-bit offset to symbol-entry within GOT. */
- BFD_RELOC_CRIS_32_GOT,
-
-/* 16-bit offset to symbol-entry within GOT. */
- BFD_RELOC_CRIS_16_GOT,
-
-/* 32-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_CRIS_32_GOTPLT,
-
-/* 16-bit offset to symbol-entry within GOT, with PLT handling. */
- BFD_RELOC_CRIS_16_GOTPLT,
-
-/* 32-bit offset to symbol, relative to GOT. */
- BFD_RELOC_CRIS_32_GOTREL,
-
-/* 32-bit offset to symbol with PLT entry, relative to GOT. */
- BFD_RELOC_CRIS_32_PLT_GOTREL,
-
-/* 32-bit offset to symbol with PLT entry, relative to this relocation. */
- BFD_RELOC_CRIS_32_PLT_PCREL,
-
-/* Relocs used in TLS code for CRIS. */
- BFD_RELOC_CRIS_32_GOT_GD,
- BFD_RELOC_CRIS_16_GOT_GD,
- BFD_RELOC_CRIS_32_GD,
- BFD_RELOC_CRIS_DTP,
- BFD_RELOC_CRIS_32_DTPREL,
- BFD_RELOC_CRIS_16_DTPREL,
- BFD_RELOC_CRIS_32_GOT_TPREL,
- BFD_RELOC_CRIS_16_GOT_TPREL,
- BFD_RELOC_CRIS_32_TPREL,
- BFD_RELOC_CRIS_16_TPREL,
- BFD_RELOC_CRIS_DTPMOD,
- BFD_RELOC_CRIS_32_IE,
-
-/* OpenRISC 1000 Relocations. */
- BFD_RELOC_OR1K_REL_26,
- BFD_RELOC_OR1K_SLO16,
- BFD_RELOC_OR1K_PCREL_PG21,
- BFD_RELOC_OR1K_LO13,
- BFD_RELOC_OR1K_SLO13,
- BFD_RELOC_OR1K_GOTPC_HI16,
- BFD_RELOC_OR1K_GOTPC_LO16,
- BFD_RELOC_OR1K_GOT16,
- BFD_RELOC_OR1K_GOT_PG21,
- BFD_RELOC_OR1K_GOT_LO13,
- BFD_RELOC_OR1K_PLT26,
- BFD_RELOC_OR1K_PLTA26,
- BFD_RELOC_OR1K_GOTOFF_SLO16,
- BFD_RELOC_OR1K_COPY,
- BFD_RELOC_OR1K_GLOB_DAT,
- BFD_RELOC_OR1K_JMP_SLOT,
- BFD_RELOC_OR1K_RELATIVE,
- BFD_RELOC_OR1K_TLS_GD_HI16,
- BFD_RELOC_OR1K_TLS_GD_LO16,
- BFD_RELOC_OR1K_TLS_GD_PG21,
- BFD_RELOC_OR1K_TLS_GD_LO13,
- BFD_RELOC_OR1K_TLS_LDM_HI16,
- BFD_RELOC_OR1K_TLS_LDM_LO16,
- BFD_RELOC_OR1K_TLS_LDM_PG21,
- BFD_RELOC_OR1K_TLS_LDM_LO13,
- BFD_RELOC_OR1K_TLS_LDO_HI16,
- BFD_RELOC_OR1K_TLS_LDO_LO16,
- BFD_RELOC_OR1K_TLS_IE_HI16,
- BFD_RELOC_OR1K_TLS_IE_AHI16,
- BFD_RELOC_OR1K_TLS_IE_LO16,
- BFD_RELOC_OR1K_TLS_IE_PG21,
- BFD_RELOC_OR1K_TLS_IE_LO13,
- BFD_RELOC_OR1K_TLS_LE_HI16,
- BFD_RELOC_OR1K_TLS_LE_AHI16,
- BFD_RELOC_OR1K_TLS_LE_LO16,
- BFD_RELOC_OR1K_TLS_LE_SLO16,
- BFD_RELOC_OR1K_TLS_TPOFF,
- BFD_RELOC_OR1K_TLS_DTPOFF,
- BFD_RELOC_OR1K_TLS_DTPMOD,
-
-/* H8 elf Relocations. */
- BFD_RELOC_H8_DIR16A8,
- BFD_RELOC_H8_DIR16R8,
- BFD_RELOC_H8_DIR24A8,
- BFD_RELOC_H8_DIR24R8,
- BFD_RELOC_H8_DIR32A16,
- BFD_RELOC_H8_DISP32A16,
-
-/* Sony Xstormy16 Relocations. */
- BFD_RELOC_XSTORMY16_REL_12,
- BFD_RELOC_XSTORMY16_12,
- BFD_RELOC_XSTORMY16_24,
- BFD_RELOC_XSTORMY16_FPTR16,
-
-/* Self-describing complex relocations. */
- BFD_RELOC_RELC,
-
-
-/* Infineon Relocations. */
- BFD_RELOC_XC16X_PAG,
- BFD_RELOC_XC16X_POF,
- BFD_RELOC_XC16X_SEG,
- BFD_RELOC_XC16X_SOF,
-
-/* Relocations used by VAX ELF. */
- BFD_RELOC_VAX_GLOB_DAT,
- BFD_RELOC_VAX_JMP_SLOT,
- BFD_RELOC_VAX_RELATIVE,
-
-/* Morpho MT - 16 bit immediate relocation. */
- BFD_RELOC_MT_PC16,
-
-/* Morpho MT - Hi 16 bits of an address. */
- BFD_RELOC_MT_HI16,
-
-/* Morpho MT - Low 16 bits of an address. */
- BFD_RELOC_MT_LO16,
-
-/* Morpho MT - Used to tell the linker which vtable entries are used. */
- BFD_RELOC_MT_GNU_VTINHERIT,
-
-/* Morpho MT - Used to tell the linker which vtable entries are used. */
- BFD_RELOC_MT_GNU_VTENTRY,
-
-/* Morpho MT - 8 bit immediate relocation. */
- BFD_RELOC_MT_PCINSN8,
-
-/* msp430 specific relocation codes */
- BFD_RELOC_MSP430_10_PCREL,
- BFD_RELOC_MSP430_16_PCREL,
- BFD_RELOC_MSP430_16,
- BFD_RELOC_MSP430_16_PCREL_BYTE,
- BFD_RELOC_MSP430_16_BYTE,
- BFD_RELOC_MSP430_2X_PCREL,
- BFD_RELOC_MSP430_RL_PCREL,
- BFD_RELOC_MSP430_ABS8,
- BFD_RELOC_MSP430X_PCR20_EXT_SRC,
- BFD_RELOC_MSP430X_PCR20_EXT_DST,
- BFD_RELOC_MSP430X_PCR20_EXT_ODST,
- BFD_RELOC_MSP430X_ABS20_EXT_SRC,
- BFD_RELOC_MSP430X_ABS20_EXT_DST,
- BFD_RELOC_MSP430X_ABS20_EXT_ODST,
- BFD_RELOC_MSP430X_ABS20_ADR_SRC,
- BFD_RELOC_MSP430X_ABS20_ADR_DST,
- BFD_RELOC_MSP430X_PCR16,
- BFD_RELOC_MSP430X_PCR20_CALL,
- BFD_RELOC_MSP430X_ABS16,
- BFD_RELOC_MSP430_ABS_HI16,
- BFD_RELOC_MSP430_PREL31,
- BFD_RELOC_MSP430_SYM_DIFF,
-
-/* Relocations used by the Altera Nios II core. */
- BFD_RELOC_NIOS2_S16,
- BFD_RELOC_NIOS2_U16,
- BFD_RELOC_NIOS2_CALL26,
- BFD_RELOC_NIOS2_IMM5,
- BFD_RELOC_NIOS2_CACHE_OPX,
- BFD_RELOC_NIOS2_IMM6,
- BFD_RELOC_NIOS2_IMM8,
- BFD_RELOC_NIOS2_HI16,
- BFD_RELOC_NIOS2_LO16,
- BFD_RELOC_NIOS2_HIADJ16,
- BFD_RELOC_NIOS2_GPREL,
- BFD_RELOC_NIOS2_UJMP,
- BFD_RELOC_NIOS2_CJMP,
- BFD_RELOC_NIOS2_CALLR,
- BFD_RELOC_NIOS2_ALIGN,
- BFD_RELOC_NIOS2_GOT16,
- BFD_RELOC_NIOS2_CALL16,
- BFD_RELOC_NIOS2_GOTOFF_LO,
- BFD_RELOC_NIOS2_GOTOFF_HA,
- BFD_RELOC_NIOS2_PCREL_LO,
- BFD_RELOC_NIOS2_PCREL_HA,
- BFD_RELOC_NIOS2_TLS_GD16,
- BFD_RELOC_NIOS2_TLS_LDM16,
- BFD_RELOC_NIOS2_TLS_LDO16,
- BFD_RELOC_NIOS2_TLS_IE16,
- BFD_RELOC_NIOS2_TLS_LE16,
- BFD_RELOC_NIOS2_TLS_DTPMOD,
- BFD_RELOC_NIOS2_TLS_DTPREL,
- BFD_RELOC_NIOS2_TLS_TPREL,
- BFD_RELOC_NIOS2_COPY,
- BFD_RELOC_NIOS2_GLOB_DAT,
- BFD_RELOC_NIOS2_JUMP_SLOT,
- BFD_RELOC_NIOS2_RELATIVE,
- BFD_RELOC_NIOS2_GOTOFF,
- BFD_RELOC_NIOS2_CALL26_NOAT,
- BFD_RELOC_NIOS2_GOT_LO,
- BFD_RELOC_NIOS2_GOT_HA,
- BFD_RELOC_NIOS2_CALL_LO,
- BFD_RELOC_NIOS2_CALL_HA,
- BFD_RELOC_NIOS2_R2_S12,
- BFD_RELOC_NIOS2_R2_I10_1_PCREL,
- BFD_RELOC_NIOS2_R2_T1I7_1_PCREL,
- BFD_RELOC_NIOS2_R2_T1I7_2,
- BFD_RELOC_NIOS2_R2_T2I4,
- BFD_RELOC_NIOS2_R2_T2I4_1,
- BFD_RELOC_NIOS2_R2_T2I4_2,
- BFD_RELOC_NIOS2_R2_X1I7_2,
- BFD_RELOC_NIOS2_R2_X2L5,
- BFD_RELOC_NIOS2_R2_F1I5_2,
- BFD_RELOC_NIOS2_R2_L5I4X1,
- BFD_RELOC_NIOS2_R2_T1X1I6,
- BFD_RELOC_NIOS2_R2_T1X1I6_2,
-
-/* PRU LDI 16-bit unsigned data-memory relocation. */
- BFD_RELOC_PRU_U16,
-
-/* PRU LDI 16-bit unsigned instruction-memory relocation. */
- BFD_RELOC_PRU_U16_PMEMIMM,
-
-/* PRU relocation for two consecutive LDI load instructions that load a
-32 bit value into a register. If the higher bits are all zero, then
-the second instruction may be relaxed. */
- BFD_RELOC_PRU_LDI32,
-
-/* PRU QBBx 10-bit signed PC-relative relocation. */
- BFD_RELOC_PRU_S10_PCREL,
-
-/* PRU 8-bit unsigned relocation used for the LOOP instruction. */
- BFD_RELOC_PRU_U8_PCREL,
-
-/* PRU Program Memory relocations. Used to convert from byte addressing to
-32-bit word addressing. */
- BFD_RELOC_PRU_32_PMEM,
- BFD_RELOC_PRU_16_PMEM,
-
-/* PRU relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-second symbol so the linker can determine whether to adjust the field
-value. The PMEM variants encode the word difference, instead of byte
-difference between symbols. */
- BFD_RELOC_PRU_GNU_DIFF8,
- BFD_RELOC_PRU_GNU_DIFF16,
- BFD_RELOC_PRU_GNU_DIFF32,
- BFD_RELOC_PRU_GNU_DIFF16_PMEM,
- BFD_RELOC_PRU_GNU_DIFF32_PMEM,
-
-/* IQ2000 Relocations. */
- BFD_RELOC_IQ2000_OFFSET_16,
- BFD_RELOC_IQ2000_OFFSET_21,
- BFD_RELOC_IQ2000_UHI16,
-
-/* Special Xtensa relocation used only by PLT entries in ELF shared
-objects to indicate that the runtime linker should set the value
-to one of its own internal functions or data structures. */
- BFD_RELOC_XTENSA_RTLD,
-
-/* Xtensa relocations for ELF shared objects. */
- BFD_RELOC_XTENSA_GLOB_DAT,
- BFD_RELOC_XTENSA_JMP_SLOT,
- BFD_RELOC_XTENSA_RELATIVE,
-
-/* Xtensa relocation used in ELF object files for symbols that may require
-PLT entries. Otherwise, this is just a generic 32-bit relocation. */
- BFD_RELOC_XTENSA_PLT,
-
-/* Xtensa relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-first symbol so the linker can determine whether to adjust the field
-value. */
- BFD_RELOC_XTENSA_DIFF8,
- BFD_RELOC_XTENSA_DIFF16,
- BFD_RELOC_XTENSA_DIFF32,
-
-/* Generic Xtensa relocations for instruction operands. Only the slot
-number is encoded in the relocation. The relocation applies to the
-last PC-relative immediate operand, or if there are no PC-relative
-immediates, to the last immediate operand. */
- BFD_RELOC_XTENSA_SLOT0_OP,
- BFD_RELOC_XTENSA_SLOT1_OP,
- BFD_RELOC_XTENSA_SLOT2_OP,
- BFD_RELOC_XTENSA_SLOT3_OP,
- BFD_RELOC_XTENSA_SLOT4_OP,
- BFD_RELOC_XTENSA_SLOT5_OP,
- BFD_RELOC_XTENSA_SLOT6_OP,
- BFD_RELOC_XTENSA_SLOT7_OP,
- BFD_RELOC_XTENSA_SLOT8_OP,
- BFD_RELOC_XTENSA_SLOT9_OP,
- BFD_RELOC_XTENSA_SLOT10_OP,
- BFD_RELOC_XTENSA_SLOT11_OP,
- BFD_RELOC_XTENSA_SLOT12_OP,
- BFD_RELOC_XTENSA_SLOT13_OP,
- BFD_RELOC_XTENSA_SLOT14_OP,
-
-/* Alternate Xtensa relocations. Only the slot is encoded in the
-relocation. The meaning of these relocations is opcode-specific. */
- BFD_RELOC_XTENSA_SLOT0_ALT,
- BFD_RELOC_XTENSA_SLOT1_ALT,
- BFD_RELOC_XTENSA_SLOT2_ALT,
- BFD_RELOC_XTENSA_SLOT3_ALT,
- BFD_RELOC_XTENSA_SLOT4_ALT,
- BFD_RELOC_XTENSA_SLOT5_ALT,
- BFD_RELOC_XTENSA_SLOT6_ALT,
- BFD_RELOC_XTENSA_SLOT7_ALT,
- BFD_RELOC_XTENSA_SLOT8_ALT,
- BFD_RELOC_XTENSA_SLOT9_ALT,
- BFD_RELOC_XTENSA_SLOT10_ALT,
- BFD_RELOC_XTENSA_SLOT11_ALT,
- BFD_RELOC_XTENSA_SLOT12_ALT,
- BFD_RELOC_XTENSA_SLOT13_ALT,
- BFD_RELOC_XTENSA_SLOT14_ALT,
-
-/* Xtensa relocations for backward compatibility. These have all been
-replaced by BFD_RELOC_XTENSA_SLOT0_OP. */
- BFD_RELOC_XTENSA_OP0,
- BFD_RELOC_XTENSA_OP1,
- BFD_RELOC_XTENSA_OP2,
-
-/* Xtensa relocation to mark that the assembler expanded the
-instructions from an original target. The expansion size is
-encoded in the reloc size. */
- BFD_RELOC_XTENSA_ASM_EXPAND,
-
-/* Xtensa relocation to mark that the linker should simplify
-assembler-expanded instructions. This is commonly used
-internally by the linker after analysis of a
-BFD_RELOC_XTENSA_ASM_EXPAND. */
- BFD_RELOC_XTENSA_ASM_SIMPLIFY,
-
-/* Xtensa TLS relocations. */
- BFD_RELOC_XTENSA_TLSDESC_FN,
- BFD_RELOC_XTENSA_TLSDESC_ARG,
- BFD_RELOC_XTENSA_TLS_DTPOFF,
- BFD_RELOC_XTENSA_TLS_TPOFF,
- BFD_RELOC_XTENSA_TLS_FUNC,
- BFD_RELOC_XTENSA_TLS_ARG,
- BFD_RELOC_XTENSA_TLS_CALL,
-
-/* 8 bit signed offset in (ix+d) or (iy+d). */
- BFD_RELOC_Z80_DISP8,
-
-/* DJNZ offset. */
- BFD_RELOC_Z8K_DISP7,
-
-/* CALR offset. */
- BFD_RELOC_Z8K_CALLR,
-
-/* 4 bit value. */
- BFD_RELOC_Z8K_IMM4L,
-
-/* Lattice Mico32 relocations. */
- BFD_RELOC_LM32_CALL,
- BFD_RELOC_LM32_BRANCH,
- BFD_RELOC_LM32_16_GOT,
- BFD_RELOC_LM32_GOTOFF_HI16,
- BFD_RELOC_LM32_GOTOFF_LO16,
- BFD_RELOC_LM32_COPY,
- BFD_RELOC_LM32_GLOB_DAT,
- BFD_RELOC_LM32_JMP_SLOT,
- BFD_RELOC_LM32_RELATIVE,
-
-/* Difference between two section addreses. Must be followed by a
-BFD_RELOC_MACH_O_PAIR. */
- BFD_RELOC_MACH_O_SECTDIFF,
-
-/* Like BFD_RELOC_MACH_O_SECTDIFF but with a local symbol. */
- BFD_RELOC_MACH_O_LOCAL_SECTDIFF,
-
-/* Pair of relocation. Contains the first symbol. */
- BFD_RELOC_MACH_O_PAIR,
-
-/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */
- BFD_RELOC_MACH_O_SUBTRACTOR32,
-
-/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */
- BFD_RELOC_MACH_O_SUBTRACTOR64,
-
-/* PCREL relocations. They are marked as branch to create PLT entry if
-required. */
- BFD_RELOC_MACH_O_X86_64_BRANCH32,
- BFD_RELOC_MACH_O_X86_64_BRANCH8,
-
-/* Used when referencing a GOT entry. */
- BFD_RELOC_MACH_O_X86_64_GOT,
-
-/* Used when loading a GOT entry with movq. It is specially marked so that
-the linker could optimize the movq to a leaq if possible. */
- BFD_RELOC_MACH_O_X86_64_GOT_LOAD,
-
-/* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */
- BFD_RELOC_MACH_O_X86_64_PCREL32_1,
-
-/* Same as BFD_RELOC_32_PCREL but with an implicit -2 addend. */
- BFD_RELOC_MACH_O_X86_64_PCREL32_2,
-
-/* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */
- BFD_RELOC_MACH_O_X86_64_PCREL32_4,
-
-/* Used when referencing a TLV entry. */
- BFD_RELOC_MACH_O_X86_64_TLV,
-
-/* Addend for PAGE or PAGEOFF. */
- BFD_RELOC_MACH_O_ARM64_ADDEND,
-
-/* Relative offset to page of GOT slot. */
- BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21,
-
-/* Relative offset within page of GOT slot. */
- BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12,
-
-/* Address of a GOT entry. */
- BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT,
-
-/* This is a 32 bit reloc for the microblaze that stores the
-low 16 bits of a value */
- BFD_RELOC_MICROBLAZE_32_LO,
-
-/* This is a 32 bit pc-relative reloc for the microblaze that
-stores the low 16 bits of a value */
- BFD_RELOC_MICROBLAZE_32_LO_PCREL,
-
-/* This is a 32 bit reloc for the microblaze that stores a
-value relative to the read-only small data area anchor */
- BFD_RELOC_MICROBLAZE_32_ROSDA,
-
-/* This is a 32 bit reloc for the microblaze that stores a
-value relative to the read-write small data area anchor */
- BFD_RELOC_MICROBLAZE_32_RWSDA,
-
-/* This is a 32 bit reloc for the microblaze to handle
-expressions of the form "Symbol Op Symbol" */
- BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). No relocation is
-done here - only used for relaxing */
- BFD_RELOC_MICROBLAZE_64_NONE,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-PC-relative GOT offset */
- BFD_RELOC_MICROBLAZE_64_GOTPC,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-GOT offset */
- BFD_RELOC_MICROBLAZE_64_GOT,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-PC-relative offset into PLT */
- BFD_RELOC_MICROBLAZE_64_PLT,
-
-/* This is a 64 bit reloc that stores the 32 bit GOT relative
-value in two words (with an imm instruction). The relocation is
-relative offset from _GLOBAL_OFFSET_TABLE_ */
- BFD_RELOC_MICROBLAZE_64_GOTOFF,
-
-/* This is a 32 bit reloc that stores the 32 bit GOT relative
-value in a word. The relocation is relative offset from */
- BFD_RELOC_MICROBLAZE_32_GOTOFF,
-
-/* This is used to tell the dynamic linker to copy the value out of
-the dynamic object into the runtime process image. */
- BFD_RELOC_MICROBLAZE_COPY,
-
-/* Unused Reloc */
- BFD_RELOC_MICROBLAZE_64_TLS,
-
-/* This is a 64 bit reloc that stores the 32 bit GOT relative value
-of the GOT TLS GD info entry in two words (with an imm instruction). The
-relocation is GOT offset. */
- BFD_RELOC_MICROBLAZE_64_TLSGD,
-
-/* This is a 64 bit reloc that stores the 32 bit GOT relative value
-of the GOT TLS LD info entry in two words (with an imm instruction). The
-relocation is GOT offset. */
- BFD_RELOC_MICROBLAZE_64_TLSLD,
-
-/* This is a 32 bit reloc that stores the Module ID to GOT(n). */
- BFD_RELOC_MICROBLAZE_32_TLSDTPMOD,
-
-/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */
- BFD_RELOC_MICROBLAZE_32_TLSDTPREL,
-
-/* This is a 32 bit reloc for storing TLS offset to two words (uses imm
-instruction) */
- BFD_RELOC_MICROBLAZE_64_TLSDTPREL,
-
-/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
-to two words (uses imm instruction). */
- BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL,
-
-/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
-to two words (uses imm instruction). */
- BFD_RELOC_MICROBLAZE_64_TLSTPREL,
-
-/* This is a 64 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction). The relocation is
-PC-relative offset from start of TEXT. */
- BFD_RELOC_MICROBLAZE_64_TEXTPCREL,
-
-/* This is a 64 bit reloc that stores the 32 bit offset
-value in two words (with an imm instruction). The relocation is
-relative offset from start of TEXT. */
- BFD_RELOC_MICROBLAZE_64_TEXTREL,
-
-/* AArch64 pseudo relocation code to mark the start of the AArch64
-relocation enumerators. N.B. the order of the enumerators is
-important as several tables in the AArch64 bfd backend are indexed
-by these enumerators; make sure they are all synced. */
- BFD_RELOC_AARCH64_RELOC_START,
-
-/* Deprecated AArch64 null relocation code. */
- BFD_RELOC_AARCH64_NULL,
-
-/* AArch64 null relocation code. */
- BFD_RELOC_AARCH64_NONE,
-
-/* Basic absolute relocations of N bits. These are equivalent to
-BFD_RELOC_N and they were added to assist the indexing of the howto
-table. */
- BFD_RELOC_AARCH64_64,
- BFD_RELOC_AARCH64_32,
- BFD_RELOC_AARCH64_16,
-
-/* PC-relative relocations. These are equivalent to BFD_RELOC_N_PCREL
-and they were added to assist the indexing of the howto table. */
- BFD_RELOC_AARCH64_64_PCREL,
- BFD_RELOC_AARCH64_32_PCREL,
- BFD_RELOC_AARCH64_16_PCREL,
-
-/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15
-of an unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G0,
-
-/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of
-an address/value. No overflow checking. */
- BFD_RELOC_AARCH64_MOVW_G0_NC,
-
-/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31
-of an unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G1,
-
-/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31
-of an address/value. No overflow checking. */
- BFD_RELOC_AARCH64_MOVW_G1_NC,
-
-/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47
-of an unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G2,
-
-/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47
-of an address/value. No overflow checking. */
- BFD_RELOC_AARCH64_MOVW_G2_NC,
-
-/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64
-of a signed or unsigned address/value. */
- BFD_RELOC_AARCH64_MOVW_G3,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_G0_S,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 16 to 31
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_G1_S,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 32 to 47
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_G2_S,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_PREL_G0,
-
-/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
-of a signed value. Changes instruction to MOVZ or MOVN depending on the
-value's sign. */
- BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
-
-/* AArch64 MOVK instruction with most significant bits 16 to 31
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G1,
-
-/* AArch64 MOVK instruction with most significant bits 16 to 31
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
-
-/* AArch64 MOVK instruction with most significant bits 32 to 47
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G2,
-
-/* AArch64 MOVK instruction with most significant bits 32 to 47
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
-
-/* AArch64 MOVK instruction with most significant bits 47 to 63
-of a signed value. */
- BFD_RELOC_AARCH64_MOVW_PREL_G3,
-
-/* AArch64 Load Literal instruction, holding a 19 bit pc-relative word
-offset. The lowest two bits must be zero and are not stored in the
-instruction, giving a 21 bit signed byte offset. */
- BFD_RELOC_AARCH64_LD_LO19_PCREL,
-
-/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */
- BFD_RELOC_AARCH64_ADR_LO21_PCREL,
-
-/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
-offset, giving a 4KB aligned page base address. */
- BFD_RELOC_AARCH64_ADR_HI21_PCREL,
-
-/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
-offset, giving a 4KB aligned page base address, but with no overflow
-checking. */
- BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL,
-
-/* AArch64 ADD immediate instruction, holding bits 0 to 11 of the address.
-Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_ADD_LO12,
-
-/* AArch64 8-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST8_LO12,
-
-/* AArch64 14 bit pc-relative test bit and branch.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 16 bit signed byte offset. */
- BFD_RELOC_AARCH64_TSTBR14,
-
-/* AArch64 19 bit pc-relative conditional branch and compare & branch.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 21 bit signed byte offset. */
- BFD_RELOC_AARCH64_BRANCH19,
-
-/* AArch64 26 bit pc-relative unconditional branch.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 28 bit signed byte offset. */
- BFD_RELOC_AARCH64_JUMP26,
-
-/* AArch64 26 bit pc-relative unconditional branch and link.
-The lowest two bits must be zero and are not stored in the instruction,
-giving a 28 bit signed byte offset. */
- BFD_RELOC_AARCH64_CALL26,
-
-/* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST16_LO12,
-
-/* AArch64 32-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST32_LO12,
-
-/* AArch64 64-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST64_LO12,
-
-/* AArch64 128-bit load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST128_LO12,
-
-/* AArch64 Load Literal instruction, holding a 19 bit PC relative word
-offset of the global offset table entry for a symbol. The lowest two
-bits must be zero and are not stored in the instruction, giving a 21
-bit signed byte offset. This relocation type requires signed overflow
-checking. */
- BFD_RELOC_AARCH64_GOT_LD_PREL19,
-
-/* Get to the page base of the global offset table entry for a symbol as
-part of an ADRP instruction using a 21 bit PC relative value.Used in
-conjunction with BFD_RELOC_AARCH64_LD64_GOT_LO12_NC. */
- BFD_RELOC_AARCH64_ADR_GOT_PAGE,
-
-/* Unsigned 12 bit byte offset for 64 bit load/store from the page of
-the GOT entry for this symbol. Used in conjunction with
-BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_LD64_GOT_LO12_NC,
-
-/* Unsigned 12 bit byte offset for 32 bit load/store from the page of
-the GOT entry for this symbol. Used in conjunction with
-BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in ILP32 ABI only. */
- BFD_RELOC_AARCH64_LD32_GOT_LO12_NC,
-
-/* Unsigned 16 bit byte offset for 64 bit load/store from the GOT entry
-for this symbol. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
-
-/* Unsigned 16 bit byte higher offset for 64 bit load/store from the GOT entry
-for this symbol. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_MOVW_GOTOFF_G1,
-
-/* Unsigned 15 bit byte offset for 64 bit load/store from the page of
-the GOT entry for this symbol. Valid in LP64 ABI only. */
- BFD_RELOC_AARCH64_LD64_GOTOFF_LO15,
-
-/* Scaled 14 bit byte offset to the page base of the global offset table. */
- BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14,
-
-/* Scaled 15 bit byte offset to the page base of the global offset table. */
- BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15,
-
-/* Get to the page base of the global offset table entry for a symbols
-tls_index structure as part of an adrp instruction using a 21 bit PC
-relative value. Used in conjunction with
-BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */
- BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21,
-
-/* AArch64 TLS General Dynamic */
- BFD_RELOC_AARCH64_TLSGD_ADR_PREL21,
-
-/* Unsigned 12 bit byte offset to global offset table entry for a symbols
-tls_index structure. Used in conjunction with
-BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21. */
- BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC,
-
-/* AArch64 TLS General Dynamic relocation. */
- BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC,
-
-/* AArch64 TLS General Dynamic relocation. */
- BFD_RELOC_AARCH64_TLSGD_MOVW_G1,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC,
-
-/* AArch64 TLS INITIAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1,
-
-/* bit[23:12] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
-
-/* Unsigned 12 bit byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12,
-
-/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */
- BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC,
-
-/* Unsigned 12 bit byte offset to global offset table entry for a symbols
-tls_index structure. Used in conjunction with
-BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21. */
- BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC,
-
-/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP
-instruction. */
- BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21,
-
-/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */
- BFD_RELOC_AARCH64_TLSLD_ADR_PREL21,
-
-/* bit[11:1] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
-
-/* bit[11:2] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
-
-/* bit[11:3] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
-
-/* bit[11:0] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
-
-/* bit[15:0] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
-
-/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
-
-/* bit[31:16] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
-
-/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
-
-/* bit[47:32] of byte offset to module TLS base address. */
- BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12,
-
-/* AArch64 TLS LOCAL EXEC relocation. */
- BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC,
-
-/* bit[11:1] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
-
-/* bit[11:2] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
-
-/* bit[11:3] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
-
-/* bit[11:0] of byte offset to module TLS base address, encoded in ldst
-instructions. */
- BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LD_PREL19,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LD64_LO12,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADD_LO12,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_OFF_G1,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_LDR,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_ADD,
-
-/* AArch64 TLS DESC relocation. */
- BFD_RELOC_AARCH64_TLSDESC_CALL,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_COPY,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_GLOB_DAT,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_JUMP_SLOT,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_RELATIVE,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLS_DTPMOD,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLS_DTPREL,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLS_TPREL,
-
-/* AArch64 TLS relocation. */
- BFD_RELOC_AARCH64_TLSDESC,
-
-/* AArch64 support for STT_GNU_IFUNC. */
- BFD_RELOC_AARCH64_IRELATIVE,
-
-/* AArch64 pseudo relocation code to mark the end of the AArch64
-relocation enumerators that have direct mapping to ELF reloc codes.
-There are a few more enumerators after this one; those are mainly
-used by the AArch64 assembler for the internal fixup or to select
-one of the above enumerators. */
- BFD_RELOC_AARCH64_RELOC_END,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP,
-
-/* AArch64 unspecified load/store instruction, holding bits 0 to 11 of the
-address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
- BFD_RELOC_AARCH64_LDST_LO12,
-
-/* AArch64 pseudo relocation code for TLS local dynamic mode. It's to be
-used internally by the AArch64 assembler and not (currently) written to
-any object files. */
- BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC,
-
-/* AArch64 pseudo relocation code for TLS local exec mode. It's to be
-used internally by the AArch64 assembler and not (currently) written to
-any object files. */
- BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12,
-
-/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */
- BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_LD_GOT_LO12_NC,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC,
-
-/* AArch64 pseudo relocation code to be used internally by the AArch64
-assembler and not (currently) written to any object files. */
- BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC,
-
-/* Tilera TILEPro Relocations. */
- BFD_RELOC_TILEPRO_COPY,
- BFD_RELOC_TILEPRO_GLOB_DAT,
- BFD_RELOC_TILEPRO_JMP_SLOT,
- BFD_RELOC_TILEPRO_RELATIVE,
- BFD_RELOC_TILEPRO_BROFF_X1,
- BFD_RELOC_TILEPRO_JOFFLONG_X1,
- BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT,
- BFD_RELOC_TILEPRO_IMM8_X0,
- BFD_RELOC_TILEPRO_IMM8_Y0,
- BFD_RELOC_TILEPRO_IMM8_X1,
- BFD_RELOC_TILEPRO_IMM8_Y1,
- BFD_RELOC_TILEPRO_DEST_IMM8_X1,
- BFD_RELOC_TILEPRO_MT_IMM15_X1,
- BFD_RELOC_TILEPRO_MF_IMM15_X1,
- BFD_RELOC_TILEPRO_IMM16_X0,
- BFD_RELOC_TILEPRO_IMM16_X1,
- BFD_RELOC_TILEPRO_IMM16_X0_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_HA,
- BFD_RELOC_TILEPRO_IMM16_X0_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA,
- BFD_RELOC_TILEPRO_MMSTART_X0,
- BFD_RELOC_TILEPRO_MMEND_X0,
- BFD_RELOC_TILEPRO_MMSTART_X1,
- BFD_RELOC_TILEPRO_MMEND_X1,
- BFD_RELOC_TILEPRO_SHAMT_X0,
- BFD_RELOC_TILEPRO_SHAMT_X1,
- BFD_RELOC_TILEPRO_SHAMT_Y0,
- BFD_RELOC_TILEPRO_SHAMT_Y1,
- BFD_RELOC_TILEPRO_TLS_GD_CALL,
- BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
- BFD_RELOC_TILEPRO_TLS_IE_LOAD,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA,
- BFD_RELOC_TILEPRO_TLS_DTPMOD32,
- BFD_RELOC_TILEPRO_TLS_DTPOFF32,
- BFD_RELOC_TILEPRO_TLS_TPOFF32,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
- BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
- BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
-
-/* Tilera TILE-Gx Relocations. */
- BFD_RELOC_TILEGX_HW0,
- BFD_RELOC_TILEGX_HW1,
- BFD_RELOC_TILEGX_HW2,
- BFD_RELOC_TILEGX_HW3,
- BFD_RELOC_TILEGX_HW0_LAST,
- BFD_RELOC_TILEGX_HW1_LAST,
- BFD_RELOC_TILEGX_HW2_LAST,
- BFD_RELOC_TILEGX_COPY,
- BFD_RELOC_TILEGX_GLOB_DAT,
- BFD_RELOC_TILEGX_JMP_SLOT,
- BFD_RELOC_TILEGX_RELATIVE,
- BFD_RELOC_TILEGX_BROFF_X1,
- BFD_RELOC_TILEGX_JUMPOFF_X1,
- BFD_RELOC_TILEGX_JUMPOFF_X1_PLT,
- BFD_RELOC_TILEGX_IMM8_X0,
- BFD_RELOC_TILEGX_IMM8_Y0,
- BFD_RELOC_TILEGX_IMM8_X1,
- BFD_RELOC_TILEGX_IMM8_Y1,
- BFD_RELOC_TILEGX_DEST_IMM8_X1,
- BFD_RELOC_TILEGX_MT_IMM14_X1,
- BFD_RELOC_TILEGX_MF_IMM14_X1,
- BFD_RELOC_TILEGX_MMSTART_X0,
- BFD_RELOC_TILEGX_MMEND_X0,
- BFD_RELOC_TILEGX_SHAMT_X0,
- BFD_RELOC_TILEGX_SHAMT_X1,
- BFD_RELOC_TILEGX_SHAMT_Y0,
- BFD_RELOC_TILEGX_SHAMT_Y1,
- BFD_RELOC_TILEGX_IMM16_X0_HW0,
- BFD_RELOC_TILEGX_IMM16_X1_HW0,
- BFD_RELOC_TILEGX_IMM16_X0_HW1,
- BFD_RELOC_TILEGX_IMM16_X1_HW1,
- BFD_RELOC_TILEGX_IMM16_X0_HW2,
- BFD_RELOC_TILEGX_IMM16_X1_HW2,
- BFD_RELOC_TILEGX_IMM16_X0_HW3,
- BFD_RELOC_TILEGX_IMM16_X1_HW3,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT,
- BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL,
- BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE,
- BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE,
- BFD_RELOC_TILEGX_TLS_DTPMOD64,
- BFD_RELOC_TILEGX_TLS_DTPOFF64,
- BFD_RELOC_TILEGX_TLS_TPOFF64,
- BFD_RELOC_TILEGX_TLS_DTPMOD32,
- BFD_RELOC_TILEGX_TLS_DTPOFF32,
- BFD_RELOC_TILEGX_TLS_TPOFF32,
- BFD_RELOC_TILEGX_TLS_GD_CALL,
- BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
- BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
- BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
- BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD,
- BFD_RELOC_TILEGX_TLS_IE_LOAD,
- BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
- BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
- BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD,
- BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD,
-
-/* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */
- BFD_RELOC_EPIPHANY_SIMM8,
-
-/* Adapteva EPIPHANY - 24 bit signed pc-relative displacement */
- BFD_RELOC_EPIPHANY_SIMM24,
-
-/* Adapteva EPIPHANY - 16 most-significant bits of absolute address */
- BFD_RELOC_EPIPHANY_HIGH,
-
-/* Adapteva EPIPHANY - 16 least-significant bits of absolute address */
- BFD_RELOC_EPIPHANY_LOW,
-
-/* Adapteva EPIPHANY - 11 bit signed number - add/sub immediate */
- BFD_RELOC_EPIPHANY_SIMM11,
-
-/* Adapteva EPIPHANY - 11 bit sign-magnitude number (ld/st displacement) */
- BFD_RELOC_EPIPHANY_IMM11,
-
-/* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */
- BFD_RELOC_EPIPHANY_IMM8,
-
-/* Visium Relocations. */
- BFD_RELOC_VISIUM_HI16,
- BFD_RELOC_VISIUM_LO16,
- BFD_RELOC_VISIUM_IM16,
- BFD_RELOC_VISIUM_REL16,
- BFD_RELOC_VISIUM_HI16_PCREL,
- BFD_RELOC_VISIUM_LO16_PCREL,
- BFD_RELOC_VISIUM_IM16_PCREL,
-
-/* WebAssembly relocations. */
- BFD_RELOC_WASM32_LEB128,
- BFD_RELOC_WASM32_LEB128_GOT,
- BFD_RELOC_WASM32_LEB128_GOT_CODE,
- BFD_RELOC_WASM32_LEB128_PLT,
- BFD_RELOC_WASM32_PLT_INDEX,
- BFD_RELOC_WASM32_ABS32_CODE,
- BFD_RELOC_WASM32_COPY,
- BFD_RELOC_WASM32_CODE_POINTER,
- BFD_RELOC_WASM32_INDEX,
- BFD_RELOC_WASM32_PLT_SIG,
-
-/* C-SKY relocations. */
- BFD_RELOC_CKCORE_NONE,
- BFD_RELOC_CKCORE_ADDR32,
- BFD_RELOC_CKCORE_PCREL_IMM8BY4,
- BFD_RELOC_CKCORE_PCREL_IMM11BY2,
- BFD_RELOC_CKCORE_PCREL_IMM4BY2,
- BFD_RELOC_CKCORE_PCREL32,
- BFD_RELOC_CKCORE_PCREL_JSR_IMM11BY2,
- BFD_RELOC_CKCORE_GNU_VTINHERIT,
- BFD_RELOC_CKCORE_GNU_VTENTRY,
- BFD_RELOC_CKCORE_RELATIVE,
- BFD_RELOC_CKCORE_COPY,
- BFD_RELOC_CKCORE_GLOB_DAT,
- BFD_RELOC_CKCORE_JUMP_SLOT,
- BFD_RELOC_CKCORE_GOTOFF,
- BFD_RELOC_CKCORE_GOTPC,
- BFD_RELOC_CKCORE_GOT32,
- BFD_RELOC_CKCORE_PLT32,
- BFD_RELOC_CKCORE_ADDRGOT,
- BFD_RELOC_CKCORE_ADDRPLT,
- BFD_RELOC_CKCORE_PCREL_IMM26BY2,
- BFD_RELOC_CKCORE_PCREL_IMM16BY2,
- BFD_RELOC_CKCORE_PCREL_IMM16BY4,
- BFD_RELOC_CKCORE_PCREL_IMM10BY2,
- BFD_RELOC_CKCORE_PCREL_IMM10BY4,
- BFD_RELOC_CKCORE_ADDR_HI16,
- BFD_RELOC_CKCORE_ADDR_LO16,
- BFD_RELOC_CKCORE_GOTPC_HI16,
- BFD_RELOC_CKCORE_GOTPC_LO16,
- BFD_RELOC_CKCORE_GOTOFF_HI16,
- BFD_RELOC_CKCORE_GOTOFF_LO16,
- BFD_RELOC_CKCORE_GOT12,
- BFD_RELOC_CKCORE_GOT_HI16,
- BFD_RELOC_CKCORE_GOT_LO16,
- BFD_RELOC_CKCORE_PLT12,
- BFD_RELOC_CKCORE_PLT_HI16,
- BFD_RELOC_CKCORE_PLT_LO16,
- BFD_RELOC_CKCORE_ADDRGOT_HI16,
- BFD_RELOC_CKCORE_ADDRGOT_LO16,
- BFD_RELOC_CKCORE_ADDRPLT_HI16,
- BFD_RELOC_CKCORE_ADDRPLT_LO16,
- BFD_RELOC_CKCORE_PCREL_JSR_IMM26BY2,
- BFD_RELOC_CKCORE_TOFFSET_LO16,
- BFD_RELOC_CKCORE_DOFFSET_LO16,
- BFD_RELOC_CKCORE_PCREL_IMM18BY2,
- BFD_RELOC_CKCORE_DOFFSET_IMM18,
- BFD_RELOC_CKCORE_DOFFSET_IMM18BY2,
- BFD_RELOC_CKCORE_DOFFSET_IMM18BY4,
- BFD_RELOC_CKCORE_GOTOFF_IMM18,
- BFD_RELOC_CKCORE_GOT_IMM18BY4,
- BFD_RELOC_CKCORE_PLT_IMM18BY4,
- BFD_RELOC_CKCORE_PCREL_IMM7BY4,
- BFD_RELOC_CKCORE_TLS_LE32,
- BFD_RELOC_CKCORE_TLS_IE32,
- BFD_RELOC_CKCORE_TLS_GD32,
- BFD_RELOC_CKCORE_TLS_LDM32,
- BFD_RELOC_CKCORE_TLS_LDO32,
- BFD_RELOC_CKCORE_TLS_DTPMOD32,
- BFD_RELOC_CKCORE_TLS_DTPOFF32,
- BFD_RELOC_CKCORE_TLS_TPOFF32,
- BFD_RELOC_CKCORE_PCREL_FLRW_IMM8BY4,
- BFD_RELOC_CKCORE_NOJSRI,
- BFD_RELOC_CKCORE_CALLGRAPH,
- BFD_RELOC_CKCORE_IRELATIVE,
- BFD_RELOC_CKCORE_PCREL_BLOOP_IMM4BY4,
- BFD_RELOC_CKCORE_PCREL_BLOOP_IMM12BY4,
-
-/* S12Z relocations. */
- BFD_RELOC_S12Z_OPR,
- BFD_RELOC_UNUSED };
-
-typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
-reloc_howto_type *bfd_reloc_type_lookup
- (bfd *abfd, bfd_reloc_code_real_type code);
-reloc_howto_type *bfd_reloc_name_lookup
- (bfd *abfd, const char *reloc_name);
-
-const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
-
-/* Extracted from syms.c. */
-
-typedef struct bfd_symbol
-{
- /* A pointer to the BFD which owns the symbol. This information
- is necessary so that a back end can work out what additional
- information (invisible to the application writer) is carried
- with the symbol.
-
- This field is *almost* redundant, since you can use section->owner
- instead, except that some symbols point to the global sections
- bfd_{abs,com,und}_section. This could be fixed by making
- these globals be per-bfd (or per-target-flavor). FIXME. */
- struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
-
- /* The text of the symbol. The name is left alone, and not copied; the
- application may not alter it. */
- const char *name;
-
- /* The value of the symbol. This really should be a union of a
- numeric value with a pointer, since some flags indicate that
- a pointer to another symbol is stored here. */
- symvalue value;
-
- /* Attributes of a symbol. */
-#define BSF_NO_FLAGS 0
-
- /* The symbol has local scope; <> in <>. The value
- is the offset into the section of the data. */
-#define BSF_LOCAL (1 << 0)
-
- /* The symbol has global scope; initialized data in <>. The
- value is the offset into the section of the data. */
-#define BSF_GLOBAL (1 << 1)
-
- /* The symbol has global scope and is exported. The value is
- the offset into the section of the data. */
-#define BSF_EXPORT BSF_GLOBAL /* No real difference. */
-
- /* A normal C symbol would be one of:
- <>, <> or <>. */
-
- /* The symbol is a debugging record. The value has an arbitrary
- meaning, unless BSF_DEBUGGING_RELOC is also set. */
-#define BSF_DEBUGGING (1 << 2)
-
- /* The symbol denotes a function entry point. Used in ELF,
- perhaps others someday. */
-#define BSF_FUNCTION (1 << 3)
-
- /* Used by the linker. */
-#define BSF_KEEP (1 << 5)
-
- /* An ELF common symbol. */
-#define BSF_ELF_COMMON (1 << 6)
-
- /* A weak global symbol, overridable without warnings by
- a regular global symbol of the same name. */
-#define BSF_WEAK (1 << 7)
-
- /* This symbol was created to point to a section, e.g. ELF's
- STT_SECTION symbols. */
-#define BSF_SECTION_SYM (1 << 8)
-
- /* The symbol used to be a common symbol, but now it is
- allocated. */
-#define BSF_OLD_COMMON (1 << 9)
-
- /* In some files the type of a symbol sometimes alters its
- location in an output file - ie in coff a <> symbol
- which is also <> symbol appears where it was
- declared and not at the end of a section. This bit is set
- by the target BFD part to convey this information. */
-#define BSF_NOT_AT_END (1 << 10)
-
- /* Signal that the symbol is the label of constructor section. */
-#define BSF_CONSTRUCTOR (1 << 11)
-
- /* Signal that the symbol is a warning symbol. The name is a
- warning. The name of the next symbol is the one to warn about;
- if a reference is made to a symbol with the same name as the next
- symbol, a warning is issued by the linker. */
-#define BSF_WARNING (1 << 12)
-
- /* Signal that the symbol is indirect. This symbol is an indirect
- pointer to the symbol with the same name as the next symbol. */
-#define BSF_INDIRECT (1 << 13)
-
- /* BSF_FILE marks symbols that contain a file name. This is used
- for ELF STT_FILE symbols. */
-#define BSF_FILE (1 << 14)
-
- /* Symbol is from dynamic linking information. */
-#define BSF_DYNAMIC (1 << 15)
-
- /* The symbol denotes a data object. Used in ELF, and perhaps
- others someday. */
-#define BSF_OBJECT (1 << 16)
-
- /* This symbol is a debugging symbol. The value is the offset
- into the section of the data. BSF_DEBUGGING should be set
- as well. */
-#define BSF_DEBUGGING_RELOC (1 << 17)
-
- /* This symbol is thread local. Used in ELF. */
-#define BSF_THREAD_LOCAL (1 << 18)
-
- /* This symbol represents a complex relocation expression,
- with the expression tree serialized in the symbol name. */
-#define BSF_RELC (1 << 19)
-
- /* This symbol represents a signed complex relocation expression,
- with the expression tree serialized in the symbol name. */
-#define BSF_SRELC (1 << 20)
-
- /* This symbol was created by bfd_get_synthetic_symtab. */
-#define BSF_SYNTHETIC (1 << 21)
-
- /* This symbol is an indirect code object. Unrelated to BSF_INDIRECT.
- The dynamic linker will compute the value of this symbol by
- calling the function that it points to. BSF_FUNCTION must
- also be also set. */
-#define BSF_GNU_INDIRECT_FUNCTION (1 << 22)
- /* This symbol is a globally unique data object. The dynamic linker
- will make sure that in the entire process there is just one symbol
- with this name and type in use. BSF_OBJECT must also be set. */
-#define BSF_GNU_UNIQUE (1 << 23)
-
- flagword flags;
-
- /* A pointer to the section to which this symbol is
- relative. This will always be non NULL, there are special
- sections for undefined and absolute symbols. */
- struct bfd_section *section;
-
- /* Back end special data. */
- union
- {
- void *p;
- bfd_vma i;
- }
- udata;
-}
-asymbol;
-
-#define bfd_get_symtab_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
-
-bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
-
-bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
-
-#define bfd_is_local_label_name(abfd, name) \
- BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
-
-bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
-
-#define bfd_is_target_special_symbol(abfd, sym) \
- BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
-
-#define bfd_canonicalize_symtab(abfd, location) \
- BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
-
-bfd_boolean bfd_set_symtab
- (bfd *abfd, asymbol **location, unsigned int count);
-
-void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
-
-#define bfd_make_empty_symbol(abfd) \
- BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
-
-asymbol *_bfd_generic_make_empty_symbol (bfd *);
-
-#define bfd_make_debug_symbol(abfd,ptr,size) \
- BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
-
-int bfd_decode_symclass (asymbol *symbol);
-
-bfd_boolean bfd_is_undefined_symclass (int symclass);
-
-void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
-
-bfd_boolean bfd_copy_private_symbol_data
- (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
-
-#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
- BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
- (ibfd, isymbol, obfd, osymbol))
-
-/* Extracted from bfd.c. */
-
-enum bfd_direction
- {
- no_direction = 0,
- read_direction = 1,
- write_direction = 2,
- both_direction = 3
- };
-
-enum bfd_plugin_format
- {
- bfd_plugin_unknown = 0,
- bfd_plugin_yes = 1,
- bfd_plugin_no = 2
- };
-
-struct bfd_build_id
- {
- bfd_size_type size;
- bfd_byte data[1];
- };
-
-struct bfd
-{
- /* The filename the application opened the BFD with. */
- const char *filename;
-
- /* A pointer to the target jump table. */
- const struct bfd_target *xvec;
-
- /* The IOSTREAM, and corresponding IO vector that provide access
- to the file backing the BFD. */
- void *iostream;
- const struct bfd_iovec *iovec;
-
- /* The caching routines use these to maintain a
- least-recently-used list of BFDs. */
- struct bfd *lru_prev, *lru_next;
-
- /* Track current file position (or current buffer offset for
- in-memory BFDs). When a file is closed by the caching routines,
- BFD retains state information on the file here. */
- ufile_ptr where;
-
- /* File modified time, if mtime_set is TRUE. */
- long mtime;
-
- /* A unique identifier of the BFD */
- unsigned int id;
-
- /* The format which belongs to the BFD. (object, core, etc.) */
- ENUM_BITFIELD (bfd_format) format : 3;
-
- /* The direction with which the BFD was opened. */
- ENUM_BITFIELD (bfd_direction) direction : 2;
-
- /* Format_specific flags. */
- flagword flags : 20;
-
- /* Values that may appear in the flags field of a BFD. These also
- appear in the object_flags field of the bfd_target structure, where
- they indicate the set of flags used by that backend (not all flags
- are meaningful for all object file formats) (FIXME: at the moment,
- the object_flags values have mostly just been copied from backend
- to another, and are not necessarily correct). */
-
-#define BFD_NO_FLAGS 0x0
-
- /* BFD contains relocation entries. */
-#define HAS_RELOC 0x1
-
- /* BFD is directly executable. */
-#define EXEC_P 0x2
-
- /* BFD has line number information (basically used for F_LNNO in a
- COFF header). */
-#define HAS_LINENO 0x4
-
- /* BFD has debugging information. */
-#define HAS_DEBUG 0x08
-
- /* BFD has symbols. */
-#define HAS_SYMS 0x10
-
- /* BFD has local symbols (basically used for F_LSYMS in a COFF
- header). */
-#define HAS_LOCALS 0x20
-
- /* BFD is a dynamic object. */
-#define DYNAMIC 0x40
-
- /* Text section is write protected (if D_PAGED is not set, this is
- like an a.out NMAGIC file) (the linker sets this by default, but
- clears it for -r or -N). */
-#define WP_TEXT 0x80
-
- /* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the
- linker sets this by default, but clears it for -r or -n or -N). */
-#define D_PAGED 0x100
-
- /* BFD is relaxable (this means that bfd_relax_section may be able to
- do something) (sometimes bfd_relax_section can do something even if
- this is not set). */
-#define BFD_IS_RELAXABLE 0x200
-
- /* This may be set before writing out a BFD to request using a
- traditional format. For example, this is used to request that when
- writing out an a.out object the symbols not be hashed to eliminate
- duplicates. */
-#define BFD_TRADITIONAL_FORMAT 0x400
-
- /* This flag indicates that the BFD contents are actually cached
- in memory. If this is set, iostream points to a bfd_in_memory
- struct. */
-#define BFD_IN_MEMORY 0x800
-
- /* This BFD has been created by the linker and doesn't correspond
- to any input file. */
-#define BFD_LINKER_CREATED 0x1000
-
- /* This may be set before writing out a BFD to request that it
- be written using values for UIDs, GIDs, timestamps, etc. that
- will be consistent from run to run. */
-#define BFD_DETERMINISTIC_OUTPUT 0x2000
-
- /* Compress sections in this BFD. */
-#define BFD_COMPRESS 0x4000
-
- /* Decompress sections in this BFD. */
-#define BFD_DECOMPRESS 0x8000
-
- /* BFD is a dummy, for plugins. */
-#define BFD_PLUGIN 0x10000
-
- /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */
-#define BFD_COMPRESS_GABI 0x20000
-
- /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this
- BFD. */
-#define BFD_CONVERT_ELF_COMMON 0x40000
-
- /* Use the ELF STT_COMMON type in this BFD. */
-#define BFD_USE_ELF_STT_COMMON 0x80000
-
- /* Flags bits to be saved in bfd_preserve_save. */
-#define BFD_FLAGS_SAVED \
- (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
- | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \
- | BFD_USE_ELF_STT_COMMON)
-
- /* Flags bits which are for BFD use only. */
-#define BFD_FLAGS_FOR_BFD_USE_MASK \
- (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
- | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \
- | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON)
-
- /* Is the file descriptor being cached? That is, can it be closed as
- needed, and re-opened when accessed later? */
- unsigned int cacheable : 1;
-
- /* Marks whether there was a default target specified when the
- BFD was opened. This is used to select which matching algorithm
- to use to choose the back end. */
- unsigned int target_defaulted : 1;
-
- /* ... and here: (``once'' means at least once). */
- unsigned int opened_once : 1;
-
- /* Set if we have a locally maintained mtime value, rather than
- getting it from the file each time. */
- unsigned int mtime_set : 1;
-
- /* Flag set if symbols from this BFD should not be exported. */
- unsigned int no_export : 1;
-
- /* Remember when output has begun, to stop strange things
- from happening. */
- unsigned int output_has_begun : 1;
-
- /* Have archive map. */
- unsigned int has_armap : 1;
-
- /* Set if this is a thin archive. */
- unsigned int is_thin_archive : 1;
-
- /* Set if only required symbols should be added in the link hash table for
- this object. Used by VMS linkers. */
- unsigned int selective_search : 1;
-
- /* Set if this is the linker output BFD. */
- unsigned int is_linker_output : 1;
-
- /* Set if this is the linker input BFD. */
- unsigned int is_linker_input : 1;
-
- /* If this is an input for a compiler plug-in library. */
- ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2;
-
- /* Set if this is a plugin output file. */
- unsigned int lto_output : 1;
-
- /* Set to dummy BFD created when claimed by a compiler plug-in
- library. */
- bfd *plugin_dummy_bfd;
-
- /* Currently my_archive is tested before adding origin to
- anything. I believe that this can become always an add of
- origin, with origin set to 0 for non archive files. */
- ufile_ptr origin;
-
- /* The origin in the archive of the proxy entry. This will
- normally be the same as origin, except for thin archives,
- when it will contain the current offset of the proxy in the
- thin archive rather than the offset of the bfd in its actual
- container. */
- ufile_ptr proxy_origin;
-
- /* A hash table for section names. */
- struct bfd_hash_table section_htab;
-
- /* Pointer to linked list of sections. */
- struct bfd_section *sections;
-
- /* The last section on the section list. */
- struct bfd_section *section_last;
-
- /* The number of sections. */
- unsigned int section_count;
-
- /* A field used by _bfd_generic_link_add_archive_symbols. This will
- be used only for archive elements. */
- int archive_pass;
-
- /* Stuff only useful for object files:
- The start address. */
- bfd_vma start_address;
-
- /* Symbol table for output BFD (with symcount entries).
- Also used by the linker to cache input BFD symbols. */
- struct bfd_symbol **outsymbols;
-
- /* Used for input and output. */
- unsigned int symcount;
-
- /* Used for slurped dynamic symbol tables. */
- unsigned int dynsymcount;
-
- /* Pointer to structure which contains architecture information. */
- const struct bfd_arch_info *arch_info;
-
- /* Stuff only useful for archives. */
- void *arelt_data;
- struct bfd *my_archive; /* The containing archive BFD. */
- struct bfd *archive_next; /* The next BFD in the archive. */
- struct bfd *archive_head; /* The first BFD in the archive. */
- struct bfd *nested_archives; /* List of nested archive in a flattened
- thin archive. */
-
- union {
- /* For input BFDs, a chain of BFDs involved in a link. */
- struct bfd *next;
- /* For output BFD, the linker hash table. */
- struct bfd_link_hash_table *hash;
- } link;
-
- /* Used by the back end to hold private data. */
- union
- {
- struct aout_data_struct *aout_data;
- struct artdata *aout_ar_data;
- struct coff_tdata *coff_obj_data;
- struct pe_tdata *pe_obj_data;
- struct xcoff_tdata *xcoff_obj_data;
- struct ecoff_tdata *ecoff_obj_data;
- struct srec_data_struct *srec_data;
- struct verilog_data_struct *verilog_data;
- struct ihex_data_struct *ihex_data;
- struct tekhex_data_struct *tekhex_data;
- struct elf_obj_tdata *elf_obj_data;
- struct mmo_data_struct *mmo_data;
- struct sun_core_struct *sun_core_data;
- struct sco5_core_struct *sco5_core_data;
- struct trad_core_struct *trad_core_data;
- struct som_data_struct *som_data;
- struct hpux_core_struct *hpux_core_data;
- struct hppabsd_core_struct *hppabsd_core_data;
- struct sgi_core_struct *sgi_core_data;
- struct lynx_core_struct *lynx_core_data;
- struct osf_core_struct *osf_core_data;
- struct cisco_core_struct *cisco_core_data;
- struct versados_data_struct *versados_data;
- struct netbsd_core_struct *netbsd_core_data;
- struct mach_o_data_struct *mach_o_data;
- struct mach_o_fat_data_struct *mach_o_fat_data;
- struct plugin_data_struct *plugin_data;
- struct bfd_pef_data_struct *pef_data;
- struct bfd_pef_xlib_data_struct *pef_xlib_data;
- struct bfd_sym_data_struct *sym_data;
- void *any;
- }
- tdata;
-
- /* Used by the application to hold private data. */
- void *usrdata;
-
- /* Where all the allocated stuff under this BFD goes. This is a
- struct objalloc *, but we use void * to avoid requiring the inclusion
- of objalloc.h. */
- void *memory;
-
- /* For input BFDs, the build ID, if the object has one. */
- const struct bfd_build_id *build_id;
-};
-
-/* See note beside bfd_set_section_userdata. */
-static inline bfd_boolean
-bfd_set_cacheable (bfd * abfd, bfd_boolean val)
-{
- abfd->cacheable = val;
- return TRUE;
-}
-
-
-typedef enum bfd_error
-{
- bfd_error_no_error = 0,
- bfd_error_system_call,
- bfd_error_invalid_target,
- bfd_error_wrong_format,
- bfd_error_wrong_object_format,
- bfd_error_invalid_operation,
- bfd_error_no_memory,
- bfd_error_no_symbols,
- bfd_error_no_armap,
- bfd_error_no_more_archived_files,
- bfd_error_malformed_archive,
- bfd_error_missing_dso,
- bfd_error_file_not_recognized,
- bfd_error_file_ambiguously_recognized,
- bfd_error_no_contents,
- bfd_error_nonrepresentable_section,
- bfd_error_no_debug_section,
- bfd_error_bad_value,
- bfd_error_file_truncated,
- bfd_error_file_too_big,
- bfd_error_on_input,
- bfd_error_invalid_error_code
-}
-bfd_error_type;
-
-bfd_error_type bfd_get_error (void);
-
-void bfd_set_error (bfd_error_type error_tag);
-
-void bfd_set_input_error (bfd *input, bfd_error_type error_tag);
-
-const char *bfd_errmsg (bfd_error_type error_tag);
-
-void bfd_perror (const char *message);
-
-
-typedef void (*bfd_error_handler_type) (const char *, va_list);
-
-void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1;
-
-bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
-
-void bfd_set_error_program_name (const char *);
-
-
-typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg,
- const char *bfd_version,
- const char *bfd_file,
- int bfd_line);
-
-bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type);
-
-long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
-
-long bfd_canonicalize_reloc
- (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
-
-void bfd_set_reloc
- (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
-
-#define bfd_set_reloc(abfd, asect, location, count) \
- BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count))
-bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
-
-int bfd_get_arch_size (bfd *abfd);
-
-int bfd_get_sign_extend_vma (bfd *abfd);
-
-bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
-
-unsigned int bfd_get_gp_size (bfd *abfd);
-
-void bfd_set_gp_size (bfd *abfd, unsigned int i);
-
-bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
-
-bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
-
-#define bfd_copy_private_header_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_copy_private_header_data, \
- (ibfd, obfd))
-bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
-
-#define bfd_copy_private_bfd_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
- (ibfd, obfd))
-bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
-
-#define bfd_set_private_flags(abfd, flags) \
- BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
-#define bfd_sizeof_headers(abfd, info) \
- BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info))
-
-#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
- BFD_SEND (abfd, _bfd_find_nearest_line, \
- (abfd, syms, sec, off, file, func, line, NULL))
-
-#define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \
- line, disc) \
- BFD_SEND (abfd, _bfd_find_nearest_line, \
- (abfd, syms, sec, off, file, func, line, disc))
-
-#define bfd_find_line(abfd, syms, sym, file, line) \
- BFD_SEND (abfd, _bfd_find_line, \
- (abfd, syms, sym, file, line))
-
-#define bfd_find_inliner_info(abfd, file, func, line) \
- BFD_SEND (abfd, _bfd_find_inliner_info, \
- (abfd, file, func, line))
-
-#define bfd_debug_info_start(abfd) \
- BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
-
-#define bfd_debug_info_end(abfd) \
- BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
-
-#define bfd_debug_info_accumulate(abfd, section) \
- BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
-
-#define bfd_stat_arch_elt(abfd, stat) \
- BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
-
-#define bfd_update_armap_timestamp(abfd) \
- BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
-
-#define bfd_set_arch_mach(abfd, arch, mach)\
- BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
-
-#define bfd_relax_section(abfd, section, link_info, again) \
- BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
-
-#define bfd_gc_sections(abfd, link_info) \
- BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
-
-#define bfd_lookup_section_flags(link_info, flag_info, section) \
- BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info, section))
-
-#define bfd_merge_sections(abfd, link_info) \
- BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
-
-#define bfd_is_group_section(abfd, sec) \
- BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
-
-#define bfd_discard_group(abfd, sec) \
- BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
-
-#define bfd_link_hash_table_create(abfd) \
- BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
-
-#define bfd_link_add_symbols(abfd, info) \
- BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
-
-#define bfd_link_just_syms(abfd, sec, info) \
- BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
-
-#define bfd_final_link(abfd, info) \
- BFD_SEND (abfd, _bfd_final_link, (abfd, info))
-
-#define bfd_free_cached_info(abfd) \
- BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
-
-#define bfd_get_dynamic_symtab_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
-
-#define bfd_print_private_bfd_data(abfd, file)\
- BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
-
-#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
- BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
-
-#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
- BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
- dyncount, dynsyms, ret))
-
-#define bfd_get_dynamic_reloc_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
-
-#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
- BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
-
-extern bfd_byte *bfd_get_relocated_section_contents
- (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
- bfd_boolean, asymbol **);
-
-bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
-
-bfd_vma bfd_emul_get_maxpagesize (const char *);
-
-void bfd_emul_set_maxpagesize (const char *, bfd_vma);
-
-bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean);
-
-void bfd_emul_set_commonpagesize (const char *, bfd_vma);
-
-char *bfd_demangle (bfd *, const char *, int);
-
-void bfd_update_compression_header
- (bfd *abfd, bfd_byte *contents, asection *sec);
-
-bfd_boolean bfd_check_compression_header
- (bfd *abfd, bfd_byte *contents, asection *sec,
- bfd_size_type *uncompressed_size,
- unsigned int *uncompressed_alignment_power);
-
-int bfd_get_compression_header_size (bfd *abfd, asection *sec);
-
-bfd_size_type bfd_convert_section_size
- (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size);
-
-bfd_boolean bfd_convert_section_contents
- (bfd *ibfd, asection *isec, bfd *obfd,
- bfd_byte **ptr, bfd_size_type *ptr_size);
-
-/* Extracted from archive.c. */
-symindex bfd_get_next_mapent
- (bfd *abfd, symindex previous, carsym **sym);
-
-bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
-
-bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
-
-/* Extracted from corefile.c. */
-const char *bfd_core_file_failing_command (bfd *abfd);
-
-int bfd_core_file_failing_signal (bfd *abfd);
-
-int bfd_core_file_pid (bfd *abfd);
-
-bfd_boolean core_file_matches_executable_p
- (bfd *core_bfd, bfd *exec_bfd);
-
-bfd_boolean generic_core_file_matches_executable_p
- (bfd *core_bfd, bfd *exec_bfd);
-
-/* Extracted from targets.c. */
-#define BFD_SEND(bfd, message, arglist) \
- ((*((bfd)->xvec->message)) arglist)
-
-#ifdef DEBUG_BFD_SEND
-#undef BFD_SEND
-#define BFD_SEND(bfd, message, arglist) \
- (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
- ((*((bfd)->xvec->message)) arglist) : \
- (bfd_assert (__FILE__,__LINE__), NULL))
-#endif
-#define BFD_SEND_FMT(bfd, message, arglist) \
- (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
-
-#ifdef DEBUG_BFD_SEND
-#undef BFD_SEND_FMT
-#define BFD_SEND_FMT(bfd, message, arglist) \
- (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
- (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
- (bfd_assert (__FILE__,__LINE__), NULL))
-#endif
-
-enum bfd_flavour
-{
- /* N.B. Update bfd_flavour_name if you change this. */
- bfd_target_unknown_flavour,
- bfd_target_aout_flavour,
- bfd_target_coff_flavour,
- bfd_target_ecoff_flavour,
- bfd_target_xcoff_flavour,
- bfd_target_elf_flavour,
- bfd_target_tekhex_flavour,
- bfd_target_srec_flavour,
- bfd_target_verilog_flavour,
- bfd_target_ihex_flavour,
- bfd_target_som_flavour,
- bfd_target_os9k_flavour,
- bfd_target_versados_flavour,
- bfd_target_msdos_flavour,
- bfd_target_ovax_flavour,
- bfd_target_evax_flavour,
- bfd_target_mmo_flavour,
- bfd_target_mach_o_flavour,
- bfd_target_pef_flavour,
- bfd_target_pef_xlib_flavour,
- bfd_target_sym_flavour
-};
-
-enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
-
-/* Forward declaration. */
-typedef struct bfd_link_info _bfd_link_info;
-
-/* Forward declaration. */
-typedef struct flag_info flag_info;
-
-typedef struct bfd_target
-{
- /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */
- char *name;
-
- /* The "flavour" of a back end is a general indication about
- the contents of a file. */
- enum bfd_flavour flavour;
-
- /* The order of bytes within the data area of a file. */
- enum bfd_endian byteorder;
-
- /* The order of bytes within the header parts of a file. */
- enum bfd_endian header_byteorder;
-
- /* A mask of all the flags which an executable may have set -
- from the set <>, <>, ...<>. */
- flagword object_flags;
-
- /* A mask of all the flags which a section may have set - from
- the set <>, <>, ...<>. */
- flagword section_flags;
-
- /* The character normally found at the front of a symbol.
- (if any), perhaps `_'. */
- char symbol_leading_char;
-
- /* The pad character for file names within an archive header. */
- char ar_pad_char;
-
- /* The maximum number of characters in an archive header. */
- unsigned char ar_max_namelen;
-
- /* How well this target matches, used to select between various
- possible targets when more than one target matches. */
- unsigned char match_priority;
-
- /* Entries for byte swapping for data. These are different from the
- other entry points, since they don't take a BFD as the first argument.
- Certain other handlers could do the same. */
- bfd_uint64_t (*bfd_getx64) (const void *);
- bfd_int64_t (*bfd_getx_signed_64) (const void *);
- void (*bfd_putx64) (bfd_uint64_t, void *);
- bfd_vma (*bfd_getx32) (const void *);
- bfd_signed_vma (*bfd_getx_signed_32) (const void *);
- void (*bfd_putx32) (bfd_vma, void *);
- bfd_vma (*bfd_getx16) (const void *);
- bfd_signed_vma (*bfd_getx_signed_16) (const void *);
- void (*bfd_putx16) (bfd_vma, void *);
-
- /* Byte swapping for the headers. */
- bfd_uint64_t (*bfd_h_getx64) (const void *);
- bfd_int64_t (*bfd_h_getx_signed_64) (const void *);
- void (*bfd_h_putx64) (bfd_uint64_t, void *);
- bfd_vma (*bfd_h_getx32) (const void *);
- bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
- void (*bfd_h_putx32) (bfd_vma, void *);
- bfd_vma (*bfd_h_getx16) (const void *);
- bfd_signed_vma (*bfd_h_getx_signed_16) (const void *);
- void (*bfd_h_putx16) (bfd_vma, void *);
-
- /* Format dependent routines: these are vectors of entry points
- within the target vector structure, one for each format to check. */
-
- /* Check the format of a file being read. Return a <> or zero. */
- const struct bfd_target *
- (*_bfd_check_format[bfd_type_end]) (bfd *);
-
- /* Set the format of a file being written. */
- bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
-
- /* Write cached information into a file being written, at <>. */
- bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
-
-
- /* Generic entry points. */
-#define BFD_JUMP_TABLE_GENERIC(NAME) \
- NAME##_close_and_cleanup, \
- NAME##_bfd_free_cached_info, \
- NAME##_new_section_hook, \
- NAME##_get_section_contents, \
- NAME##_get_section_contents_in_window
-
- /* Called when the BFD is being closed to do any necessary cleanup. */
- bfd_boolean (*_close_and_cleanup) (bfd *);
- /* Ask the BFD to free all cached information. */
- bfd_boolean (*_bfd_free_cached_info) (bfd *);
- /* Called when a new section is created. */
- bfd_boolean (*_new_section_hook) (bfd *, sec_ptr);
- /* Read the contents of a section. */
- bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr,
- bfd_size_type);
- bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr,
- bfd_window *, file_ptr,
- bfd_size_type);
-
- /* Entry points to copy private data. */
-#define BFD_JUMP_TABLE_COPY(NAME) \
- NAME##_bfd_copy_private_bfd_data, \
- NAME##_bfd_merge_private_bfd_data, \
- _bfd_generic_init_private_section_data, \
- NAME##_bfd_copy_private_section_data, \
- NAME##_bfd_copy_private_symbol_data, \
- NAME##_bfd_copy_private_header_data, \
- NAME##_bfd_set_private_flags, \
- NAME##_bfd_print_private_bfd_data
-
- /* Called to copy BFD general private data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
- /* Called to merge BFD general private data from one object file
- to a common output file when linking. */
- bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *);
- /* Called to initialize BFD private section data from one object file
- to another. */
-#define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
- BFD_SEND (obfd, _bfd_init_private_section_data, \
- (ibfd, isec, obfd, osec, link_info))
- bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *,
- sec_ptr,
- struct bfd_link_info *);
- /* Called to copy BFD private section data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *,
- sec_ptr);
- /* Called to copy BFD private symbol data from one symbol
- to another. */
- bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *,
- asymbol *);
- /* Called to copy BFD private header data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *);
- /* Called to set private backend flags. */
- bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
-
- /* Called to print private BFD data. */
- bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *);
-
- /* Core file entry points. */
-#define BFD_JUMP_TABLE_CORE(NAME) \
- NAME##_core_file_failing_command, \
- NAME##_core_file_failing_signal, \
- NAME##_core_file_matches_executable_p, \
- NAME##_core_file_pid
-
- char * (*_core_file_failing_command) (bfd *);
- int (*_core_file_failing_signal) (bfd *);
- bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *);
- int (*_core_file_pid) (bfd *);
-
- /* Archive entry points. */
-#define BFD_JUMP_TABLE_ARCHIVE(NAME) \
- NAME##_slurp_armap, \
- NAME##_slurp_extended_name_table, \
- NAME##_construct_extended_name_table, \
- NAME##_truncate_arname, \
- NAME##_write_armap, \
- NAME##_read_ar_hdr, \
- NAME##_write_ar_hdr, \
- NAME##_openr_next_archived_file, \
- NAME##_get_elt_at_index, \
- NAME##_generic_stat_arch_elt, \
- NAME##_update_armap_timestamp
-
- bfd_boolean (*_bfd_slurp_armap) (bfd *);
- bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *);
- bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **,
- bfd_size_type *,
- const char **);
- void (*_bfd_truncate_arname) (bfd *, const char *, char *);
- bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *,
- unsigned int, int);
- void * (*_bfd_read_ar_hdr_fn) (bfd *);
- bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *);
- bfd * (*openr_next_archived_file) (bfd *, bfd *);
-#define bfd_get_elt_at_index(b,i) \
- BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
- bfd * (*_bfd_get_elt_at_index) (bfd *, symindex);
- int (*_bfd_stat_arch_elt) (bfd *, struct stat *);
- bfd_boolean (*_bfd_update_armap_timestamp) (bfd *);
-
- /* Entry points used for symbols. */
-#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
- NAME##_get_symtab_upper_bound, \
- NAME##_canonicalize_symtab, \
- NAME##_make_empty_symbol, \
- NAME##_print_symbol, \
- NAME##_get_symbol_info, \
- NAME##_get_symbol_version_string, \
- NAME##_bfd_is_local_label_name, \
- NAME##_bfd_is_target_special_symbol, \
- NAME##_get_lineno, \
- NAME##_find_nearest_line, \
- NAME##_find_line, \
- NAME##_find_inliner_info, \
- NAME##_bfd_make_debug_symbol, \
- NAME##_read_minisymbols, \
- NAME##_minisymbol_to_symbol
-
- long (*_bfd_get_symtab_upper_bound) (bfd *);
- long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **);
- struct bfd_symbol *
- (*_bfd_make_empty_symbol) (bfd *);
- void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *,
- bfd_print_symbol_type);
-#define bfd_print_symbol(b,p,s,e) \
- BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
- void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *,
- symbol_info *);
-#define bfd_get_symbol_info(b,p,e) \
- BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
- const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *,
- bfd_boolean *);
-#define bfd_get_symbol_version_string(b,s,h) \
- BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h))
- bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
- bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
- alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
- bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **,
- struct bfd_section *, bfd_vma,
- const char **, const char **,
- unsigned int *, unsigned int *);
- bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **,
- struct bfd_symbol *, const char **,
- unsigned int *);
- bfd_boolean (*_bfd_find_inliner_info)
- (bfd *, const char **, const char **, unsigned int *);
- /* Back-door to allow format-aware applications to create debug symbols
- while using BFD for everything else. Currently used by the assembler
- when creating COFF files. */
- asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size);
-#define bfd_read_minisymbols(b, d, m, s) \
- BFD_SEND (b, _read_minisymbols, (b, d, m, s))
- long (*_read_minisymbols) (bfd *, bfd_boolean, void **,
- unsigned int *);
-#define bfd_minisymbol_to_symbol(b, d, m, f) \
- BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
- asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *,
- asymbol *);
-
- /* Routines for relocs. */
-#define BFD_JUMP_TABLE_RELOCS(NAME) \
- NAME##_get_reloc_upper_bound, \
- NAME##_canonicalize_reloc, \
- NAME##_set_reloc, \
- NAME##_bfd_reloc_type_lookup, \
- NAME##_bfd_reloc_name_lookup
-
- long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
- long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **,
- struct bfd_symbol **);
- void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int);
- /* See documentation on reloc types. */
- reloc_howto_type *
- (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
- reloc_howto_type *
- (*reloc_name_lookup) (bfd *, const char *);
-
- /* Routines used when writing an object file. */
-#define BFD_JUMP_TABLE_WRITE(NAME) \
- NAME##_set_arch_mach, \
- NAME##_set_section_contents
-
- bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture,
- unsigned long);
- bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *,
- file_ptr, bfd_size_type);
-
- /* Routines used by the linker. */
-#define BFD_JUMP_TABLE_LINK(NAME) \
- NAME##_sizeof_headers, \
- NAME##_bfd_get_relocated_section_contents, \
- NAME##_bfd_relax_section, \
- NAME##_bfd_link_hash_table_create, \
- NAME##_bfd_link_add_symbols, \
- NAME##_bfd_link_just_syms, \
- NAME##_bfd_copy_link_hash_symbol_type, \
- NAME##_bfd_final_link, \
- NAME##_bfd_link_split_section, \
- NAME##_bfd_link_check_relocs, \
- NAME##_bfd_gc_sections, \
- NAME##_bfd_lookup_section_flags, \
- NAME##_bfd_merge_sections, \
- NAME##_bfd_is_group_section, \
- NAME##_bfd_discard_group, \
- NAME##_section_already_linked, \
- NAME##_bfd_define_common_symbol, \
- NAME##_bfd_link_hide_symbol, \
- NAME##_bfd_define_start_stop
-
- int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
- bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *,
- struct bfd_link_info *,
- struct bfd_link_order *,
- bfd_byte *, bfd_boolean,
- struct bfd_symbol **);
-
- bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *,
- struct bfd_link_info *, bfd_boolean *);
-
- /* Create a hash table for the linker. Different backends store
- different information in this table. */
- struct bfd_link_hash_table *
- (*_bfd_link_hash_table_create) (bfd *);
-
- /* Add symbols from this object file into the hash table. */
- bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
-
- /* Indicate that we are only retrieving symbol values from this section. */
- void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
-
- /* Copy the symbol type and other attributes for a linker script
- assignment of one symbol to another. */
-#define bfd_copy_link_hash_symbol_type(b, t, f) \
- BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f))
- void (*_bfd_copy_link_hash_symbol_type) (bfd *,
- struct bfd_link_hash_entry *,
- struct bfd_link_hash_entry *);
-
- /* Do a link based on the link_order structures attached to each
- section of the BFD. */
- bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
-
- /* Should this section be split up into smaller pieces during linking. */
- bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
-
- /* Check the relocations in the bfd for validity. */
- bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *);
-
- /* Remove sections that are not referenced from the output. */
- bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
-
- /* Sets the bitmask of allowed and disallowed section flags. */
- bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *,
- struct flag_info *, asection *);
-
- /* Attempt to merge SEC_MERGE sections. */
- bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
-
- /* Is this section a member of a group? */
- bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
-
- /* Discard members of a group. */
- bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
-
- /* Check if SEC has been already linked during a reloceatable or
- final link. */
- bfd_boolean (*_section_already_linked) (bfd *, asection *,
- struct bfd_link_info *);
-
- /* Define a common symbol. */
- bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *,
- struct bfd_link_hash_entry *);
-
- /* Hide a symbol. */
- void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *,
- struct bfd_link_hash_entry *);
-
- /* Define a __start, __stop, .startof. or .sizeof. symbol. */
- struct bfd_link_hash_entry *
- (*_bfd_define_start_stop) (struct bfd_link_info *, const char *,
- asection *);
-
- /* Routines to handle dynamic symbols and relocs. */
-#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
- NAME##_get_dynamic_symtab_upper_bound, \
- NAME##_canonicalize_dynamic_symtab, \
- NAME##_get_synthetic_symtab, \
- NAME##_get_dynamic_reloc_upper_bound, \
- NAME##_canonicalize_dynamic_reloc
-
- /* Get the amount of memory required to hold the dynamic symbols. */
- long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
- /* Read in the dynamic symbols. */
- long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **);
- /* Create synthetized symbols. */
- long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **,
- long, struct bfd_symbol **,
- struct bfd_symbol **);
- /* Get the amount of memory required to hold the dynamic relocs. */
- long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
- /* Read in the dynamic relocs. */
- long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **,
- struct bfd_symbol **);
-
- /* Opposite endian version of this target. */
- const struct bfd_target *alternative_target;
-
- /* Data for use by back-end routines, which isn't
- generic enough to belong in this structure. */
- const void *backend_data;
-
-} bfd_target;
-
-bfd_boolean bfd_set_default_target (const char *name);
-
-const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
-
-const bfd_target *bfd_get_target_info (const char *target_name,
- bfd *abfd,
- bfd_boolean *is_bigendian,
- int *underscoring,
- const char **def_target_arch);
-const char ** bfd_target_list (void);
-
-const bfd_target *bfd_iterate_over_targets
- (int (*func) (const bfd_target *, void *),
- void *data);
-
-const char *bfd_flavour_name (enum bfd_flavour flavour);
-
-/* Extracted from format.c. */
-bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
-
-bfd_boolean bfd_check_format_matches
- (bfd *abfd, bfd_format format, char ***matching);
-
-bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
-
-const char *bfd_format_string (bfd_format format);
-
-/* Extracted from linker.c. */
-/* Return TRUE if the symbol described by a linker hash entry H
- is going to be absolute. Linker-script defined symbols can be
- converted from absolute to section-relative ones late in the
- link. Use this macro to correctly determine whether the symbol
- will actually end up absolute in output. */
-#define bfd_is_abs_symbol(H) \
- (((H)->type == bfd_link_hash_defined \
- || (H)->type == bfd_link_hash_defweak) \
- && bfd_is_abs_section ((H)->u.def.section) \
- && !(H)->rel_from_abs)
-
-bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
-
-#define bfd_link_split_section(abfd, sec) \
- BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
-
-bfd_boolean bfd_section_already_linked (bfd *abfd,
- asection *sec,
- struct bfd_link_info *info);
-
-#define bfd_section_already_linked(abfd, sec, info) \
- BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
-
-bfd_boolean bfd_generic_define_common_symbol
- (bfd *output_bfd, struct bfd_link_info *info,
- struct bfd_link_hash_entry *h);
-
-#define bfd_define_common_symbol(output_bfd, info, h) \
- BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h))
-
-void _bfd_generic_link_hide_symbol
- (bfd *output_bfd, struct bfd_link_info *info,
- struct bfd_link_hash_entry *h);
-
-#define bfd_link_hide_symbol(output_bfd, info, h) \
- BFD_SEND (output_bfd, _bfd_link_hide_symbol, (output_bfd, info, h))
-
-struct bfd_link_hash_entry *bfd_generic_define_start_stop
- (struct bfd_link_info *info,
- const char *symbol, asection *sec);
-
-#define bfd_define_start_stop(output_bfd, info, symbol, sec) \
- BFD_SEND (output_bfd, _bfd_define_start_stop, (info, symbol, sec))
-
-struct bfd_elf_version_tree * bfd_find_version_for_sym
- (struct bfd_elf_version_tree *verdefs,
- const char *sym_name, bfd_boolean *hide);
-
-bfd_boolean bfd_hide_sym_by_version
- (struct bfd_elf_version_tree *verdefs, const char *sym_name);
-
-bfd_boolean bfd_link_check_relocs
- (bfd *abfd, struct bfd_link_info *info);
-
-bfd_boolean _bfd_generic_link_check_relocs
- (bfd *abfd, struct bfd_link_info *info);
-
-bfd_boolean bfd_merge_private_bfd_data
- (bfd *ibfd, struct bfd_link_info *info);
-
-#define bfd_merge_private_bfd_data(ibfd, info) \
- BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \
- (ibfd, info))
-/* Extracted from simple.c. */
-bfd_byte *bfd_simple_get_relocated_section_contents
- (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
-
-/* Extracted from compress.c. */
-bfd_boolean bfd_get_full_section_contents
- (bfd *abfd, asection *section, bfd_byte **ptr);
-
-void bfd_cache_section_contents
- (asection *sec, void *contents);
-
-bfd_boolean bfd_is_section_compressed_with_header
- (bfd *abfd, asection *section,
- int *compression_header_size_p,
- bfd_size_type *uncompressed_size_p,
- unsigned int *uncompressed_alignment_power_p);
-
-bfd_boolean bfd_is_section_compressed
- (bfd *abfd, asection *section);
-
-bfd_boolean bfd_init_section_decompress_status
- (bfd *abfd, asection *section);
-
-bfd_boolean bfd_init_section_compress_status
- (bfd *abfd, asection *section);
-
-bfd_boolean bfd_compress_section
- (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/bfdlink.h b/lib/libc/include/generic-musl/bfdlink.h
deleted file mode 100644
index d85544ba3aef591a169023bc25bee5d3ecb4d8f1..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/bfdlink.h
+++ /dev/null
@@ -1,958 +0,0 @@
-/* bfdlink.h -- header file for BFD link routines
- Copyright (C) 1993-2019 Free Software Foundation, Inc.
- Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
- MA 02110-1301, USA. */
-
-#ifndef BFDLINK_H
-#define BFDLINK_H
-
-/* Which symbols to strip during a link. */
-enum bfd_link_strip
-{
- strip_none, /* Don't strip any symbols. */
- strip_debugger, /* Strip debugging symbols. */
- strip_some, /* keep_hash is the list of symbols to keep. */
- strip_all /* Strip all symbols. */
-};
-
-/* Which local symbols to discard during a link. This is irrelevant
- if strip_all is used. */
-enum bfd_link_discard
-{
- discard_sec_merge, /* Discard local temporary symbols in SEC_MERGE
- sections. */
- discard_none, /* Don't discard any locals. */
- discard_l, /* Discard local temporary symbols. */
- discard_all /* Discard all locals. */
-};
-
-/* Whether to generate ELF common symbols with the STT_COMMON type
- during a relocatable link. */
-enum bfd_link_elf_stt_common
-{
- unchanged,
- elf_stt_common,
- no_elf_stt_common
-};
-
-/* Describes the type of hash table entry structure being used.
- Different hash table structure have different fields and so
- support different linking features. */
-enum bfd_link_hash_table_type
- {
- bfd_link_generic_hash_table,
- bfd_link_elf_hash_table
- };
-
-/* These are the possible types of an entry in the BFD link hash
- table. */
-
-enum bfd_link_hash_type
-{
- bfd_link_hash_new, /* Symbol is new. */
- bfd_link_hash_undefined, /* Symbol seen before, but undefined. */
- bfd_link_hash_undefweak, /* Symbol is weak and undefined. */
- bfd_link_hash_defined, /* Symbol is defined. */
- bfd_link_hash_defweak, /* Symbol is weak and defined. */
- bfd_link_hash_common, /* Symbol is common. */
- bfd_link_hash_indirect, /* Symbol is an indirect link. */
- bfd_link_hash_warning /* Like indirect, but warn if referenced. */
-};
-
-enum bfd_link_common_skip_ar_symbols
-{
- bfd_link_common_skip_none,
- bfd_link_common_skip_text,
- bfd_link_common_skip_data,
- bfd_link_common_skip_all
-};
-
-struct bfd_link_hash_common_entry
- {
- unsigned int alignment_power; /* Alignment. */
- asection *section; /* Symbol section. */
- };
-
-/* The linking routines use a hash table which uses this structure for
- its elements. */
-
-struct bfd_link_hash_entry
-{
- /* Base hash table entry structure. */
- struct bfd_hash_entry root;
-
- /* Type of this entry. */
- ENUM_BITFIELD (bfd_link_hash_type) type : 8;
-
- /* Symbol is referenced in a normal regular object file,
- as distinct from a LTO IR object file. */
- unsigned int non_ir_ref_regular : 1;
-
- /* Symbol is referenced in a normal dynamic object file,
- as distinct from a LTO IR object file. */
- unsigned int non_ir_ref_dynamic : 1;
-
- /* Symbol is a built-in define. These will be overridden by PROVIDE
- in a linker script. */
- unsigned int linker_def : 1;
-
- /* Symbol defined in a linker script. */
- unsigned int ldscript_def : 1;
-
- /* Symbol will be converted from absolute to section-relative. Set for
- symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
- outside of an output section statement. */
- unsigned int rel_from_abs : 1;
-
- /* A union of information depending upon the type. */
- union
- {
- /* Nothing is kept for bfd_hash_new. */
- /* bfd_link_hash_undefined, bfd_link_hash_undefweak. */
- struct
- {
- /* Undefined and common symbols are kept in a linked list through
- this field. This field is present in all of the union element
- so that we don't need to remove entries from the list when we
- change their type. Removing entries would either require the
- list to be doubly linked, which would waste more memory, or
- require a traversal. When an undefined or common symbol is
- created, it should be added to this list, the head of which is in
- the link hash table itself. As symbols are defined, they need
- not be removed from the list; anything which reads the list must
- doublecheck the symbol type.
-
- Weak symbols are not kept on this list.
-
- Defined and defweak symbols use this field as a reference marker.
- If the field is not NULL, or this structure is the tail of the
- undefined symbol list, the symbol has been referenced. If the
- symbol is undefined and becomes defined, this field will
- automatically be non-NULL since the symbol will have been on the
- undefined symbol list. */
- struct bfd_link_hash_entry *next;
- /* BFD symbol was found in. */
- bfd *abfd;
- } undef;
- /* bfd_link_hash_defined, bfd_link_hash_defweak. */
- struct
- {
- struct bfd_link_hash_entry *next;
- /* Symbol section. */
- asection *section;
- /* Symbol value. */
- bfd_vma value;
- } def;
- /* bfd_link_hash_indirect, bfd_link_hash_warning. */
- struct
- {
- struct bfd_link_hash_entry *next;
- /* Real symbol. */
- struct bfd_link_hash_entry *link;
- /* Warning message (bfd_link_hash_warning only). */
- const char *warning;
- } i;
- /* bfd_link_hash_common. */
- struct
- {
- struct bfd_link_hash_entry *next;
- /* The linker needs to know three things about common
- symbols: the size, the alignment, and the section in
- which the symbol should be placed. We store the size
- here, and we allocate a small structure to hold the
- section and the alignment. The alignment is stored as a
- power of two. We don't store all the information
- directly because we don't want to increase the size of
- the union; this structure is a major space user in the
- linker. */
- struct bfd_link_hash_common_entry *p;
- /* Common symbol size. */
- bfd_size_type size;
- } c;
- } u;
-};
-
-/* This is the link hash table. It is a derived class of
- bfd_hash_table. */
-
-struct bfd_link_hash_table
-{
- /* The hash table itself. */
- struct bfd_hash_table table;
- /* A linked list of undefined and common symbols, linked through the
- next field in the bfd_link_hash_entry structure. */
- struct bfd_link_hash_entry *undefs;
- /* Entries are added to the tail of the undefs list. */
- struct bfd_link_hash_entry *undefs_tail;
- /* Function to free the hash table on closing BFD. */
- void (*hash_table_free) (bfd *);
- /* The type of the link hash table. */
- enum bfd_link_hash_table_type type;
-};
-
-/* Look up an entry in a link hash table. If FOLLOW is TRUE, this
- follows bfd_link_hash_indirect and bfd_link_hash_warning links to
- the real symbol. */
-extern struct bfd_link_hash_entry *bfd_link_hash_lookup
- (struct bfd_link_hash_table *, const char *, bfd_boolean create,
- bfd_boolean copy, bfd_boolean follow);
-
-/* Look up an entry in the main linker hash table if the symbol might
- be wrapped. This should only be used for references to an
- undefined symbol, not for definitions of a symbol. */
-
-extern struct bfd_link_hash_entry *bfd_wrapped_link_hash_lookup
- (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
- bfd_boolean, bfd_boolean);
-
-/* If H is a wrapped symbol, ie. the symbol name starts with "__wrap_"
- and the remainder is found in wrap_hash, return the real symbol. */
-
-extern struct bfd_link_hash_entry *unwrap_hash_lookup
- (struct bfd_link_info *, bfd *, struct bfd_link_hash_entry *);
-
-/* Traverse a link hash table. */
-extern void bfd_link_hash_traverse
- (struct bfd_link_hash_table *,
- bfd_boolean (*) (struct bfd_link_hash_entry *, void *),
- void *);
-
-/* Add an entry to the undefs list. */
-extern void bfd_link_add_undef
- (struct bfd_link_hash_table *, struct bfd_link_hash_entry *);
-
-/* Remove symbols from the undefs list that don't belong there. */
-extern void bfd_link_repair_undef_list
- (struct bfd_link_hash_table *table);
-
-/* Read symbols and cache symbol pointer array in outsymbols. */
-extern bfd_boolean bfd_generic_link_read_symbols (bfd *);
-
-/* Check the relocs in the BFD. Called after all the input
- files have been loaded, and garbage collection has tagged
- any unneeded sections. */
-extern bfd_boolean bfd_link_check_relocs (bfd *,struct bfd_link_info *);
-
-struct bfd_sym_chain
-{
- struct bfd_sym_chain *next;
- const char *name;
-};
-
-/* How to handle unresolved symbols.
- There are four possibilities which are enumerated below: */
-enum report_method
-{
- /* This is the initial value when then link_info structure is created.
- It allows the various stages of the linker to determine whether they
- allowed to set the value. */
- RM_NOT_YET_SET = 0,
- RM_IGNORE,
- RM_GENERATE_WARNING,
- RM_GENERATE_ERROR
-};
-
-typedef enum {with_flags, without_flags} flag_type;
-
-/* A section flag list. */
-struct flag_info_list
-{
- flag_type with;
- const char *name;
- bfd_boolean valid;
- struct flag_info_list *next;
-};
-
-/* Section flag info. */
-struct flag_info
-{
- flagword only_with_flags;
- flagword not_with_flags;
- struct flag_info_list *flag_list;
- bfd_boolean flags_initialized;
-};
-
-struct bfd_elf_dynamic_list;
-struct bfd_elf_version_tree;
-
-/* Types of output. */
-
-enum output_type
-{
- type_pde,
- type_pie,
- type_relocatable,
- type_dll,
-};
-
-#define bfd_link_pde(info) ((info)->type == type_pde)
-#define bfd_link_dll(info) ((info)->type == type_dll)
-#define bfd_link_relocatable(info) ((info)->type == type_relocatable)
-#define bfd_link_pie(info) ((info)->type == type_pie)
-#define bfd_link_executable(info) (bfd_link_pde (info) || bfd_link_pie (info))
-#define bfd_link_pic(info) (bfd_link_dll (info) || bfd_link_pie (info))
-
-/* This structure holds all the information needed to communicate
- between BFD and the linker when doing a link. */
-
-struct bfd_link_info
-{
- /* Output type. */
- ENUM_BITFIELD (output_type) type : 2;
-
- /* TRUE if BFD should pre-bind symbols in a shared object. */
- unsigned int symbolic: 1;
-
- /* TRUE if executable should not contain copy relocs.
- Setting this true may result in a non-sharable text segment. */
- unsigned int nocopyreloc: 1;
-
- /* TRUE if BFD should export all symbols in the dynamic symbol table
- of an executable, rather than only those used. */
- unsigned int export_dynamic: 1;
-
- /* TRUE if a default symbol version should be created and used for
- exported symbols. */
- unsigned int create_default_symver: 1;
-
- /* TRUE if unreferenced sections should be removed. */
- unsigned int gc_sections: 1;
-
- /* TRUE if exported symbols should be kept during section gc. */
- unsigned int gc_keep_exported: 1;
-
- /* TRUE if every symbol should be reported back via the notice
- callback. */
- unsigned int notice_all: 1;
-
- /* TRUE if the LTO plugin is active. */
- unsigned int lto_plugin_active: 1;
-
- /* TRUE if global symbols in discarded sections should be stripped. */
- unsigned int strip_discarded: 1;
-
- /* TRUE if all data symbols should be dynamic. */
- unsigned int dynamic_data: 1;
-
- /* TRUE if section groups should be resolved. */
- unsigned int resolve_section_groups: 1;
-
- /* Which symbols to strip. */
- ENUM_BITFIELD (bfd_link_strip) strip : 2;
-
- /* Which local symbols to discard. */
- ENUM_BITFIELD (bfd_link_discard) discard : 2;
-
- /* Whether to generate ELF common symbols with the STT_COMMON type. */
- ENUM_BITFIELD (bfd_link_elf_stt_common) elf_stt_common : 2;
-
- /* Criteria for skipping symbols when determining
- whether to include an object from an archive. */
- ENUM_BITFIELD (bfd_link_common_skip_ar_symbols) common_skip_ar_symbols : 2;
-
- /* What to do with unresolved symbols in an object file.
- When producing executables the default is GENERATE_ERROR.
- When producing shared libraries the default is IGNORE. The
- assumption with shared libraries is that the reference will be
- resolved at load/execution time. */
- ENUM_BITFIELD (report_method) unresolved_syms_in_objects : 2;
-
- /* What to do with unresolved symbols in a shared library.
- The same defaults apply. */
- ENUM_BITFIELD (report_method) unresolved_syms_in_shared_libs : 2;
-
- /* TRUE if shared objects should be linked directly, not shared. */
- unsigned int static_link: 1;
-
- /* TRUE if symbols should be retained in memory, FALSE if they
- should be freed and reread. */
- unsigned int keep_memory: 1;
-
- /* TRUE if BFD should generate relocation information in the final
- executable. */
- unsigned int emitrelocations: 1;
-
- /* TRUE if PT_GNU_RELRO segment should be created. */
- unsigned int relro: 1;
-
- /* TRUE if separate code segment should be created. */
- unsigned int separate_code: 1;
-
- /* Nonzero if .eh_frame_hdr section and PT_GNU_EH_FRAME ELF segment
- should be created. 1 for DWARF2 tables, 2 for compact tables. */
- unsigned int eh_frame_hdr_type: 2;
-
- /* TRUE if we should warn when adding a DT_TEXTREL to a shared object. */
- unsigned int warn_shared_textrel: 1;
-
- /* TRUE if we should error when adding a DT_TEXTREL. */
- unsigned int error_textrel: 1;
-
- /* TRUE if .hash section should be created. */
- unsigned int emit_hash: 1;
-
- /* TRUE if .gnu.hash section should be created. */
- unsigned int emit_gnu_hash: 1;
-
- /* If TRUE reduce memory overheads, at the expense of speed. This will
- cause map file generation to use an O(N^2) algorithm and disable
- caching ELF symbol buffer. */
- unsigned int reduce_memory_overheads: 1;
-
- /* TRUE if the output file should be in a traditional format. This
- is equivalent to the setting of the BFD_TRADITIONAL_FORMAT flag
- on the output file, but may be checked when reading the input
- files. */
- unsigned int traditional_format: 1;
-
- /* TRUE if non-PLT relocs should be merged into one reloc section
- and sorted so that relocs against the same symbol come together. */
- unsigned int combreloc: 1;
-
- /* TRUE if a default symbol version should be created and used for
- imported symbols. */
- unsigned int default_imported_symver: 1;
-
- /* TRUE if the new ELF dynamic tags are enabled. */
- unsigned int new_dtags: 1;
-
- /* FALSE if .eh_frame unwind info should be generated for PLT and other
- linker created sections, TRUE if it should be omitted. */
- unsigned int no_ld_generated_unwind_info: 1;
-
- /* TRUE if BFD should generate a "task linked" object file,
- similar to relocatable but also with globals converted to
- statics. */
- unsigned int task_link: 1;
-
- /* TRUE if ok to have multiple definition. */
- unsigned int allow_multiple_definition: 1;
-
- /* TRUE if ok to have prohibit multiple definition of absolute symbols. */
- unsigned int prohibit_multiple_definition_absolute: 1;
-
- /* TRUE if ok to have version with no definition. */
- unsigned int allow_undefined_version: 1;
-
- /* TRUE if some symbols have to be dynamic, controlled by
- --dynamic-list command line options. */
- unsigned int dynamic: 1;
-
- /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W|PF_X
- flags. */
- unsigned int execstack: 1;
-
- /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W
- flags. */
- unsigned int noexecstack: 1;
-
- /* TRUE if we want to produced optimized output files. This might
- need much more time and therefore must be explicitly selected. */
- unsigned int optimize: 1;
-
- /* TRUE if user should be informed of removed unreferenced sections. */
- unsigned int print_gc_sections: 1;
-
- /* TRUE if we should warn alternate ELF machine code. */
- unsigned int warn_alternate_em: 1;
-
- /* TRUE if the linker script contained an explicit PHDRS command. */
- unsigned int user_phdrs: 1;
-
- /* TRUE if program headers ought to be loaded. */
- unsigned int load_phdrs: 1;
-
- /* TRUE if we should check relocations after all input files have
- been opened. */
- unsigned int check_relocs_after_open_input: 1;
-
- /* TRUE if BND prefix in PLT entries is always generated. */
- unsigned int bndplt: 1;
-
- /* TRUE if IBT-enabled PLT entries should be generated. */
- unsigned int ibtplt: 1;
-
- /* TRUE if GNU_PROPERTY_X86_FEATURE_1_IBT should be generated. */
- unsigned int ibt: 1;
-
- /* TRUE if GNU_PROPERTY_X86_FEATURE_1_SHSTK should be generated. */
- unsigned int shstk: 1;
-
- /* TRUE if generation of .interp/PT_INTERP should be suppressed. */
- unsigned int nointerp: 1;
-
- /* TRUE if we shouldn't check relocation overflow. */
- unsigned int no_reloc_overflow_check: 1;
-
- /* TRUE if generate a 1-byte NOP as suffix for x86 call instruction. */
- unsigned int call_nop_as_suffix : 1;
-
- /* TRUE if common symbols should be treated as undefined. */
- unsigned int inhibit_common_definition : 1;
-
- /* TRUE if "-Map map" is passed to linker. */
- unsigned int has_map_file : 1;
-
- /* The 1-byte NOP for x86 call instruction. */
- char call_nop_byte;
-
- /* Char that may appear as the first char of a symbol, but should be
- skipped (like symbol_leading_char) when looking up symbols in
- wrap_hash. Used by PowerPC Linux for 'dot' symbols. */
- char wrap_char;
-
- /* Separator between archive and filename in linker script filespecs. */
- char path_separator;
-
- /* Compress DWARF debug sections. */
- enum compressed_debug_section_type compress_debug;
-
- /* Default stack size. Zero means default (often zero itself), -1
- means explicitly zero-sized. */
- bfd_signed_vma stacksize;
-
- /* Enable or disable target specific optimizations.
-
- Not all targets have optimizations to enable.
-
- Normally these optimizations are disabled by default but some targets
- prefer to enable them by default. So this field is a tri-state variable.
- The values are:
-
- zero: Enable the optimizations (either from --relax being specified on
- the command line or the backend's before_allocation emulation function.
-
- positive: The user has requested that these optimizations be disabled.
- (Via the --no-relax command line option).
-
- negative: The optimizations are disabled. (Set when initializing the
- args_type structure in ldmain.c:main. */
- signed int disable_target_specific_optimizations;
-
- /* Function callbacks. */
- const struct bfd_link_callbacks *callbacks;
-
- /* Hash table handled by BFD. */
- struct bfd_link_hash_table *hash;
-
- /* Hash table of symbols to keep. This is NULL unless strip is
- strip_some. */
- struct bfd_hash_table *keep_hash;
-
- /* Hash table of symbols to report back via the notice callback. If
- this is NULL, and notice_all is FALSE, then no symbols are
- reported back. */
- struct bfd_hash_table *notice_hash;
-
- /* Hash table of symbols which are being wrapped (the --wrap linker
- option). If this is NULL, no symbols are being wrapped. */
- struct bfd_hash_table *wrap_hash;
-
- /* Hash table of symbols which may be left unresolved during
- a link. If this is NULL, no symbols can be left unresolved. */
- struct bfd_hash_table *ignore_hash;
-
- /* The output BFD. */
- bfd *output_bfd;
-
- /* The import library generated. */
- bfd *out_implib_bfd;
-
- /* The list of input BFD's involved in the link. These are chained
- together via the link.next field. */
- bfd *input_bfds;
- bfd **input_bfds_tail;
-
- /* If a symbol should be created for each input BFD, this is section
- where those symbols should be placed. It must be a section in
- the output BFD. It may be NULL, in which case no such symbols
- will be created. This is to support CREATE_OBJECT_SYMBOLS in the
- linker command language. */
- asection *create_object_symbols_section;
-
- /* List of global symbol names that are starting points for marking
- sections against garbage collection. */
- struct bfd_sym_chain *gc_sym_list;
-
- /* If a base output file is wanted, then this points to it */
- void *base_file;
-
- /* The function to call when the executable or shared object is
- loaded. */
- const char *init_function;
-
- /* The function to call when the executable or shared object is
- unloaded. */
- const char *fini_function;
-
- /* Number of relaxation passes. Usually only one relaxation pass
- is needed. But a backend can have as many relaxation passes as
- necessary. During bfd_relax_section call, it is set to the
- current pass, starting from 0. */
- int relax_pass;
-
- /* Number of relaxation trips. This number is incremented every
- time the relaxation pass is restarted due to a previous
- relaxation returning true in *AGAIN. */
- int relax_trip;
-
- /* > 0 to treat protected data defined in the shared library as
- reference external. 0 to treat it as internal. -1 to let
- backend to decide. */
- int extern_protected_data;
-
- /* 1 to make undefined weak symbols dynamic when building a dynamic
- object. 0 to resolve undefined weak symbols to zero. -1 to let
- the backend decide. */
- int dynamic_undefined_weak;
-
- /* Non-zero if auto-import thunks for DATA items in pei386 DLLs
- should be generated/linked against. Set to 1 if this feature
- is explicitly requested by the user, -1 if enabled by default. */
- int pei386_auto_import;
-
- /* Non-zero if runtime relocs for DATA items with non-zero addends
- in pei386 DLLs should be generated. Set to 1 if this feature
- is explicitly requested by the user, -1 if enabled by default. */
- int pei386_runtime_pseudo_reloc;
-
- /* How many spare .dynamic DT_NULL entries should be added? */
- unsigned int spare_dynamic_tags;
-
- /* May be used to set DT_FLAGS for ELF. */
- bfd_vma flags;
-
- /* May be used to set DT_FLAGS_1 for ELF. */
- bfd_vma flags_1;
-
- /* Start and end of RELRO region. */
- bfd_vma relro_start, relro_end;
-
- /* List of symbols should be dynamic. */
- struct bfd_elf_dynamic_list *dynamic_list;
-
- /* The version information. */
- struct bfd_elf_version_tree *version_info;
-};
-
-/* This structures holds a set of callback functions. These are called
- by the BFD linker routines. */
-
-struct bfd_link_callbacks
-{
- /* A function which is called when an object is added from an
- archive. ABFD is the archive element being added. NAME is the
- name of the symbol which caused the archive element to be pulled
- in. This function may set *SUBSBFD to point to an alternative
- BFD from which symbols should in fact be added in place of the
- original BFD's symbols. Returns TRUE if the object should be
- added, FALSE if it should be skipped. */
- bfd_boolean (*add_archive_element)
- (struct bfd_link_info *, bfd *abfd, const char *name, bfd **subsbfd);
- /* A function which is called when a symbol is found with multiple
- definitions. H is the symbol which is defined multiple times.
- NBFD is the new BFD, NSEC is the new section, and NVAL is the new
- value. NSEC may be bfd_com_section or bfd_ind_section. */
- void (*multiple_definition)
- (struct bfd_link_info *, struct bfd_link_hash_entry *h,
- bfd *nbfd, asection *nsec, bfd_vma nval);
- /* A function which is called when a common symbol is defined
- multiple times. H is the symbol appearing multiple times.
- NBFD is the BFD of the new symbol. NTYPE is the type of the new
- symbol, one of bfd_link_hash_defined, bfd_link_hash_common, or
- bfd_link_hash_indirect. If NTYPE is bfd_link_hash_common, NSIZE
- is the size of the new symbol. */
- void (*multiple_common)
- (struct bfd_link_info *, struct bfd_link_hash_entry *h,
- bfd *nbfd, enum bfd_link_hash_type ntype, bfd_vma nsize);
- /* A function which is called to add a symbol to a set. ENTRY is
- the link hash table entry for the set itself (e.g.,
- __CTOR_LIST__). RELOC is the relocation to use for an entry in
- the set when generating a relocatable file, and is also used to
- get the size of the entry when generating an executable file.
- ABFD, SEC and VALUE identify the value to add to the set. */
- void (*add_to_set)
- (struct bfd_link_info *, struct bfd_link_hash_entry *entry,
- bfd_reloc_code_real_type reloc, bfd *abfd, asection *sec, bfd_vma value);
- /* A function which is called when the name of a g++ constructor or
- destructor is found. This is only called by some object file
- formats. CONSTRUCTOR is TRUE for a constructor, FALSE for a
- destructor. This will use BFD_RELOC_CTOR when generating a
- relocatable file. NAME is the name of the symbol found. ABFD,
- SECTION and VALUE are the value of the symbol. */
- void (*constructor)
- (struct bfd_link_info *, bfd_boolean constructor, const char *name,
- bfd *abfd, asection *sec, bfd_vma value);
- /* A function which is called to issue a linker warning. For
- example, this is called when there is a reference to a warning
- symbol. WARNING is the warning to be issued. SYMBOL is the name
- of the symbol which triggered the warning; it may be NULL if
- there is none. ABFD, SECTION and ADDRESS identify the location
- which trigerred the warning; either ABFD or SECTION or both may
- be NULL if the location is not known. */
- void (*warning)
- (struct bfd_link_info *, const char *warning, const char *symbol,
- bfd *abfd, asection *section, bfd_vma address);
- /* A function which is called when a relocation is attempted against
- an undefined symbol. NAME is the symbol which is undefined.
- ABFD, SECTION and ADDRESS identify the location from which the
- reference is made. IS_FATAL indicates whether an undefined symbol is
- a fatal error or not. In some cases SECTION may be NULL. */
- void (*undefined_symbol)
- (struct bfd_link_info *, const char *name, bfd *abfd,
- asection *section, bfd_vma address, bfd_boolean is_fatal);
- /* A function which is called when a reloc overflow occurs. ENTRY is
- the link hash table entry for the symbol the reloc is against.
- NAME is the name of the local symbol or section the reloc is
- against, RELOC_NAME is the name of the relocation, and ADDEND is
- any addend that is used. ABFD, SECTION and ADDRESS identify the
- location at which the overflow occurs; if this is the result of a
- bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
- ABFD will be NULL. */
- void (*reloc_overflow)
- (struct bfd_link_info *, struct bfd_link_hash_entry *entry,
- const char *name, const char *reloc_name, bfd_vma addend,
- bfd *abfd, asection *section, bfd_vma address);
- /* A function which is called when a dangerous reloc is performed.
- MESSAGE is an appropriate message.
- ABFD, SECTION and ADDRESS identify the location at which the
- problem occurred; if this is the result of a
- bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
- ABFD will be NULL. */
- void (*reloc_dangerous)
- (struct bfd_link_info *, const char *message,
- bfd *abfd, asection *section, bfd_vma address);
- /* A function which is called when a reloc is found to be attached
- to a symbol which is not being written out. NAME is the name of
- the symbol. ABFD, SECTION and ADDRESS identify the location of
- the reloc; if this is the result of a
- bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
- ABFD will be NULL. */
- void (*unattached_reloc)
- (struct bfd_link_info *, const char *name,
- bfd *abfd, asection *section, bfd_vma address);
- /* A function which is called when a symbol in notice_hash is
- defined or referenced. H is the symbol, INH the indirect symbol
- if applicable. ABFD, SECTION and ADDRESS are the (new) value of
- the symbol. If SECTION is bfd_und_section, this is a reference.
- FLAGS are the symbol BSF_* flags. */
- bfd_boolean (*notice)
- (struct bfd_link_info *, struct bfd_link_hash_entry *h,
- struct bfd_link_hash_entry *inh,
- bfd *abfd, asection *section, bfd_vma address, flagword flags);
- /* Error or warning link info message. */
- void (*einfo)
- (const char *fmt, ...);
- /* General link info message. */
- void (*info)
- (const char *fmt, ...);
- /* Message to be printed in linker map file. */
- void (*minfo)
- (const char *fmt, ...);
- /* This callback provides a chance for users of the BFD library to
- override its decision about whether to place two adjacent sections
- into the same segment. */
- bfd_boolean (*override_segment_assignment)
- (struct bfd_link_info *, bfd * abfd,
- asection * current_section, asection * previous_section,
- bfd_boolean new_segment);
-};
-
-/* The linker builds link_order structures which tell the code how to
- include input data in the output file. */
-
-/* These are the types of link_order structures. */
-
-enum bfd_link_order_type
-{
- bfd_undefined_link_order, /* Undefined. */
- bfd_indirect_link_order, /* Built from a section. */
- bfd_data_link_order, /* Set to explicit data. */
- bfd_section_reloc_link_order, /* Relocate against a section. */
- bfd_symbol_reloc_link_order /* Relocate against a symbol. */
-};
-
-/* This is the link_order structure itself. These form a chain
- attached to the output section whose contents they are describing. */
-
-struct bfd_link_order
-{
- /* Next link_order in chain. */
- struct bfd_link_order *next;
- /* Type of link_order. */
- enum bfd_link_order_type type;
- /* Offset within output section. */
- bfd_vma offset;
- /* Size within output section. */
- bfd_size_type size;
- /* Type specific information. */
- union
- {
- struct
- {
- /* Section to include. If this is used, then
- section->output_section must be the section the
- link_order is attached to, section->output_offset must
- equal the link_order offset field, and section->size
- must equal the link_order size field. Maybe these
- restrictions should be relaxed someday. */
- asection *section;
- } indirect;
- struct
- {
- /* Size of contents, or zero when contents should be filled by
- the architecture-dependent fill function.
- A non-zero value allows filling of the output section
- with an arbitrary repeated pattern. */
- unsigned int size;
- /* Data to put into file. */
- bfd_byte *contents;
- } data;
- struct
- {
- /* Description of reloc to generate. Used for
- bfd_section_reloc_link_order and
- bfd_symbol_reloc_link_order. */
- struct bfd_link_order_reloc *p;
- } reloc;
- } u;
-};
-
-/* A linker order of type bfd_section_reloc_link_order or
- bfd_symbol_reloc_link_order means to create a reloc against a
- section or symbol, respectively. This is used to implement -Ur to
- generate relocs for the constructor tables. The
- bfd_link_order_reloc structure describes the reloc that BFD should
- create. It is similar to a arelent, but I didn't use arelent
- because the linker does not know anything about most symbols, and
- any asymbol structure it creates will be partially meaningless.
- This information could logically be in the bfd_link_order struct,
- but I didn't want to waste the space since these types of relocs
- are relatively rare. */
-
-struct bfd_link_order_reloc
-{
- /* Reloc type. */
- bfd_reloc_code_real_type reloc;
-
- union
- {
- /* For type bfd_section_reloc_link_order, this is the section
- the reloc should be against. This must be a section in the
- output BFD, not any of the input BFDs. */
- asection *section;
- /* For type bfd_symbol_reloc_link_order, this is the name of the
- symbol the reloc should be against. */
- const char *name;
- } u;
-
- /* Addend to use. The object file should contain zero. The BFD
- backend is responsible for filling in the contents of the object
- file correctly. For some object file formats (e.g., COFF) the
- addend must be stored into in the object file, and for some
- (e.g., SPARC a.out) it is kept in the reloc. */
- bfd_vma addend;
-};
-
-/* Allocate a new link_order for a section. */
-extern struct bfd_link_order *bfd_new_link_order (bfd *, asection *);
-
-/* These structures are used to describe version information for the
- ELF linker. These structures could be manipulated entirely inside
- BFD, but it would be a pain. Instead, the regular linker sets up
- these structures, and then passes them into BFD. */
-
-/* Glob pattern for a version. */
-
-struct bfd_elf_version_expr
-{
- /* Next glob pattern for this version. */
- struct bfd_elf_version_expr *next;
- /* Glob pattern. */
- const char *pattern;
- /* Set if pattern is not a glob. */
- unsigned int literal : 1;
- /* Defined by ".symver". */
- unsigned int symver : 1;
- /* Defined by version script. */
- unsigned int script : 1;
- /* Pattern type. */
-#define BFD_ELF_VERSION_C_TYPE 1
-#define BFD_ELF_VERSION_CXX_TYPE 2
-#define BFD_ELF_VERSION_JAVA_TYPE 4
- unsigned int mask : 3;
-};
-
-struct bfd_elf_version_expr_head
-{
- /* List of all patterns, both wildcards and non-wildcards. */
- struct bfd_elf_version_expr *list;
- /* Hash table for non-wildcards. */
- void *htab;
- /* Remaining patterns. */
- struct bfd_elf_version_expr *remaining;
- /* What kind of pattern types are present in list (bitmask). */
- unsigned int mask;
-};
-
-/* Version dependencies. */
-
-struct bfd_elf_version_deps
-{
- /* Next dependency for this version. */
- struct bfd_elf_version_deps *next;
- /* The version which this version depends upon. */
- struct bfd_elf_version_tree *version_needed;
-};
-
-/* A node in the version tree. */
-
-struct bfd_elf_version_tree
-{
- /* Next version. */
- struct bfd_elf_version_tree *next;
- /* Name of this version. */
- const char *name;
- /* Version number. */
- unsigned int vernum;
- /* Regular expressions for global symbols in this version. */
- struct bfd_elf_version_expr_head globals;
- /* Regular expressions for local symbols in this version. */
- struct bfd_elf_version_expr_head locals;
- /* List of versions which this version depends upon. */
- struct bfd_elf_version_deps *deps;
- /* Index of the version name. This is used within BFD. */
- unsigned int name_indx;
- /* Whether this version tree was used. This is used within BFD. */
- int used;
- /* Matching hook. */
- struct bfd_elf_version_expr *(*match)
- (struct bfd_elf_version_expr_head *head,
- struct bfd_elf_version_expr *prev, const char *sym);
-};
-
-struct bfd_elf_dynamic_list
-{
- struct bfd_elf_version_expr_head head;
- struct bfd_elf_version_expr *(*match)
- (struct bfd_elf_version_expr_head *head,
- struct bfd_elf_version_expr *prev, const char *sym);
-};
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/bits/alltypes.h b/lib/libc/include/generic-musl/bits/alltypes.h
index 67fea001a3634295f2e969b2e288a36c64769084..0ee3cb4646b6f5fc31e73dfa3f84c425615eeb81 100644
--- a/lib/libc/include/generic-musl/bits/alltypes.h
+++ b/lib/libc/include/generic-musl/bits/alltypes.h
@@ -1,6 +1,6 @@
-#define _Addr int
-#define _Int64 long long
-#define _Reg int
+#define _Addr long
+#define _Int64 long
+#define _Reg long
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
typedef __builtin_va_list va_list;
@@ -20,6 +20,22 @@ typedef unsigned wchar_t;
#endif
#endif
+#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
+typedef unsigned wint_t;
+#define __DEFINED_wint_t
+#endif
+
+
+#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
+typedef int blksize_t;
+#define __DEFINED_blksize_t
+#endif
+
+#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
+typedef unsigned int nlink_t;
+#define __DEFINED_nlink_t
+#endif
+
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
typedef float float_t;
@@ -50,37 +66,37 @@ typedef long suseconds_t;
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
-typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
+typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
-typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
+typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
-typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
+typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
#define __DEFINED_mtx_t
#endif
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
-typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
+typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
-typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
+typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
#define __DEFINED_cnd_t
#endif
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
-typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
+typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
-typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
+typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
@@ -339,6 +355,11 @@ typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t;
#endif
+#if defined(__NEED_struct__IO_FILE) && !defined(__DEFINED_struct__IO_FILE)
+struct _IO_FILE { char __x; };
+#define __DEFINED_struct__IO_FILE
+#endif
+
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
diff --git a/lib/libc/include/generic-musl/bits/endian.h b/lib/libc/include/generic-musl/bits/endian.h
index e4d86deb111d15b2e331e364e12649ec8155d03b..b1a7affbbb6f6a0f504b5ef4b4b2022d90636159 100644
--- a/lib/libc/include/generic-musl/bits/endian.h
+++ b/lib/libc/include/generic-musl/bits/endian.h
@@ -1,5 +1 @@
-#if __ARMEB__
-#define __BYTE_ORDER __BIG_ENDIAN
-#else
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#endif
\ No newline at end of file
+#define __BYTE_ORDER __LITTLE_ENDIAN
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/bits/fcntl.h b/lib/libc/include/generic-musl/bits/fcntl.h
deleted file mode 100644
index e209ece38a2b94c9ee9198a6fb852210e71aac0f..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/bits/fcntl.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#define O_CREAT 0100
-#define O_EXCL 0200
-#define O_NOCTTY 0400
-#define O_TRUNC 01000
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
-#define O_DSYNC 010000
-#define O_SYNC 04010000
-#define O_RSYNC 04010000
-#define O_DIRECTORY 040000
-#define O_NOFOLLOW 0100000
-#define O_CLOEXEC 02000000
-
-#define O_ASYNC 020000
-#define O_DIRECT 0200000
-#define O_LARGEFILE 0400000
-#define O_NOATIME 01000000
-#define O_PATH 010000000
-#define O_TMPFILE 020040000
-#define O_NDELAY O_NONBLOCK
-
-#define F_DUPFD 0
-#define F_GETFD 1
-#define F_SETFD 2
-#define F_GETFL 3
-#define F_SETFL 4
-#define F_GETLK 5
-#define F_SETLK 6
-#define F_SETLKW 7
-#define F_SETOWN 8
-#define F_GETOWN 9
-#define F_SETSIG 10
-#define F_GETSIG 11
-
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-
-#define F_GETOWNER_UIDS 17
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/bits/fenv.h b/lib/libc/include/generic-musl/bits/fenv.h
deleted file mode 100644
index 54d7b35962e871058df1e47c3f8fe8a14f0b2038..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/bits/fenv.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef __ARM_PCS_VFP
-#define FE_ALL_EXCEPT 0
-#define FE_TONEAREST 0
-#else
-#define FE_INVALID 1
-#define FE_DIVBYZERO 2
-#define FE_OVERFLOW 4
-#define FE_UNDERFLOW 8
-#define FE_INEXACT 16
-#define FE_ALL_EXCEPT 31
-#define FE_TONEAREST 0
-#define FE_DOWNWARD 0x800000
-#define FE_UPWARD 0x400000
-#define FE_TOWARDZERO 0xc00000
-#endif
-
-typedef unsigned long fexcept_t;
-
-typedef struct {
- unsigned long __cw;
-} fenv_t;
-
-#define FE_DFL_ENV ((const fenv_t *) -1)
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/bits/ioctl.h b/lib/libc/include/generic-musl/bits/ioctl.h
index 03c7cc1c643d0648bf7db9061cf84386675778a4..3af94ce07ac75dc9d36e5c729ee7d325c21a3ab4 100644
--- a/lib/libc/include/generic-musl/bits/ioctl.h
+++ b/lib/libc/include/generic-musl/bits/ioctl.h
@@ -64,6 +64,8 @@
#define TIOCGPTLCK 0x80045439
#define TIOCGEXCL 0x80045440
#define TIOCGPTPEER 0x5441
+#define TIOCGISO7816 0x80285442
+#define TIOCSISO7816 0xc0285443
#define FIONCLEX 0x5450
#define FIOCLEX 0x5451
@@ -82,24 +84,6 @@
#define TIOCGICOUNT 0x545D
#define FIOQSIZE 0x5460
-#define TIOCPKT_DATA 0
-#define TIOCPKT_FLUSHREAD 1
-#define TIOCPKT_FLUSHWRITE 2
-#define TIOCPKT_STOP 4
-#define TIOCPKT_START 8
-#define TIOCPKT_NOSTOP 16
-#define TIOCPKT_DOSTOP 32
-#define TIOCPKT_IOCTL 64
-
-#define TIOCSER_TEMT 0x01
-
-struct winsize {
- unsigned short ws_row;
- unsigned short ws_col;
- unsigned short ws_xpixel;
- unsigned short ws_ypixel;
-};
-
#define TIOCM_LE 0x001
#define TIOCM_DTR 0x002
#define TIOCM_RTS 0x004
@@ -115,23 +99,6 @@ struct winsize {
#define TIOCM_OUT2 0x4000
#define TIOCM_LOOP 0x8000
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6
-#define N_6PACK 7
-#define N_MASC 8
-#define N_R3964 9
-#define N_PROFIBUS_FDL 10
-#define N_IRDA 11
-#define N_SMSBLOCK 12
-#define N_HDLC 13
-#define N_SYNC_PPP 14
-#define N_HCI 15
-
#define FIOSETOWN 0x8901
#define SIOCSPGRP 0x8902
#define FIOGETOWN 0x8903
@@ -140,67 +107,4 @@ struct winsize {
#define SIOCGSTAMP 0x8906
#define SIOCGSTAMPNS 0x8907
-#define SIOCADDRT 0x890B
-#define SIOCDELRT 0x890C
-#define SIOCRTMSG 0x890D
-
-#define SIOCGIFNAME 0x8910
-#define SIOCSIFLINK 0x8911
-#define SIOCGIFCONF 0x8912
-#define SIOCGIFFLAGS 0x8913
-#define SIOCSIFFLAGS 0x8914
-#define SIOCGIFADDR 0x8915
-#define SIOCSIFADDR 0x8916
-#define SIOCGIFDSTADDR 0x8917
-#define SIOCSIFDSTADDR 0x8918
-#define SIOCGIFBRDADDR 0x8919
-#define SIOCSIFBRDADDR 0x891a
-#define SIOCGIFNETMASK 0x891b
-#define SIOCSIFNETMASK 0x891c
-#define SIOCGIFMETRIC 0x891d
-#define SIOCSIFMETRIC 0x891e
-#define SIOCGIFMEM 0x891f
-#define SIOCSIFMEM 0x8920
-#define SIOCGIFMTU 0x8921
-#define SIOCSIFMTU 0x8922
-#define SIOCSIFNAME 0x8923
-#define SIOCSIFHWADDR 0x8924
-#define SIOCGIFENCAP 0x8925
-#define SIOCSIFENCAP 0x8926
-#define SIOCGIFHWADDR 0x8927
-#define SIOCGIFSLAVE 0x8929
-#define SIOCSIFSLAVE 0x8930
-#define SIOCADDMULTI 0x8931
-#define SIOCDELMULTI 0x8932
-#define SIOCGIFINDEX 0x8933
-#define SIOGIFINDEX SIOCGIFINDEX
-#define SIOCSIFPFLAGS 0x8934
-#define SIOCGIFPFLAGS 0x8935
-#define SIOCDIFADDR 0x8936
-#define SIOCSIFHWBROADCAST 0x8937
-#define SIOCGIFCOUNT 0x8938
-
-#define SIOCGIFBR 0x8940
-#define SIOCSIFBR 0x8941
-
-#define SIOCGIFTXQLEN 0x8942
-#define SIOCSIFTXQLEN 0x8943
-
-#define SIOCDARP 0x8953
-#define SIOCGARP 0x8954
-#define SIOCSARP 0x8955
-
-#define SIOCDRARP 0x8960
-#define SIOCGRARP 0x8961
-#define SIOCSRARP 0x8962
-
-#define SIOCGIFMAP 0x8970
-#define SIOCSIFMAP 0x8971
-
-#define SIOCADDDLCI 0x8980
-#define SIOCDELDLCI 0x8981
-
-#define SIOCDEVPRIVATE 0x89F0
-#define SIOCPROTOPRIVATE 0x89E0
-
#include
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/bits/setjmp.h b/lib/libc/include/generic-musl/bits/setjmp.h
deleted file mode 100644
index 2d8f0ef3dcc7587f133de9ed73a25a742e6b6036..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/bits/setjmp.h
+++ /dev/null
@@ -1 +0,0 @@
-typedef unsigned long long __jmp_buf[32];
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/bits/signal.h b/lib/libc/include/generic-musl/bits/signal.h
deleted file mode 100644
index 1c6a679ed42a73bc3a9f5fe00d6c7e78361952f4..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/bits/signal.h
+++ /dev/null
@@ -1,86 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 2048
-#define SIGSTKSZ 8192
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-typedef int greg_t, gregset_t[18];
-typedef struct sigcontext {
- unsigned long trap_no, error_code, oldmask;
- unsigned long arm_r0, arm_r1, arm_r2, arm_r3;
- unsigned long arm_r4, arm_r5, arm_r6, arm_r7;
- unsigned long arm_r8, arm_r9, arm_r10, arm_fp;
- unsigned long arm_ip, arm_sp, arm_lr, arm_pc;
- unsigned long arm_cpsr, fault_address;
-} mcontext_t;
-#else
-typedef struct {
- unsigned long __regs[21];
-} mcontext_t;
-#endif
-
-struct sigaltstack {
- void *ss_sp;
- int ss_flags;
- size_t ss_size;
-};
-
-typedef struct __ucontext {
- unsigned long uc_flags;
- struct __ucontext *uc_link;
- stack_t uc_stack;
- mcontext_t uc_mcontext;
- sigset_t uc_sigmask;
- unsigned long long uc_regspace[64];
-} ucontext_t;
-
-#define SA_NOCLDSTOP 1
-#define SA_NOCLDWAIT 2
-#define SA_SIGINFO 4
-#define SA_ONSTACK 0x08000000
-#define SA_RESTART 0x10000000
-#define SA_NODEFER 0x40000000
-#define SA_RESETHAND 0x80000000
-#define SA_RESTORER 0x04000000
-
-#endif
-
-#define SIGHUP 1
-#define SIGINT 2
-#define SIGQUIT 3
-#define SIGILL 4
-#define SIGTRAP 5
-#define SIGABRT 6
-#define SIGIOT SIGABRT
-#define SIGBUS 7
-#define SIGFPE 8
-#define SIGKILL 9
-#define SIGUSR1 10
-#define SIGSEGV 11
-#define SIGUSR2 12
-#define SIGPIPE 13
-#define SIGALRM 14
-#define SIGTERM 15
-#define SIGSTKFLT 16
-#define SIGCHLD 17
-#define SIGCONT 18
-#define SIGSTOP 19
-#define SIGTSTP 20
-#define SIGTTIN 21
-#define SIGTTOU 22
-#define SIGURG 23
-#define SIGXCPU 24
-#define SIGXFSZ 25
-#define SIGVTALRM 26
-#define SIGPROF 27
-#define SIGWINCH 28
-#define SIGIO 29
-#define SIGPOLL 29
-#define SIGPWR 30
-#define SIGSYS 31
-#define SIGUNUSED SIGSYS
-
-#define _NSIG 65
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/bits/syscall.h b/lib/libc/include/generic-musl/bits/syscall.h
index 9f246110c265147da029b1e3b3e73170470e6a4f..f1df93f0b60830cc274059d45a85233a45d34302 100644
--- a/lib/libc/include/generic-musl/bits/syscall.h
+++ b/lib/libc/include/generic-musl/bits/syscall.h
@@ -1,720 +1,567 @@
-#define __NR_restart_syscall 0
-#define __NR_exit 1
-#define __NR_fork 2
-#define __NR_read 3
-#define __NR_write 4
-#define __NR_open 5
-#define __NR_close 6
-#define __NR_creat 8
-#define __NR_link 9
-#define __NR_unlink 10
-#define __NR_execve 11
-#define __NR_chdir 12
-#define __NR_mknod 14
-#define __NR_chmod 15
-#define __NR_lchown 16
-#define __NR_lseek 19
-#define __NR_getpid 20
-#define __NR_mount 21
-#define __NR_setuid 23
-#define __NR_getuid 24
-#define __NR_ptrace 26
-#define __NR_pause 29
-#define __NR_access 33
-#define __NR_nice 34
-#define __NR_sync 36
-#define __NR_kill 37
-#define __NR_rename 38
-#define __NR_mkdir 39
-#define __NR_rmdir 40
-#define __NR_dup 41
-#define __NR_pipe 42
-#define __NR_times 43
-#define __NR_brk 45
-#define __NR_setgid 46
-#define __NR_getgid 47
-#define __NR_geteuid 49
-#define __NR_getegid 50
-#define __NR_acct 51
-#define __NR_umount2 52
-#define __NR_ioctl 54
-#define __NR_fcntl 55
-#define __NR_setpgid 57
-#define __NR_umask 60
-#define __NR_chroot 61
-#define __NR_ustat 62
-#define __NR_dup2 63
-#define __NR_getppid 64
-#define __NR_getpgrp 65
-#define __NR_setsid 66
-#define __NR_sigaction 67
-#define __NR_setreuid 70
-#define __NR_setregid 71
-#define __NR_sigsuspend 72
-#define __NR_sigpending 73
-#define __NR_sethostname 74
-#define __NR_setrlimit 75
-#define __NR_getrusage 77
-#define __NR_gettimeofday 78
-#define __NR_settimeofday 79
-#define __NR_getgroups 80
-#define __NR_setgroups 81
-#define __NR_symlink 83
-#define __NR_readlink 85
-#define __NR_uselib 86
-#define __NR_swapon 87
-#define __NR_reboot 88
-#define __NR_munmap 91
-#define __NR_truncate 92
-#define __NR_ftruncate 93
-#define __NR_fchmod 94
-#define __NR_fchown 95
-#define __NR_getpriority 96
-#define __NR_setpriority 97
-#define __NR_statfs 99
-#define __NR_fstatfs 100
-#define __NR_syslog 103
-#define __NR_setitimer 104
-#define __NR_getitimer 105
-#define __NR_stat 106
-#define __NR_lstat 107
-#define __NR_fstat 108
-#define __NR_vhangup 111
-#define __NR_wait4 114
-#define __NR_swapoff 115
-#define __NR_sysinfo 116
-#define __NR_fsync 118
-#define __NR_sigreturn 119
-#define __NR_clone 120
-#define __NR_setdomainname 121
-#define __NR_uname 122
-#define __NR_adjtimex 124
-#define __NR_mprotect 125
-#define __NR_sigprocmask 126
-#define __NR_init_module 128
-#define __NR_delete_module 129
-#define __NR_quotactl 131
-#define __NR_getpgid 132
-#define __NR_fchdir 133
-#define __NR_bdflush 134
-#define __NR_sysfs 135
-#define __NR_personality 136
-#define __NR_setfsuid 138
-#define __NR_setfsgid 139
-#define __NR__llseek 140
-#define __NR_getdents 141
-#define __NR__newselect 142
-#define __NR_flock 143
-#define __NR_msync 144
-#define __NR_readv 145
-#define __NR_writev 146
-#define __NR_getsid 147
-#define __NR_fdatasync 148
-#define __NR__sysctl 149
-#define __NR_mlock 150
-#define __NR_munlock 151
-#define __NR_mlockall 152
-#define __NR_munlockall 153
-#define __NR_sched_setparam 154
-#define __NR_sched_getparam 155
-#define __NR_sched_setscheduler 156
-#define __NR_sched_getscheduler 157
-#define __NR_sched_yield 158
-#define __NR_sched_get_priority_max 159
-#define __NR_sched_get_priority_min 160
-#define __NR_sched_rr_get_interval 161
-#define __NR_nanosleep 162
-#define __NR_mremap 163
-#define __NR_setresuid 164
-#define __NR_getresuid 165
-#define __NR_poll 168
-#define __NR_nfsservctl 169
-#define __NR_setresgid 170
-#define __NR_getresgid 171
-#define __NR_prctl 172
-#define __NR_rt_sigreturn 173
-#define __NR_rt_sigaction 174
-#define __NR_rt_sigprocmask 175
-#define __NR_rt_sigpending 176
-#define __NR_rt_sigtimedwait 177
-#define __NR_rt_sigqueueinfo 178
-#define __NR_rt_sigsuspend 179
-#define __NR_pread64 180
-#define __NR_pwrite64 181
-#define __NR_chown 182
-#define __NR_getcwd 183
-#define __NR_capget 184
-#define __NR_capset 185
-#define __NR_sigaltstack 186
-#define __NR_sendfile 187
-#define __NR_vfork 190
-#define __NR_ugetrlimit 191
-#define __NR_mmap2 192
-#define __NR_truncate64 193
-#define __NR_ftruncate64 194
-#define __NR_stat64 195
-#define __NR_lstat64 196
-#define __NR_fstat64 197
-#define __NR_lchown32 198
-#define __NR_getuid32 199
-#define __NR_getgid32 200
-#define __NR_geteuid32 201
-#define __NR_getegid32 202
-#define __NR_setreuid32 203
-#define __NR_setregid32 204
-#define __NR_getgroups32 205
-#define __NR_setgroups32 206
-#define __NR_fchown32 207
-#define __NR_setresuid32 208
-#define __NR_getresuid32 209
-#define __NR_setresgid32 210
-#define __NR_getresgid32 211
-#define __NR_chown32 212
-#define __NR_setuid32 213
-#define __NR_setgid32 214
-#define __NR_setfsuid32 215
-#define __NR_setfsgid32 216
-#define __NR_getdents64 217
-#define __NR_pivot_root 218
-#define __NR_mincore 219
-#define __NR_madvise 220
-#define __NR_fcntl64 221
-#define __NR_gettid 224
-#define __NR_readahead 225
-#define __NR_setxattr 226
-#define __NR_lsetxattr 227
-#define __NR_fsetxattr 228
-#define __NR_getxattr 229
-#define __NR_lgetxattr 230
-#define __NR_fgetxattr 231
-#define __NR_listxattr 232
-#define __NR_llistxattr 233
-#define __NR_flistxattr 234
-#define __NR_removexattr 235
-#define __NR_lremovexattr 236
-#define __NR_fremovexattr 237
-#define __NR_tkill 238
-#define __NR_sendfile64 239
-#define __NR_futex 240
-#define __NR_sched_setaffinity 241
-#define __NR_sched_getaffinity 242
-#define __NR_io_setup 243
-#define __NR_io_destroy 244
-#define __NR_io_getevents 245
-#define __NR_io_submit 246
-#define __NR_io_cancel 247
-#define __NR_exit_group 248
-#define __NR_lookup_dcookie 249
-#define __NR_epoll_create 250
-#define __NR_epoll_ctl 251
-#define __NR_epoll_wait 252
-#define __NR_remap_file_pages 253
-#define __NR_set_tid_address 256
-#define __NR_timer_create 257
-#define __NR_timer_settime 258
-#define __NR_timer_gettime 259
-#define __NR_timer_getoverrun 260
-#define __NR_timer_delete 261
-#define __NR_clock_settime 262
-#define __NR_clock_gettime 263
-#define __NR_clock_getres 264
-#define __NR_clock_nanosleep 265
-#define __NR_statfs64 266
-#define __NR_fstatfs64 267
-#define __NR_tgkill 268
-#define __NR_utimes 269
-#define __NR_fadvise64_64 270
-#define __NR_arm_fadvise64_64 270
-#define __NR_pciconfig_iobase 271
-#define __NR_pciconfig_read 272
-#define __NR_pciconfig_write 273
-#define __NR_mq_open 274
-#define __NR_mq_unlink 275
-#define __NR_mq_timedsend 276
-#define __NR_mq_timedreceive 277
-#define __NR_mq_notify 278
-#define __NR_mq_getsetattr 279
-#define __NR_waitid 280
-#define __NR_socket 281
-#define __NR_bind 282
-#define __NR_connect 283
-#define __NR_listen 284
-#define __NR_accept 285
-#define __NR_getsockname 286
-#define __NR_getpeername 287
-#define __NR_socketpair 288
-#define __NR_send 289
-#define __NR_sendto 290
-#define __NR_recv 291
-#define __NR_recvfrom 292
-#define __NR_shutdown 293
-#define __NR_setsockopt 294
-#define __NR_getsockopt 295
-#define __NR_sendmsg 296
-#define __NR_recvmsg 297
-#define __NR_semop 298
-#define __NR_semget 299
-#define __NR_semctl 300
-#define __NR_msgsnd 301
-#define __NR_msgrcv 302
-#define __NR_msgget 303
-#define __NR_msgctl 304
-#define __NR_shmat 305
-#define __NR_shmdt 306
-#define __NR_shmget 307
-#define __NR_shmctl 308
-#define __NR_add_key 309
-#define __NR_request_key 310
-#define __NR_keyctl 311
-#define __NR_semtimedop 312
-#define __NR_vserver 313
-#define __NR_ioprio_set 314
-#define __NR_ioprio_get 315
-#define __NR_inotify_init 316
-#define __NR_inotify_add_watch 317
-#define __NR_inotify_rm_watch 318
-#define __NR_mbind 319
-#define __NR_get_mempolicy 320
-#define __NR_set_mempolicy 321
-#define __NR_openat 322
-#define __NR_mkdirat 323
-#define __NR_mknodat 324
-#define __NR_fchownat 325
-#define __NR_futimesat 326
-#define __NR_fstatat64 327
-#define __NR_unlinkat 328
-#define __NR_renameat 329
-#define __NR_linkat 330
-#define __NR_symlinkat 331
-#define __NR_readlinkat 332
-#define __NR_fchmodat 333
-#define __NR_faccessat 334
-#define __NR_pselect6 335
-#define __NR_ppoll 336
-#define __NR_unshare 337
-#define __NR_set_robust_list 338
-#define __NR_get_robust_list 339
-#define __NR_splice 340
-#define __NR_sync_file_range2 341
-#define __NR_arm_sync_file_range 341
-#define __NR_tee 342
-#define __NR_vmsplice 343
-#define __NR_move_pages 344
-#define __NR_getcpu 345
-#define __NR_epoll_pwait 346
-#define __NR_kexec_load 347
-#define __NR_utimensat 348
-#define __NR_signalfd 349
-#define __NR_timerfd_create 350
-#define __NR_eventfd 351
-#define __NR_fallocate 352
-#define __NR_timerfd_settime 353
-#define __NR_timerfd_gettime 354
-#define __NR_signalfd4 355
-#define __NR_eventfd2 356
-#define __NR_epoll_create1 357
-#define __NR_dup3 358
-#define __NR_pipe2 359
-#define __NR_inotify_init1 360
-#define __NR_preadv 361
-#define __NR_pwritev 362
-#define __NR_rt_tgsigqueueinfo 363
-#define __NR_perf_event_open 364
-#define __NR_recvmmsg 365
-#define __NR_accept4 366
-#define __NR_fanotify_init 367
-#define __NR_fanotify_mark 368
-#define __NR_prlimit64 369
-#define __NR_name_to_handle_at 370
-#define __NR_open_by_handle_at 371
-#define __NR_clock_adjtime 372
-#define __NR_syncfs 373
-#define __NR_sendmmsg 374
-#define __NR_setns 375
-#define __NR_process_vm_readv 376
-#define __NR_process_vm_writev 377
-#define __NR_kcmp 378
-#define __NR_finit_module 379
-#define __NR_sched_setattr 380
-#define __NR_sched_getattr 381
-#define __NR_renameat2 382
-#define __NR_seccomp 383
-#define __NR_getrandom 384
-#define __NR_memfd_create 385
-#define __NR_bpf 386
-#define __NR_execveat 387
-#define __NR_userfaultfd 388
-#define __NR_membarrier 389
-#define __NR_mlock2 390
-#define __NR_copy_file_range 391
-#define __NR_preadv2 392
-#define __NR_pwritev2 393
-#define __NR_pkey_mprotect 394
-#define __NR_pkey_alloc 395
-#define __NR_pkey_free 396
-#define __NR_statx 397
-#define __NR_rseq 398
+#define __NR_io_setup 0
+#define __NR_io_destroy 1
+#define __NR_io_submit 2
+#define __NR_io_cancel 3
+#define __NR_io_getevents 4
+#define __NR_setxattr 5
+#define __NR_lsetxattr 6
+#define __NR_fsetxattr 7
+#define __NR_getxattr 8
+#define __NR_lgetxattr 9
+#define __NR_fgetxattr 10
+#define __NR_listxattr 11
+#define __NR_llistxattr 12
+#define __NR_flistxattr 13
+#define __NR_removexattr 14
+#define __NR_lremovexattr 15
+#define __NR_fremovexattr 16
+#define __NR_getcwd 17
+#define __NR_lookup_dcookie 18
+#define __NR_eventfd2 19
+#define __NR_epoll_create1 20
+#define __NR_epoll_ctl 21
+#define __NR_epoll_pwait 22
+#define __NR_dup 23
+#define __NR_dup3 24
+#define __NR_fcntl 25
+#define __NR_inotify_init1 26
+#define __NR_inotify_add_watch 27
+#define __NR_inotify_rm_watch 28
+#define __NR_ioctl 29
+#define __NR_ioprio_set 30
+#define __NR_ioprio_get 31
+#define __NR_flock 32
+#define __NR_mknodat 33
+#define __NR_mkdirat 34
+#define __NR_unlinkat 35
+#define __NR_symlinkat 36
+#define __NR_linkat 37
+#define __NR_renameat 38
+#define __NR_umount2 39
+#define __NR_mount 40
+#define __NR_pivot_root 41
+#define __NR_nfsservctl 42
+#define __NR_statfs 43
+#define __NR_fstatfs 44
+#define __NR_truncate 45
+#define __NR_ftruncate 46
+#define __NR_fallocate 47
+#define __NR_faccessat 48
+#define __NR_chdir 49
+#define __NR_fchdir 50
+#define __NR_chroot 51
+#define __NR_fchmod 52
+#define __NR_fchmodat 53
+#define __NR_fchownat 54
+#define __NR_fchown 55
+#define __NR_openat 56
+#define __NR_close 57
+#define __NR_vhangup 58
+#define __NR_pipe2 59
+#define __NR_quotactl 60
+#define __NR_getdents64 61
+#define __NR_lseek 62
+#define __NR_read 63
+#define __NR_write 64
+#define __NR_readv 65
+#define __NR_writev 66
+#define __NR_pread64 67
+#define __NR_pwrite64 68
+#define __NR_preadv 69
+#define __NR_pwritev 70
+#define __NR_sendfile 71
+#define __NR_pselect6 72
+#define __NR_ppoll 73
+#define __NR_signalfd4 74
+#define __NR_vmsplice 75
+#define __NR_splice 76
+#define __NR_tee 77
+#define __NR_readlinkat 78
+#define __NR_newfstatat 79
+#define __NR_fstat 80
+#define __NR_sync 81
+#define __NR_fsync 82
+#define __NR_fdatasync 83
+#define __NR_sync_file_range 84
+#define __NR_timerfd_create 85
+#define __NR_timerfd_settime 86
+#define __NR_timerfd_gettime 87
+#define __NR_utimensat 88
+#define __NR_acct 89
+#define __NR_capget 90
+#define __NR_capset 91
+#define __NR_personality 92
+#define __NR_exit 93
+#define __NR_exit_group 94
+#define __NR_waitid 95
+#define __NR_set_tid_address 96
+#define __NR_unshare 97
+#define __NR_futex 98
+#define __NR_set_robust_list 99
+#define __NR_get_robust_list 100
+#define __NR_nanosleep 101
+#define __NR_getitimer 102
+#define __NR_setitimer 103
+#define __NR_kexec_load 104
+#define __NR_init_module 105
+#define __NR_delete_module 106
+#define __NR_timer_create 107
+#define __NR_timer_gettime 108
+#define __NR_timer_getoverrun 109
+#define __NR_timer_settime 110
+#define __NR_timer_delete 111
+#define __NR_clock_settime 112
+#define __NR_clock_gettime 113
+#define __NR_clock_getres 114
+#define __NR_clock_nanosleep 115
+#define __NR_syslog 116
+#define __NR_ptrace 117
+#define __NR_sched_setparam 118
+#define __NR_sched_setscheduler 119
+#define __NR_sched_getscheduler 120
+#define __NR_sched_getparam 121
+#define __NR_sched_setaffinity 122
+#define __NR_sched_getaffinity 123
+#define __NR_sched_yield 124
+#define __NR_sched_get_priority_max 125
+#define __NR_sched_get_priority_min 126
+#define __NR_sched_rr_get_interval 127
+#define __NR_restart_syscall 128
+#define __NR_kill 129
+#define __NR_tkill 130
+#define __NR_tgkill 131
+#define __NR_sigaltstack 132
+#define __NR_rt_sigsuspend 133
+#define __NR_rt_sigaction 134
+#define __NR_rt_sigprocmask 135
+#define __NR_rt_sigpending 136
+#define __NR_rt_sigtimedwait 137
+#define __NR_rt_sigqueueinfo 138
+#define __NR_rt_sigreturn 139
+#define __NR_setpriority 140
+#define __NR_getpriority 141
+#define __NR_reboot 142
+#define __NR_setregid 143
+#define __NR_setgid 144
+#define __NR_setreuid 145
+#define __NR_setuid 146
+#define __NR_setresuid 147
+#define __NR_getresuid 148
+#define __NR_setresgid 149
+#define __NR_getresgid 150
+#define __NR_setfsuid 151
+#define __NR_setfsgid 152
+#define __NR_times 153
+#define __NR_setpgid 154
+#define __NR_getpgid 155
+#define __NR_getsid 156
+#define __NR_setsid 157
+#define __NR_getgroups 158
+#define __NR_setgroups 159
+#define __NR_uname 160
+#define __NR_sethostname 161
+#define __NR_setdomainname 162
+#define __NR_getrlimit 163
+#define __NR_setrlimit 164
+#define __NR_getrusage 165
+#define __NR_umask 166
+#define __NR_prctl 167
+#define __NR_getcpu 168
+#define __NR_gettimeofday 169
+#define __NR_settimeofday 170
+#define __NR_adjtimex 171
+#define __NR_getpid 172
+#define __NR_getppid 173
+#define __NR_getuid 174
+#define __NR_geteuid 175
+#define __NR_getgid 176
+#define __NR_getegid 177
+#define __NR_gettid 178
+#define __NR_sysinfo 179
+#define __NR_mq_open 180
+#define __NR_mq_unlink 181
+#define __NR_mq_timedsend 182
+#define __NR_mq_timedreceive 183
+#define __NR_mq_notify 184
+#define __NR_mq_getsetattr 185
+#define __NR_msgget 186
+#define __NR_msgctl 187
+#define __NR_msgrcv 188
+#define __NR_msgsnd 189
+#define __NR_semget 190
+#define __NR_semctl 191
+#define __NR_semtimedop 192
+#define __NR_semop 193
+#define __NR_shmget 194
+#define __NR_shmctl 195
+#define __NR_shmat 196
+#define __NR_shmdt 197
+#define __NR_socket 198
+#define __NR_socketpair 199
+#define __NR_bind 200
+#define __NR_listen 201
+#define __NR_accept 202
+#define __NR_connect 203
+#define __NR_getsockname 204
+#define __NR_getpeername 205
+#define __NR_sendto 206
+#define __NR_recvfrom 207
+#define __NR_setsockopt 208
+#define __NR_getsockopt 209
+#define __NR_shutdown 210
+#define __NR_sendmsg 211
+#define __NR_recvmsg 212
+#define __NR_readahead 213
+#define __NR_brk 214
+#define __NR_munmap 215
+#define __NR_mremap 216
+#define __NR_add_key 217
+#define __NR_request_key 218
+#define __NR_keyctl 219
+#define __NR_clone 220
+#define __NR_execve 221
+#define __NR_mmap 222
+#define __NR_fadvise64 223
+#define __NR_swapon 224
+#define __NR_swapoff 225
+#define __NR_mprotect 226
+#define __NR_msync 227
+#define __NR_mlock 228
+#define __NR_munlock 229
+#define __NR_mlockall 230
+#define __NR_munlockall 231
+#define __NR_mincore 232
+#define __NR_madvise 233
+#define __NR_remap_file_pages 234
+#define __NR_mbind 235
+#define __NR_get_mempolicy 236
+#define __NR_set_mempolicy 237
+#define __NR_migrate_pages 238
+#define __NR_move_pages 239
+#define __NR_rt_tgsigqueueinfo 240
+#define __NR_perf_event_open 241
+#define __NR_accept4 242
+#define __NR_recvmmsg 243
+#define __NR_wait4 260
+#define __NR_prlimit64 261
+#define __NR_fanotify_init 262
+#define __NR_fanotify_mark 263
+#define __NR_name_to_handle_at 264
+#define __NR_open_by_handle_at 265
+#define __NR_clock_adjtime 266
+#define __NR_syncfs 267
+#define __NR_setns 268
+#define __NR_sendmmsg 269
+#define __NR_process_vm_readv 270
+#define __NR_process_vm_writev 271
+#define __NR_kcmp 272
+#define __NR_finit_module 273
+#define __NR_sched_setattr 274
+#define __NR_sched_getattr 275
+#define __NR_renameat2 276
+#define __NR_seccomp 277
+#define __NR_getrandom 278
+#define __NR_memfd_create 279
+#define __NR_bpf 280
+#define __NR_execveat 281
+#define __NR_userfaultfd 282
+#define __NR_membarrier 283
+#define __NR_mlock2 284
+#define __NR_copy_file_range 285
+#define __NR_preadv2 286
+#define __NR_pwritev2 287
+#define __NR_pkey_mprotect 288
+#define __NR_pkey_alloc 289
+#define __NR_pkey_free 290
+#define __NR_statx 291
+#define __NR_io_pgetevents 292
+#define __NR_rseq 293
+#define __NR_kexec_file_load 294
+#define __NR_pidfd_send_signal 424
+#define __NR_io_uring_setup 425
+#define __NR_io_uring_enter 426
+#define __NR_io_uring_register 427
-#define __ARM_NR_breakpoint 0x0f0001
-#define __ARM_NR_cacheflush 0x0f0002
-#define __ARM_NR_usr26 0x0f0003
-#define __ARM_NR_usr32 0x0f0004
-#define __ARM_NR_set_tls 0x0f0005
-#define __ARM_NR_get_tls 0x0f0006
-
-#define SYS_restart_syscall 0
-#define SYS_exit 1
-#define SYS_fork 2
-#define SYS_read 3
-#define SYS_write 4
-#define SYS_open 5
-#define SYS_close 6
-#define SYS_creat 8
-#define SYS_link 9
-#define SYS_unlink 10
-#define SYS_execve 11
-#define SYS_chdir 12
-#define SYS_mknod 14
-#define SYS_chmod 15
-#define SYS_lchown 16
-#define SYS_lseek 19
-#define SYS_getpid 20
-#define SYS_mount 21
-#define SYS_setuid 23
-#define SYS_getuid 24
-#define SYS_ptrace 26
-#define SYS_pause 29
-#define SYS_access 33
-#define SYS_nice 34
-#define SYS_sync 36
-#define SYS_kill 37
-#define SYS_rename 38
-#define SYS_mkdir 39
-#define SYS_rmdir 40
-#define SYS_dup 41
-#define SYS_pipe 42
-#define SYS_times 43
-#define SYS_brk 45
-#define SYS_setgid 46
-#define SYS_getgid 47
-#define SYS_geteuid 49
-#define SYS_getegid 50
-#define SYS_acct 51
-#define SYS_umount2 52
-#define SYS_ioctl 54
-#define SYS_fcntl 55
-#define SYS_setpgid 57
-#define SYS_umask 60
-#define SYS_chroot 61
-#define SYS_ustat 62
-#define SYS_dup2 63
-#define SYS_getppid 64
-#define SYS_getpgrp 65
-#define SYS_setsid 66
-#define SYS_sigaction 67
-#define SYS_setreuid 70
-#define SYS_setregid 71
-#define SYS_sigsuspend 72
-#define SYS_sigpending 73
-#define SYS_sethostname 74
-#define SYS_setrlimit 75
-#define SYS_getrusage 77
-#define SYS_gettimeofday 78
-#define SYS_settimeofday 79
-#define SYS_getgroups 80
-#define SYS_setgroups 81
-#define SYS_symlink 83
-#define SYS_readlink 85
-#define SYS_uselib 86
-#define SYS_swapon 87
-#define SYS_reboot 88
-#define SYS_munmap 91
-#define SYS_truncate 92
-#define SYS_ftruncate 93
-#define SYS_fchmod 94
-#define SYS_fchown 95
-#define SYS_getpriority 96
-#define SYS_setpriority 97
-#define SYS_statfs 99
-#define SYS_fstatfs 100
-#define SYS_syslog 103
-#define SYS_setitimer 104
-#define SYS_getitimer 105
-#define SYS_stat 106
-#define SYS_lstat 107
-#define SYS_fstat 108
-#define SYS_vhangup 111
-#define SYS_wait4 114
-#define SYS_swapoff 115
-#define SYS_sysinfo 116
-#define SYS_fsync 118
-#define SYS_sigreturn 119
-#define SYS_clone 120
-#define SYS_setdomainname 121
-#define SYS_uname 122
-#define SYS_adjtimex 124
-#define SYS_mprotect 125
-#define SYS_sigprocmask 126
-#define SYS_init_module 128
-#define SYS_delete_module 129
-#define SYS_quotactl 131
-#define SYS_getpgid 132
-#define SYS_fchdir 133
-#define SYS_bdflush 134
-#define SYS_sysfs 135
-#define SYS_personality 136
-#define SYS_setfsuid 138
-#define SYS_setfsgid 139
-#define SYS__llseek 140
-#define SYS_getdents 141
-#define SYS__newselect 142
-#define SYS_flock 143
-#define SYS_msync 144
-#define SYS_readv 145
-#define SYS_writev 146
-#define SYS_getsid 147
-#define SYS_fdatasync 148
-#define SYS__sysctl 149
-#define SYS_mlock 150
-#define SYS_munlock 151
-#define SYS_mlockall 152
-#define SYS_munlockall 153
-#define SYS_sched_setparam 154
-#define SYS_sched_getparam 155
-#define SYS_sched_setscheduler 156
-#define SYS_sched_getscheduler 157
-#define SYS_sched_yield 158
-#define SYS_sched_get_priority_max 159
-#define SYS_sched_get_priority_min 160
-#define SYS_sched_rr_get_interval 161
-#define SYS_nanosleep 162
-#define SYS_mremap 163
-#define SYS_setresuid 164
-#define SYS_getresuid 165
-#define SYS_poll 168
-#define SYS_nfsservctl 169
-#define SYS_setresgid 170
-#define SYS_getresgid 171
-#define SYS_prctl 172
-#define SYS_rt_sigreturn 173
-#define SYS_rt_sigaction 174
-#define SYS_rt_sigprocmask 175
-#define SYS_rt_sigpending 176
-#define SYS_rt_sigtimedwait 177
-#define SYS_rt_sigqueueinfo 178
-#define SYS_rt_sigsuspend 179
-#define SYS_pread64 180
-#define SYS_pwrite64 181
-#define SYS_chown 182
-#define SYS_getcwd 183
-#define SYS_capget 184
-#define SYS_capset 185
-#define SYS_sigaltstack 186
-#define SYS_sendfile 187
-#define SYS_vfork 190
-#define SYS_ugetrlimit 191
-#define SYS_mmap2 192
-#define SYS_truncate64 193
-#define SYS_ftruncate64 194
-#define SYS_stat64 195
-#define SYS_lstat64 196
-#define SYS_fstat64 197
-#define SYS_lchown32 198
-#define SYS_getuid32 199
-#define SYS_getgid32 200
-#define SYS_geteuid32 201
-#define SYS_getegid32 202
-#define SYS_setreuid32 203
-#define SYS_setregid32 204
-#define SYS_getgroups32 205
-#define SYS_setgroups32 206
-#define SYS_fchown32 207
-#define SYS_setresuid32 208
-#define SYS_getresuid32 209
-#define SYS_setresgid32 210
-#define SYS_getresgid32 211
-#define SYS_chown32 212
-#define SYS_setuid32 213
-#define SYS_setgid32 214
-#define SYS_setfsuid32 215
-#define SYS_setfsgid32 216
-#define SYS_getdents64 217
-#define SYS_pivot_root 218
-#define SYS_mincore 219
-#define SYS_madvise 220
-#define SYS_fcntl64 221
-#define SYS_gettid 224
-#define SYS_readahead 225
-#define SYS_setxattr 226
-#define SYS_lsetxattr 227
-#define SYS_fsetxattr 228
-#define SYS_getxattr 229
-#define SYS_lgetxattr 230
-#define SYS_fgetxattr 231
-#define SYS_listxattr 232
-#define SYS_llistxattr 233
-#define SYS_flistxattr 234
-#define SYS_removexattr 235
-#define SYS_lremovexattr 236
-#define SYS_fremovexattr 237
-#define SYS_tkill 238
-#define SYS_sendfile64 239
-#define SYS_futex 240
-#define SYS_sched_setaffinity 241
-#define SYS_sched_getaffinity 242
-#define SYS_io_setup 243
-#define SYS_io_destroy 244
-#define SYS_io_getevents 245
-#define SYS_io_submit 246
-#define SYS_io_cancel 247
-#define SYS_exit_group 248
-#define SYS_lookup_dcookie 249
-#define SYS_epoll_create 250
-#define SYS_epoll_ctl 251
-#define SYS_epoll_wait 252
-#define SYS_remap_file_pages 253
-#define SYS_set_tid_address 256
-#define SYS_timer_create 257
-#define SYS_timer_settime 258
-#define SYS_timer_gettime 259
-#define SYS_timer_getoverrun 260
-#define SYS_timer_delete 261
-#define SYS_clock_settime 262
-#define SYS_clock_gettime 263
-#define SYS_clock_getres 264
-#define SYS_clock_nanosleep 265
-#define SYS_statfs64 266
-#define SYS_fstatfs64 267
-#define SYS_tgkill 268
-#define SYS_utimes 269
-#define SYS_fadvise64_64 270
-#define SYS_arm_fadvise64_64 270
-#define SYS_pciconfig_iobase 271
-#define SYS_pciconfig_read 272
-#define SYS_pciconfig_write 273
-#define SYS_mq_open 274
-#define SYS_mq_unlink 275
-#define SYS_mq_timedsend 276
-#define SYS_mq_timedreceive 277
-#define SYS_mq_notify 278
-#define SYS_mq_getsetattr 279
-#define SYS_waitid 280
-#define SYS_socket 281
-#define SYS_bind 282
-#define SYS_connect 283
-#define SYS_listen 284
-#define SYS_accept 285
-#define SYS_getsockname 286
-#define SYS_getpeername 287
-#define SYS_socketpair 288
-#define SYS_send 289
-#define SYS_sendto 290
-#define SYS_recv 291
-#define SYS_recvfrom 292
-#define SYS_shutdown 293
-#define SYS_setsockopt 294
-#define SYS_getsockopt 295
-#define SYS_sendmsg 296
-#define SYS_recvmsg 297
-#define SYS_semop 298
-#define SYS_semget 299
-#define SYS_semctl 300
-#define SYS_msgsnd 301
-#define SYS_msgrcv 302
-#define SYS_msgget 303
-#define SYS_msgctl 304
-#define SYS_shmat 305
-#define SYS_shmdt 306
-#define SYS_shmget 307
-#define SYS_shmctl 308
-#define SYS_add_key 309
-#define SYS_request_key 310
-#define SYS_keyctl 311
-#define SYS_semtimedop 312
-#define SYS_vserver 313
-#define SYS_ioprio_set 314
-#define SYS_ioprio_get 315
-#define SYS_inotify_init 316
-#define SYS_inotify_add_watch 317
-#define SYS_inotify_rm_watch 318
-#define SYS_mbind 319
-#define SYS_get_mempolicy 320
-#define SYS_set_mempolicy 321
-#define SYS_openat 322
-#define SYS_mkdirat 323
-#define SYS_mknodat 324
-#define SYS_fchownat 325
-#define SYS_futimesat 326
-#define SYS_fstatat64 327
-#define SYS_unlinkat 328
-#define SYS_renameat 329
-#define SYS_linkat 330
-#define SYS_symlinkat 331
-#define SYS_readlinkat 332
-#define SYS_fchmodat 333
-#define SYS_faccessat 334
-#define SYS_pselect6 335
-#define SYS_ppoll 336
-#define SYS_unshare 337
-#define SYS_set_robust_list 338
-#define SYS_get_robust_list 339
-#define SYS_splice 340
-#define SYS_sync_file_range2 341
-#define SYS_arm_sync_file_range 341
-#define SYS_tee 342
-#define SYS_vmsplice 343
-#define SYS_move_pages 344
-#define SYS_getcpu 345
-#define SYS_epoll_pwait 346
-#define SYS_kexec_load 347
-#define SYS_utimensat 348
-#define SYS_signalfd 349
-#define SYS_timerfd_create 350
-#define SYS_eventfd 351
-#define SYS_fallocate 352
-#define SYS_timerfd_settime 353
-#define SYS_timerfd_gettime 354
-#define SYS_signalfd4 355
-#define SYS_eventfd2 356
-#define SYS_epoll_create1 357
-#define SYS_dup3 358
-#define SYS_pipe2 359
-#define SYS_inotify_init1 360
-#define SYS_preadv 361
-#define SYS_pwritev 362
-#define SYS_rt_tgsigqueueinfo 363
-#define SYS_perf_event_open 364
-#define SYS_recvmmsg 365
-#define SYS_accept4 366
-#define SYS_fanotify_init 367
-#define SYS_fanotify_mark 368
-#define SYS_prlimit64 369
-#define SYS_name_to_handle_at 370
-#define SYS_open_by_handle_at 371
-#define SYS_clock_adjtime 372
-#define SYS_syncfs 373
-#define SYS_sendmmsg 374
-#define SYS_setns 375
-#define SYS_process_vm_readv 376
-#define SYS_process_vm_writev 377
-#define SYS_kcmp 378
-#define SYS_finit_module 379
-#define SYS_sched_setattr 380
-#define SYS_sched_getattr 381
-#define SYS_renameat2 382
-#define SYS_seccomp 383
-#define SYS_getrandom 384
-#define SYS_memfd_create 385
-#define SYS_bpf 386
-#define SYS_execveat 387
-#define SYS_userfaultfd 388
-#define SYS_membarrier 389
-#define SYS_mlock2 390
-#define SYS_copy_file_range 391
-#define SYS_preadv2 392
-#define SYS_pwritev2 393
-#define SYS_pkey_mprotect 394
-#define SYS_pkey_alloc 395
-#define SYS_pkey_free 396
-#define SYS_statx 397
-#define SYS_rseq 398
\ No newline at end of file
+#define SYS_io_setup 0
+#define SYS_io_destroy 1
+#define SYS_io_submit 2
+#define SYS_io_cancel 3
+#define SYS_io_getevents 4
+#define SYS_setxattr 5
+#define SYS_lsetxattr 6
+#define SYS_fsetxattr 7
+#define SYS_getxattr 8
+#define SYS_lgetxattr 9
+#define SYS_fgetxattr 10
+#define SYS_listxattr 11
+#define SYS_llistxattr 12
+#define SYS_flistxattr 13
+#define SYS_removexattr 14
+#define SYS_lremovexattr 15
+#define SYS_fremovexattr 16
+#define SYS_getcwd 17
+#define SYS_lookup_dcookie 18
+#define SYS_eventfd2 19
+#define SYS_epoll_create1 20
+#define SYS_epoll_ctl 21
+#define SYS_epoll_pwait 22
+#define SYS_dup 23
+#define SYS_dup3 24
+#define SYS_fcntl 25
+#define SYS_inotify_init1 26
+#define SYS_inotify_add_watch 27
+#define SYS_inotify_rm_watch 28
+#define SYS_ioctl 29
+#define SYS_ioprio_set 30
+#define SYS_ioprio_get 31
+#define SYS_flock 32
+#define SYS_mknodat 33
+#define SYS_mkdirat 34
+#define SYS_unlinkat 35
+#define SYS_symlinkat 36
+#define SYS_linkat 37
+#define SYS_renameat 38
+#define SYS_umount2 39
+#define SYS_mount 40
+#define SYS_pivot_root 41
+#define SYS_nfsservctl 42
+#define SYS_statfs 43
+#define SYS_fstatfs 44
+#define SYS_truncate 45
+#define SYS_ftruncate 46
+#define SYS_fallocate 47
+#define SYS_faccessat 48
+#define SYS_chdir 49
+#define SYS_fchdir 50
+#define SYS_chroot 51
+#define SYS_fchmod 52
+#define SYS_fchmodat 53
+#define SYS_fchownat 54
+#define SYS_fchown 55
+#define SYS_openat 56
+#define SYS_close 57
+#define SYS_vhangup 58
+#define SYS_pipe2 59
+#define SYS_quotactl 60
+#define SYS_getdents64 61
+#define SYS_lseek 62
+#define SYS_read 63
+#define SYS_write 64
+#define SYS_readv 65
+#define SYS_writev 66
+#define SYS_pread64 67
+#define SYS_pwrite64 68
+#define SYS_preadv 69
+#define SYS_pwritev 70
+#define SYS_sendfile 71
+#define SYS_pselect6 72
+#define SYS_ppoll 73
+#define SYS_signalfd4 74
+#define SYS_vmsplice 75
+#define SYS_splice 76
+#define SYS_tee 77
+#define SYS_readlinkat 78
+#define SYS_newfstatat 79
+#define SYS_fstat 80
+#define SYS_sync 81
+#define SYS_fsync 82
+#define SYS_fdatasync 83
+#define SYS_sync_file_range 84
+#define SYS_timerfd_create 85
+#define SYS_timerfd_settime 86
+#define SYS_timerfd_gettime 87
+#define SYS_utimensat 88
+#define SYS_acct 89
+#define SYS_capget 90
+#define SYS_capset 91
+#define SYS_personality 92
+#define SYS_exit 93
+#define SYS_exit_group 94
+#define SYS_waitid 95
+#define SYS_set_tid_address 96
+#define SYS_unshare 97
+#define SYS_futex 98
+#define SYS_set_robust_list 99
+#define SYS_get_robust_list 100
+#define SYS_nanosleep 101
+#define SYS_getitimer 102
+#define SYS_setitimer 103
+#define SYS_kexec_load 104
+#define SYS_init_module 105
+#define SYS_delete_module 106
+#define SYS_timer_create 107
+#define SYS_timer_gettime 108
+#define SYS_timer_getoverrun 109
+#define SYS_timer_settime 110
+#define SYS_timer_delete 111
+#define SYS_clock_settime 112
+#define SYS_clock_gettime 113
+#define SYS_clock_getres 114
+#define SYS_clock_nanosleep 115
+#define SYS_syslog 116
+#define SYS_ptrace 117
+#define SYS_sched_setparam 118
+#define SYS_sched_setscheduler 119
+#define SYS_sched_getscheduler 120
+#define SYS_sched_getparam 121
+#define SYS_sched_setaffinity 122
+#define SYS_sched_getaffinity 123
+#define SYS_sched_yield 124
+#define SYS_sched_get_priority_max 125
+#define SYS_sched_get_priority_min 126
+#define SYS_sched_rr_get_interval 127
+#define SYS_restart_syscall 128
+#define SYS_kill 129
+#define SYS_tkill 130
+#define SYS_tgkill 131
+#define SYS_sigaltstack 132
+#define SYS_rt_sigsuspend 133
+#define SYS_rt_sigaction 134
+#define SYS_rt_sigprocmask 135
+#define SYS_rt_sigpending 136
+#define SYS_rt_sigtimedwait 137
+#define SYS_rt_sigqueueinfo 138
+#define SYS_rt_sigreturn 139
+#define SYS_setpriority 140
+#define SYS_getpriority 141
+#define SYS_reboot 142
+#define SYS_setregid 143
+#define SYS_setgid 144
+#define SYS_setreuid 145
+#define SYS_setuid 146
+#define SYS_setresuid 147
+#define SYS_getresuid 148
+#define SYS_setresgid 149
+#define SYS_getresgid 150
+#define SYS_setfsuid 151
+#define SYS_setfsgid 152
+#define SYS_times 153
+#define SYS_setpgid 154
+#define SYS_getpgid 155
+#define SYS_getsid 156
+#define SYS_setsid 157
+#define SYS_getgroups 158
+#define SYS_setgroups 159
+#define SYS_uname 160
+#define SYS_sethostname 161
+#define SYS_setdomainname 162
+#define SYS_getrlimit 163
+#define SYS_setrlimit 164
+#define SYS_getrusage 165
+#define SYS_umask 166
+#define SYS_prctl 167
+#define SYS_getcpu 168
+#define SYS_gettimeofday 169
+#define SYS_settimeofday 170
+#define SYS_adjtimex 171
+#define SYS_getpid 172
+#define SYS_getppid 173
+#define SYS_getuid 174
+#define SYS_geteuid 175
+#define SYS_getgid 176
+#define SYS_getegid 177
+#define SYS_gettid 178
+#define SYS_sysinfo 179
+#define SYS_mq_open 180
+#define SYS_mq_unlink 181
+#define SYS_mq_timedsend 182
+#define SYS_mq_timedreceive 183
+#define SYS_mq_notify 184
+#define SYS_mq_getsetattr 185
+#define SYS_msgget 186
+#define SYS_msgctl 187
+#define SYS_msgrcv 188
+#define SYS_msgsnd 189
+#define SYS_semget 190
+#define SYS_semctl 191
+#define SYS_semtimedop 192
+#define SYS_semop 193
+#define SYS_shmget 194
+#define SYS_shmctl 195
+#define SYS_shmat 196
+#define SYS_shmdt 197
+#define SYS_socket 198
+#define SYS_socketpair 199
+#define SYS_bind 200
+#define SYS_listen 201
+#define SYS_accept 202
+#define SYS_connect 203
+#define SYS_getsockname 204
+#define SYS_getpeername 205
+#define SYS_sendto 206
+#define SYS_recvfrom 207
+#define SYS_setsockopt 208
+#define SYS_getsockopt 209
+#define SYS_shutdown 210
+#define SYS_sendmsg 211
+#define SYS_recvmsg 212
+#define SYS_readahead 213
+#define SYS_brk 214
+#define SYS_munmap 215
+#define SYS_mremap 216
+#define SYS_add_key 217
+#define SYS_request_key 218
+#define SYS_keyctl 219
+#define SYS_clone 220
+#define SYS_execve 221
+#define SYS_mmap 222
+#define SYS_fadvise64 223
+#define SYS_swapon 224
+#define SYS_swapoff 225
+#define SYS_mprotect 226
+#define SYS_msync 227
+#define SYS_mlock 228
+#define SYS_munlock 229
+#define SYS_mlockall 230
+#define SYS_munlockall 231
+#define SYS_mincore 232
+#define SYS_madvise 233
+#define SYS_remap_file_pages 234
+#define SYS_mbind 235
+#define SYS_get_mempolicy 236
+#define SYS_set_mempolicy 237
+#define SYS_migrate_pages 238
+#define SYS_move_pages 239
+#define SYS_rt_tgsigqueueinfo 240
+#define SYS_perf_event_open 241
+#define SYS_accept4 242
+#define SYS_recvmmsg 243
+#define SYS_wait4 260
+#define SYS_prlimit64 261
+#define SYS_fanotify_init 262
+#define SYS_fanotify_mark 263
+#define SYS_name_to_handle_at 264
+#define SYS_open_by_handle_at 265
+#define SYS_clock_adjtime 266
+#define SYS_syncfs 267
+#define SYS_setns 268
+#define SYS_sendmmsg 269
+#define SYS_process_vm_readv 270
+#define SYS_process_vm_writev 271
+#define SYS_kcmp 272
+#define SYS_finit_module 273
+#define SYS_sched_setattr 274
+#define SYS_sched_getattr 275
+#define SYS_renameat2 276
+#define SYS_seccomp 277
+#define SYS_getrandom 278
+#define SYS_memfd_create 279
+#define SYS_bpf 280
+#define SYS_execveat 281
+#define SYS_userfaultfd 282
+#define SYS_membarrier 283
+#define SYS_mlock2 284
+#define SYS_copy_file_range 285
+#define SYS_preadv2 286
+#define SYS_pwritev2 287
+#define SYS_pkey_mprotect 288
+#define SYS_pkey_alloc 289
+#define SYS_pkey_free 290
+#define SYS_statx 291
+#define SYS_io_pgetevents 292
+#define SYS_rseq 293
+#define SYS_kexec_file_load 294
+#define SYS_pidfd_send_signal 424
+#define SYS_io_uring_setup 425
+#define SYS_io_uring_enter 426
+#define SYS_io_uring_register 427
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/bits/user.h b/lib/libc/include/generic-musl/bits/user.h
deleted file mode 100644
index cd3b3fdc6a0660d219a3d66249bb14ee37cc832c..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/bits/user.h
+++ /dev/null
@@ -1,36 +0,0 @@
-typedef struct user_fpregs {
- struct fp_reg {
- unsigned sign1:1;
- unsigned unused:15;
- unsigned sign2:1;
- unsigned exponent:14;
- unsigned j:1;
- unsigned mantissa1:31;
- unsigned mantissa0:32;
- } fpregs[8];
- unsigned fpsr:32;
- unsigned fpcr:32;
- unsigned char ftype[8];
- unsigned int init_flag;
-} elf_fpregset_t;
-
-struct user_regs {
- unsigned long uregs[18];
-};
-#define ELF_NGREG 18
-typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG];
-
-struct user {
- struct user_regs regs;
- int u_fpvalid;
- unsigned long u_tsize, u_dsize, u_ssize;
- unsigned long start_code, start_stack;
- long signal;
- int reserved;
- struct user_regs *u_ar0;
- unsigned long magic;
- char u_comm[32];
- int u_debugreg[8];
- struct user_fpregs u_fp;
- struct user_fpregs *u_fp0;
-};
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/diagnostics.h b/lib/libc/include/generic-musl/diagnostics.h
deleted file mode 100644
index 4e50621c5396916e9e70c7df03f911b122f79bc4..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/diagnostics.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Copyright (C) 2017-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see . */
-
-#ifndef DIAGNOSTICS_H
-#define DIAGNOSTICS_H
-
-/* If at all possible, fix the source rather than using these macros
- to silence warnings. If you do use these macros be aware that
- you'll need to condition their use on particular compiler versions,
- which can be done for gcc using ansidecl.h's GCC_VERSION macro.
-
- gcc versions between 4.2 and 4.6 do not allow pragma control of
- diagnostics inside functions, giving a hard error if you try to use
- the finer control available with later versions.
- gcc prior to 4.2 warns about diagnostic push and pop.
-
- The other macros have restrictions too, for example gcc-5, gcc-6
- and gcc-7 warn that -Wstringop-truncation is unknown, unless you
- also add DIAGNOSTIC_IGNORE ("-Wpragma"). */
-
-#ifdef __GNUC__
-# define DIAGNOSTIC_PUSH _Pragma ("GCC diagnostic push")
-# define DIAGNOSTIC_POP _Pragma ("GCC diagnostic pop")
-
-/* Stringification. */
-# define DIAGNOSTIC_STRINGIFY_1(x) #x
-# define DIAGNOSTIC_STRINGIFY(x) DIAGNOSTIC_STRINGIFY_1 (x)
-
-# define DIAGNOSTIC_IGNORE(option) \
- _Pragma (DIAGNOSTIC_STRINGIFY (GCC diagnostic ignored option))
-#else
-# define DIAGNOSTIC_PUSH
-# define DIAGNOSTIC_POP
-# define DIAGNOSTIC_IGNORE(option)
-#endif
-
-#if defined (__clang__) /* clang */
-
-# define DIAGNOSTIC_IGNORE_SELF_MOVE DIAGNOSTIC_IGNORE ("-Wself-move")
-# define DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS \
- DIAGNOSTIC_IGNORE ("-Wdeprecated-declarations")
-# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER \
- DIAGNOSTIC_IGNORE ("-Wdeprecated-register")
-# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION \
- DIAGNOSTIC_IGNORE ("-Wunused-function")
-# if __has_warning ("-Wenum-compare-switch")
-# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES \
- DIAGNOSTIC_IGNORE ("-Wenum-compare-switch")
-# endif
-
-# define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL \
- DIAGNOSTIC_IGNORE ("-Wformat-nonliteral")
-
-#elif defined (__GNUC__) /* GCC */
-
-# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION \
- DIAGNOSTIC_IGNORE ("-Wunused-function")
-
-# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
- DIAGNOSTIC_IGNORE ("-Wstringop-truncation")
-
-# define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL \
- DIAGNOSTIC_IGNORE ("-Wformat-nonliteral")
-
-#endif
-
-#ifndef DIAGNOSTIC_IGNORE_SELF_MOVE
-# define DIAGNOSTIC_IGNORE_SELF_MOVE
-#endif
-
-#ifndef DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS
-# define DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS
-#endif
-
-#ifndef DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
-# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
-#endif
-
-#ifndef DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
-# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
-#endif
-
-#ifndef DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
-# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
-#endif
-
-#ifndef DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
-# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION
-#endif
-
-#ifndef DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
-# define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
-#endif
-
-#endif /* DIAGNOSTICS_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/dis-asm.h b/lib/libc/include/generic-musl/dis-asm.h
deleted file mode 100644
index cff4b8cd5b052dce1b8dcc5b7866c96909bc53e2..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/dis-asm.h
+++ /dev/null
@@ -1,397 +0,0 @@
-/* Interface between the opcode library and its callers.
-
- Copyright (C) 1999-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA.
-
- Written by Cygnus Support, 1993.
-
- The opcode library (libopcodes.a) provides instruction decoders for
- a large variety of instruction sets, callable with an identical
- interface, for making instruction-processing programs more independent
- of the instruction set being processed. */
-
-#ifndef DIS_ASM_H
-#define DIS_ASM_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include
-#include
-#include "bfd.h"
-
- typedef int (*fprintf_ftype) (void *, const char*, ...) ATTRIBUTE_FPTR_PRINTF_2;
-
-enum dis_insn_type
-{
- dis_noninsn, /* Not a valid instruction. */
- dis_nonbranch, /* Not a branch instruction. */
- dis_branch, /* Unconditional branch. */
- dis_condbranch, /* Conditional branch. */
- dis_jsr, /* Jump to subroutine. */
- dis_condjsr, /* Conditional jump to subroutine. */
- dis_dref, /* Data reference instruction. */
- dis_dref2 /* Two data references in instruction. */
-};
-
-/* This struct is passed into the instruction decoding routine,
- and is passed back out into each callback. The various fields are used
- for conveying information from your main routine into your callbacks,
- for passing information into the instruction decoders (such as the
- addresses of the callback functions), or for passing information
- back from the instruction decoders to their callers.
-
- It must be initialized before it is first passed; this can be done
- by hand, or using one of the initialization macros below. */
-
-typedef struct disassemble_info
-{
- fprintf_ftype fprintf_func;
- void *stream;
- void *application_data;
-
- /* Target description. We could replace this with a pointer to the bfd,
- but that would require one. There currently isn't any such requirement
- so to avoid introducing one we record these explicitly. */
- /* The bfd_flavour. This can be bfd_target_unknown_flavour. */
- enum bfd_flavour flavour;
- /* The bfd_arch value. */
- enum bfd_architecture arch;
- /* The bfd_mach value. */
- unsigned long mach;
- /* Endianness (for bi-endian cpus). Mono-endian cpus can ignore this. */
- enum bfd_endian endian;
- /* Endianness of code, for mixed-endian situations such as ARM BE8. */
- enum bfd_endian endian_code;
- /* An arch/mach-specific bitmask of selected instruction subsets, mainly
- for processors with run-time-switchable instruction sets. The default,
- zero, means that there is no constraint. CGEN-based opcodes ports
- may use ISA_foo masks. */
- void *insn_sets;
-
- /* Some targets need information about the current section to accurately
- display insns. If this is NULL, the target disassembler function
- will have to make its best guess. */
- asection *section;
-
- /* An array of pointers to symbols either at the location being disassembled
- or at the start of the function being disassembled. The array is sorted
- so that the first symbol is intended to be the one used. The others are
- present for any misc. purposes. This is not set reliably, but if it is
- not NULL, it is correct. */
- asymbol **symbols;
- /* Number of symbols in array. */
- int num_symbols;
-
- /* Symbol table provided for targets that want to look at it. This is
- used on Arm to find mapping symbols and determine Arm/Thumb code. */
- asymbol **symtab;
- int symtab_pos;
- int symtab_size;
-
- /* For use by the disassembler.
- The top 16 bits are reserved for public use (and are documented here).
- The bottom 16 bits are for the internal use of the disassembler. */
- unsigned long flags;
- /* Set if the disassembler has determined that there are one or more
- relocations associated with the instruction being disassembled. */
-#define INSN_HAS_RELOC (1 << 31)
- /* Set if the user has requested the disassembly of data as well as code. */
-#define DISASSEMBLE_DATA (1 << 30)
- /* Set if the user has specifically set the machine type encoded in the
- mach field of this structure. */
-#define USER_SPECIFIED_MACHINE_TYPE (1 << 29)
-
- /* Use internally by the target specific disassembly code. */
- void *private_data;
-
- /* Function used to get bytes to disassemble. MEMADDR is the
- address of the stuff to be disassembled, MYADDR is the address to
- put the bytes in, and LENGTH is the number of bytes to read.
- INFO is a pointer to this struct.
- Returns an errno value or 0 for success. */
- int (*read_memory_func)
- (bfd_vma memaddr, bfd_byte *myaddr, unsigned int length,
- struct disassemble_info *dinfo);
-
- /* Function which should be called if we get an error that we can't
- recover from. STATUS is the errno value from read_memory_func and
- MEMADDR is the address that we were trying to read. INFO is a
- pointer to this struct. */
- void (*memory_error_func)
- (int status, bfd_vma memaddr, struct disassemble_info *dinfo);
-
- /* Function called to print ADDR. */
- void (*print_address_func)
- (bfd_vma addr, struct disassemble_info *dinfo);
-
- /* Function called to determine if there is a symbol at the given ADDR.
- If there is, the function returns 1, otherwise it returns 0.
- This is used by ports which support an overlay manager where
- the overlay number is held in the top part of an address. In
- some circumstances we want to include the overlay number in the
- address, (normally because there is a symbol associated with
- that address), but sometimes we want to mask out the overlay bits. */
- int (* symbol_at_address_func)
- (bfd_vma addr, struct disassemble_info *dinfo);
-
- /* Function called to check if a SYMBOL is can be displayed to the user.
- This is used by some ports that want to hide special symbols when
- displaying debugging outout. */
- bfd_boolean (* symbol_is_valid)
- (asymbol *, struct disassemble_info *dinfo);
-
- /* These are for buffer_read_memory. */
- bfd_byte *buffer;
- bfd_vma buffer_vma;
- size_t buffer_length;
-
- /* This variable may be set by the instruction decoder. It suggests
- the number of bytes objdump should display on a single line. If
- the instruction decoder sets this, it should always set it to
- the same value in order to get reasonable looking output. */
- int bytes_per_line;
-
- /* The next two variables control the way objdump displays the raw data. */
- /* For example, if bytes_per_line is 8 and bytes_per_chunk is 4, the */
- /* output will look like this:
- 00: 00000000 00000000
- with the chunks displayed according to "display_endian". */
- int bytes_per_chunk;
- enum bfd_endian display_endian;
-
- /* Number of octets per incremented target address
- Normally one, but some DSPs have byte sizes of 16 or 32 bits. */
- unsigned int octets_per_byte;
-
- /* The number of zeroes we want to see at the end of a section before we
- start skipping them. */
- unsigned int skip_zeroes;
-
- /* The number of zeroes to skip at the end of a section. If the number
- of zeroes at the end is between SKIP_ZEROES_AT_END and SKIP_ZEROES,
- they will be disassembled. If there are fewer than
- SKIP_ZEROES_AT_END, they will be skipped. This is a heuristic
- attempt to avoid disassembling zeroes inserted by section
- alignment. */
- unsigned int skip_zeroes_at_end;
-
- /* Whether the disassembler always needs the relocations. */
- bfd_boolean disassembler_needs_relocs;
-
- /* Results from instruction decoders. Not all decoders yet support
- this information. This info is set each time an instruction is
- decoded, and is only valid for the last such instruction.
-
- To determine whether this decoder supports this information, set
- insn_info_valid to 0, decode an instruction, then check it. */
-
- char insn_info_valid; /* Branch info has been set. */
- char branch_delay_insns; /* How many sequential insn's will run before
- a branch takes effect. (0 = normal) */
- char data_size; /* Size of data reference in insn, in bytes */
- enum dis_insn_type insn_type; /* Type of instruction */
- bfd_vma target; /* Target address of branch or dref, if known;
- zero if unknown. */
- bfd_vma target2; /* Second target address for dref2 */
-
- /* Command line options specific to the target disassembler. */
- const char *disassembler_options;
-
- /* If non-zero then try not disassemble beyond this address, even if
- there are values left in the buffer. This address is the address
- of the nearest symbol forwards from the start of the disassembly,
- and it is assumed that it lies on the boundary between instructions.
- If an instruction spans this address then this is an error in the
- file being disassembled. */
- bfd_vma stop_vma;
-
-} disassemble_info;
-
-/* This struct is used to pass information about valid disassembler
- option arguments from the target to the generic GDB functions
- that set and display them. */
-
-typedef struct
-{
- /* Option argument name to use in descriptions. */
- const char *name;
-
- /* Vector of acceptable option argument values, NULL-terminated. */
- const char **values;
-} disasm_option_arg_t;
-
-/* This struct is used to pass information about valid disassembler
- options, their descriptions and arguments from the target to the
- generic GDB functions that set and display them. Options are
- defined by tuples of vector entries at each index. */
-
-typedef struct
-{
- /* Vector of option names, NULL-terminated. */
- const char **name;
-
- /* Vector of option descriptions or NULL if none to be shown. */
- const char **description;
-
- /* Vector of option argument information pointers or NULL if no
- option accepts an argument. NULL entries denote individual
- options that accept no argument. */
- const disasm_option_arg_t **arg;
-} disasm_options_t;
-
-/* This struct is used to pass information about valid disassembler
- options and arguments from the target to the generic GDB functions
- that set and display them. */
-
-typedef struct
-{
- /* Valid disassembler options. Individual options that support
- an argument will refer to entries in the ARGS vector. */
- disasm_options_t options;
-
- /* Vector of acceptable option arguments, NULL-terminated. This
- collects all possible option argument choices, some of which
- may be shared by different options from the OPTIONS member. */
- disasm_option_arg_t *args;
-} disasm_options_and_args_t;
-
-/* Standard disassemblers. Disassemble one instruction at the given
- target address. Return number of octets processed. */
-typedef int (*disassembler_ftype) (bfd_vma, disassemble_info *);
-
-/* Disassemblers used out side of opcodes library. */
-extern int print_insn_m32c (bfd_vma, disassemble_info *);
-extern int print_insn_mep (bfd_vma, disassemble_info *);
-extern int print_insn_s12z (bfd_vma, disassemble_info *);
-extern int print_insn_sh (bfd_vma, disassemble_info *);
-extern int print_insn_sparc (bfd_vma, disassemble_info *);
-extern int print_insn_rx (bfd_vma, disassemble_info *);
-extern int print_insn_rl78 (bfd_vma, disassemble_info *);
-extern int print_insn_rl78_g10 (bfd_vma, disassemble_info *);
-extern int print_insn_rl78_g13 (bfd_vma, disassemble_info *);
-extern int print_insn_rl78_g14 (bfd_vma, disassemble_info *);
-
-extern disassembler_ftype arc_get_disassembler (bfd *);
-extern disassembler_ftype cris_get_disassembler (bfd *);
-
-extern void print_aarch64_disassembler_options (FILE *);
-extern void print_i386_disassembler_options (FILE *);
-extern void print_mips_disassembler_options (FILE *);
-extern void print_nfp_disassembler_options (FILE *);
-extern void print_ppc_disassembler_options (FILE *);
-extern void print_riscv_disassembler_options (FILE *);
-extern void print_arm_disassembler_options (FILE *);
-extern void print_arc_disassembler_options (FILE *);
-extern void print_s390_disassembler_options (FILE *);
-extern void print_wasm32_disassembler_options (FILE *);
-extern bfd_boolean aarch64_symbol_is_valid (asymbol *, struct disassemble_info *);
-extern bfd_boolean arm_symbol_is_valid (asymbol *, struct disassemble_info *);
-extern bfd_boolean csky_symbol_is_valid (asymbol *, struct disassemble_info *);
-extern bfd_boolean riscv_symbol_is_valid (asymbol *, struct disassemble_info *);
-extern void disassemble_init_powerpc (struct disassemble_info *);
-extern void disassemble_init_s390 (struct disassemble_info *);
-extern void disassemble_init_wasm32 (struct disassemble_info *);
-extern void disassemble_init_nds32 (struct disassemble_info *);
-extern const disasm_options_and_args_t *disassembler_options_arm (void);
-extern const disasm_options_and_args_t *disassembler_options_mips (void);
-extern const disasm_options_and_args_t *disassembler_options_powerpc (void);
-extern const disasm_options_and_args_t *disassembler_options_s390 (void);
-
-/* Fetch the disassembler for a given architecture ARC, endianess (big
- endian if BIG is true), bfd_mach value MACH, and ABFD, if that support
- is available. ABFD may be NULL. */
-extern disassembler_ftype disassembler (enum bfd_architecture arc,
- bfd_boolean big, unsigned long mach,
- bfd *abfd);
-
-/* Amend the disassemble_info structure as necessary for the target architecture.
- Should only be called after initialising the info->arch field. */
-extern void disassemble_init_for_target (struct disassemble_info * dinfo);
-
-/* Document any target specific options available from the disassembler. */
-extern void disassembler_usage (FILE *);
-
-/* Remove whitespace and consecutive commas. */
-extern char *remove_whitespace_and_extra_commas (char *);
-
-/* Like STRCMP, but treat ',' the same as '\0' so that we match
- strings like "foobar" against "foobar,xxyyzz,...". */
-extern int disassembler_options_cmp (const char *, const char *);
-
-/* A helper function for FOR_EACH_DISASSEMBLER_OPTION. */
-static inline const char *
-next_disassembler_option (const char *options)
-{
- const char *opt = strchr (options, ',');
- if (opt != NULL)
- opt++;
- return opt;
-}
-
-/* A macro for iterating over each comma separated option in OPTIONS. */
-#define FOR_EACH_DISASSEMBLER_OPTION(OPT, OPTIONS) \
- for ((OPT) = (OPTIONS); \
- (OPT) != NULL; \
- (OPT) = next_disassembler_option (OPT))
-
-
-/* This block of definitions is for particular callers who read instructions
- into a buffer before calling the instruction decoder. */
-
-/* Here is a function which callers may wish to use for read_memory_func.
- It gets bytes from a buffer. */
-extern int buffer_read_memory
- (bfd_vma, bfd_byte *, unsigned int, struct disassemble_info *);
-
-/* This function goes with buffer_read_memory.
- It prints a message using info->fprintf_func and info->stream. */
-extern void perror_memory (int, bfd_vma, struct disassemble_info *);
-
-
-/* Just print the address in hex. This is included for completeness even
- though both GDB and objdump provide their own (to print symbolic
- addresses). */
-extern void generic_print_address
- (bfd_vma, struct disassemble_info *);
-
-/* Always true. */
-extern int generic_symbol_at_address
- (bfd_vma, struct disassemble_info *);
-
-/* Also always true. */
-extern bfd_boolean generic_symbol_is_valid
- (asymbol *, struct disassemble_info *);
-
-/* Method to initialize a disassemble_info struct. This should be
- called by all applications creating such a struct. */
-extern void init_disassemble_info (struct disassemble_info *dinfo, void *stream,
- fprintf_ftype fprintf_func);
-
-/* For compatibility with existing code. */
-#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \
- init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC))
-#define INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) \
- init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC))
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! defined (DIS_ASM_H) */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/amdgpu_drm.h b/lib/libc/include/generic-musl/drm/amdgpu_drm.h
deleted file mode 100644
index af63e431b1aa18aa61438aeab33a6369ef4365fb..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/amdgpu_drm.h
+++ /dev/null
@@ -1,994 +0,0 @@
-/* amdgpu_drm.h -- Public header for the amdgpu driver -*- linux-c -*-
- *
- * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
- * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
- * Copyright 2014 Advanced Micro Devices, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Kevin E. Martin
- * Gareth Hughes
- * Keith Whitwell
- */
-
-#ifndef __AMDGPU_DRM_H__
-#define __AMDGPU_DRM_H__
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#define DRM_AMDGPU_GEM_CREATE 0x00
-#define DRM_AMDGPU_GEM_MMAP 0x01
-#define DRM_AMDGPU_CTX 0x02
-#define DRM_AMDGPU_BO_LIST 0x03
-#define DRM_AMDGPU_CS 0x04
-#define DRM_AMDGPU_INFO 0x05
-#define DRM_AMDGPU_GEM_METADATA 0x06
-#define DRM_AMDGPU_GEM_WAIT_IDLE 0x07
-#define DRM_AMDGPU_GEM_VA 0x08
-#define DRM_AMDGPU_WAIT_CS 0x09
-#define DRM_AMDGPU_GEM_OP 0x10
-#define DRM_AMDGPU_GEM_USERPTR 0x11
-#define DRM_AMDGPU_WAIT_FENCES 0x12
-#define DRM_AMDGPU_VM 0x13
-#define DRM_AMDGPU_FENCE_TO_HANDLE 0x14
-#define DRM_AMDGPU_SCHED 0x15
-
-#define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create)
-#define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap)
-#define DRM_IOCTL_AMDGPU_CTX DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CTX, union drm_amdgpu_ctx)
-#define DRM_IOCTL_AMDGPU_BO_LIST DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_BO_LIST, union drm_amdgpu_bo_list)
-#define DRM_IOCTL_AMDGPU_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CS, union drm_amdgpu_cs)
-#define DRM_IOCTL_AMDGPU_INFO DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_INFO, struct drm_amdgpu_info)
-#define DRM_IOCTL_AMDGPU_GEM_METADATA DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_METADATA, struct drm_amdgpu_gem_metadata)
-#define DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_WAIT_IDLE, union drm_amdgpu_gem_wait_idle)
-#define DRM_IOCTL_AMDGPU_GEM_VA DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_VA, struct drm_amdgpu_gem_va)
-#define DRM_IOCTL_AMDGPU_WAIT_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_CS, union drm_amdgpu_wait_cs)
-#define DRM_IOCTL_AMDGPU_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_OP, struct drm_amdgpu_gem_op)
-#define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr)
-#define DRM_IOCTL_AMDGPU_WAIT_FENCES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, union drm_amdgpu_wait_fences)
-#define DRM_IOCTL_AMDGPU_VM DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_VM, union drm_amdgpu_vm)
-#define DRM_IOCTL_AMDGPU_FENCE_TO_HANDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_FENCE_TO_HANDLE, union drm_amdgpu_fence_to_handle)
-#define DRM_IOCTL_AMDGPU_SCHED DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_SCHED, union drm_amdgpu_sched)
-
-/**
- * DOC: memory domains
- *
- * %AMDGPU_GEM_DOMAIN_CPU System memory that is not GPU accessible.
- * Memory in this pool could be swapped out to disk if there is pressure.
- *
- * %AMDGPU_GEM_DOMAIN_GTT GPU accessible system memory, mapped into the
- * GPU's virtual address space via gart. Gart memory linearizes non-contiguous
- * pages of system memory, allows GPU access system memory in a linezrized
- * fashion.
- *
- * %AMDGPU_GEM_DOMAIN_VRAM Local video memory. For APUs, it is memory
- * carved out by the BIOS.
- *
- * %AMDGPU_GEM_DOMAIN_GDS Global on-chip data storage used to share data
- * across shader threads.
- *
- * %AMDGPU_GEM_DOMAIN_GWS Global wave sync, used to synchronize the
- * execution of all the waves on a device.
- *
- * %AMDGPU_GEM_DOMAIN_OA Ordered append, used by 3D or Compute engines
- * for appending data.
- */
-#define AMDGPU_GEM_DOMAIN_CPU 0x1
-#define AMDGPU_GEM_DOMAIN_GTT 0x2
-#define AMDGPU_GEM_DOMAIN_VRAM 0x4
-#define AMDGPU_GEM_DOMAIN_GDS 0x8
-#define AMDGPU_GEM_DOMAIN_GWS 0x10
-#define AMDGPU_GEM_DOMAIN_OA 0x20
-#define AMDGPU_GEM_DOMAIN_MASK (AMDGPU_GEM_DOMAIN_CPU | \
- AMDGPU_GEM_DOMAIN_GTT | \
- AMDGPU_GEM_DOMAIN_VRAM | \
- AMDGPU_GEM_DOMAIN_GDS | \
- AMDGPU_GEM_DOMAIN_GWS | \
- AMDGPU_GEM_DOMAIN_OA)
-
-/* Flag that CPU access will be required for the case of VRAM domain */
-#define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0)
-/* Flag that CPU access will not work, this VRAM domain is invisible */
-#define AMDGPU_GEM_CREATE_NO_CPU_ACCESS (1 << 1)
-/* Flag that USWC attributes should be used for GTT */
-#define AMDGPU_GEM_CREATE_CPU_GTT_USWC (1 << 2)
-/* Flag that the memory should be in VRAM and cleared */
-#define AMDGPU_GEM_CREATE_VRAM_CLEARED (1 << 3)
-/* Flag that create shadow bo(GTT) while allocating vram bo */
-#define AMDGPU_GEM_CREATE_SHADOW (1 << 4)
-/* Flag that allocating the BO should use linear VRAM */
-#define AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS (1 << 5)
-/* Flag that BO is always valid in this VM */
-#define AMDGPU_GEM_CREATE_VM_ALWAYS_VALID (1 << 6)
-/* Flag that BO sharing will be explicitly synchronized */
-#define AMDGPU_GEM_CREATE_EXPLICIT_SYNC (1 << 7)
-/* Flag that indicates allocating MQD gart on GFX9, where the mtype
- * for the second page onward should be set to NC.
- */
-#define AMDGPU_GEM_CREATE_MQD_GFX9 (1 << 8)
-
-struct drm_amdgpu_gem_create_in {
- /** the requested memory size */
- __u64 bo_size;
- /** physical start_addr alignment in bytes for some HW requirements */
- __u64 alignment;
- /** the requested memory domains */
- __u64 domains;
- /** allocation flags */
- __u64 domain_flags;
-};
-
-struct drm_amdgpu_gem_create_out {
- /** returned GEM object handle */
- __u32 handle;
- __u32 _pad;
-};
-
-union drm_amdgpu_gem_create {
- struct drm_amdgpu_gem_create_in in;
- struct drm_amdgpu_gem_create_out out;
-};
-
-/** Opcode to create new residency list. */
-#define AMDGPU_BO_LIST_OP_CREATE 0
-/** Opcode to destroy previously created residency list */
-#define AMDGPU_BO_LIST_OP_DESTROY 1
-/** Opcode to update resource information in the list */
-#define AMDGPU_BO_LIST_OP_UPDATE 2
-
-struct drm_amdgpu_bo_list_in {
- /** Type of operation */
- __u32 operation;
- /** Handle of list or 0 if we want to create one */
- __u32 list_handle;
- /** Number of BOs in list */
- __u32 bo_number;
- /** Size of each element describing BO */
- __u32 bo_info_size;
- /** Pointer to array describing BOs */
- __u64 bo_info_ptr;
-};
-
-struct drm_amdgpu_bo_list_entry {
- /** Handle of BO */
- __u32 bo_handle;
- /** New (if specified) BO priority to be used during migration */
- __u32 bo_priority;
-};
-
-struct drm_amdgpu_bo_list_out {
- /** Handle of resource list */
- __u32 list_handle;
- __u32 _pad;
-};
-
-union drm_amdgpu_bo_list {
- struct drm_amdgpu_bo_list_in in;
- struct drm_amdgpu_bo_list_out out;
-};
-
-/* context related */
-#define AMDGPU_CTX_OP_ALLOC_CTX 1
-#define AMDGPU_CTX_OP_FREE_CTX 2
-#define AMDGPU_CTX_OP_QUERY_STATE 3
-#define AMDGPU_CTX_OP_QUERY_STATE2 4
-
-/* GPU reset status */
-#define AMDGPU_CTX_NO_RESET 0
-/* this the context caused it */
-#define AMDGPU_CTX_GUILTY_RESET 1
-/* some other context caused it */
-#define AMDGPU_CTX_INNOCENT_RESET 2
-/* unknown cause */
-#define AMDGPU_CTX_UNKNOWN_RESET 3
-
-/* indicate gpu reset occured after ctx created */
-#define AMDGPU_CTX_QUERY2_FLAGS_RESET (1<<0)
-/* indicate vram lost occured after ctx created */
-#define AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST (1<<1)
-/* indicate some job from this context once cause gpu hang */
-#define AMDGPU_CTX_QUERY2_FLAGS_GUILTY (1<<2)
-
-/* Context priority level */
-#define AMDGPU_CTX_PRIORITY_UNSET -2048
-#define AMDGPU_CTX_PRIORITY_VERY_LOW -1023
-#define AMDGPU_CTX_PRIORITY_LOW -512
-#define AMDGPU_CTX_PRIORITY_NORMAL 0
-/* Selecting a priority above NORMAL requires CAP_SYS_NICE or DRM_MASTER */
-#define AMDGPU_CTX_PRIORITY_HIGH 512
-#define AMDGPU_CTX_PRIORITY_VERY_HIGH 1023
-
-struct drm_amdgpu_ctx_in {
- /** AMDGPU_CTX_OP_* */
- __u32 op;
- /** For future use, no flags defined so far */
- __u32 flags;
- __u32 ctx_id;
- __s32 priority;
-};
-
-union drm_amdgpu_ctx_out {
- struct {
- __u32 ctx_id;
- __u32 _pad;
- } alloc;
-
- struct {
- /** For future use, no flags defined so far */
- __u64 flags;
- /** Number of resets caused by this context so far. */
- __u32 hangs;
- /** Reset status since the last call of the ioctl. */
- __u32 reset_status;
- } state;
-};
-
-union drm_amdgpu_ctx {
- struct drm_amdgpu_ctx_in in;
- union drm_amdgpu_ctx_out out;
-};
-
-/* vm ioctl */
-#define AMDGPU_VM_OP_RESERVE_VMID 1
-#define AMDGPU_VM_OP_UNRESERVE_VMID 2
-
-struct drm_amdgpu_vm_in {
- /** AMDGPU_VM_OP_* */
- __u32 op;
- __u32 flags;
-};
-
-struct drm_amdgpu_vm_out {
- /** For future use, no flags defined so far */
- __u64 flags;
-};
-
-union drm_amdgpu_vm {
- struct drm_amdgpu_vm_in in;
- struct drm_amdgpu_vm_out out;
-};
-
-/* sched ioctl */
-#define AMDGPU_SCHED_OP_PROCESS_PRIORITY_OVERRIDE 1
-
-struct drm_amdgpu_sched_in {
- /* AMDGPU_SCHED_OP_* */
- __u32 op;
- __u32 fd;
- __s32 priority;
- __u32 flags;
-};
-
-union drm_amdgpu_sched {
- struct drm_amdgpu_sched_in in;
-};
-
-/*
- * This is not a reliable API and you should expect it to fail for any
- * number of reasons and have fallback path that do not use userptr to
- * perform any operation.
- */
-#define AMDGPU_GEM_USERPTR_READONLY (1 << 0)
-#define AMDGPU_GEM_USERPTR_ANONONLY (1 << 1)
-#define AMDGPU_GEM_USERPTR_VALIDATE (1 << 2)
-#define AMDGPU_GEM_USERPTR_REGISTER (1 << 3)
-
-struct drm_amdgpu_gem_userptr {
- __u64 addr;
- __u64 size;
- /* AMDGPU_GEM_USERPTR_* */
- __u32 flags;
- /* Resulting GEM handle */
- __u32 handle;
-};
-
-/* SI-CI-VI: */
-/* same meaning as the GB_TILE_MODE and GL_MACRO_TILE_MODE fields */
-#define AMDGPU_TILING_ARRAY_MODE_SHIFT 0
-#define AMDGPU_TILING_ARRAY_MODE_MASK 0xf
-#define AMDGPU_TILING_PIPE_CONFIG_SHIFT 4
-#define AMDGPU_TILING_PIPE_CONFIG_MASK 0x1f
-#define AMDGPU_TILING_TILE_SPLIT_SHIFT 9
-#define AMDGPU_TILING_TILE_SPLIT_MASK 0x7
-#define AMDGPU_TILING_MICRO_TILE_MODE_SHIFT 12
-#define AMDGPU_TILING_MICRO_TILE_MODE_MASK 0x7
-#define AMDGPU_TILING_BANK_WIDTH_SHIFT 15
-#define AMDGPU_TILING_BANK_WIDTH_MASK 0x3
-#define AMDGPU_TILING_BANK_HEIGHT_SHIFT 17
-#define AMDGPU_TILING_BANK_HEIGHT_MASK 0x3
-#define AMDGPU_TILING_MACRO_TILE_ASPECT_SHIFT 19
-#define AMDGPU_TILING_MACRO_TILE_ASPECT_MASK 0x3
-#define AMDGPU_TILING_NUM_BANKS_SHIFT 21
-#define AMDGPU_TILING_NUM_BANKS_MASK 0x3
-
-/* GFX9 and later: */
-#define AMDGPU_TILING_SWIZZLE_MODE_SHIFT 0
-#define AMDGPU_TILING_SWIZZLE_MODE_MASK 0x1f
-
-/* Set/Get helpers for tiling flags. */
-#define AMDGPU_TILING_SET(field, value) \
- (((__u64)(value) & AMDGPU_TILING_##field##_MASK) << AMDGPU_TILING_##field##_SHIFT)
-#define AMDGPU_TILING_GET(value, field) \
- (((__u64)(value) >> AMDGPU_TILING_##field##_SHIFT) & AMDGPU_TILING_##field##_MASK)
-
-#define AMDGPU_GEM_METADATA_OP_SET_METADATA 1
-#define AMDGPU_GEM_METADATA_OP_GET_METADATA 2
-
-/** The same structure is shared for input/output */
-struct drm_amdgpu_gem_metadata {
- /** GEM Object handle */
- __u32 handle;
- /** Do we want get or set metadata */
- __u32 op;
- struct {
- /** For future use, no flags defined so far */
- __u64 flags;
- /** family specific tiling info */
- __u64 tiling_info;
- __u32 data_size_bytes;
- __u32 data[64];
- } data;
-};
-
-struct drm_amdgpu_gem_mmap_in {
- /** the GEM object handle */
- __u32 handle;
- __u32 _pad;
-};
-
-struct drm_amdgpu_gem_mmap_out {
- /** mmap offset from the vma offset manager */
- __u64 addr_ptr;
-};
-
-union drm_amdgpu_gem_mmap {
- struct drm_amdgpu_gem_mmap_in in;
- struct drm_amdgpu_gem_mmap_out out;
-};
-
-struct drm_amdgpu_gem_wait_idle_in {
- /** GEM object handle */
- __u32 handle;
- /** For future use, no flags defined so far */
- __u32 flags;
- /** Absolute timeout to wait */
- __u64 timeout;
-};
-
-struct drm_amdgpu_gem_wait_idle_out {
- /** BO status: 0 - BO is idle, 1 - BO is busy */
- __u32 status;
- /** Returned current memory domain */
- __u32 domain;
-};
-
-union drm_amdgpu_gem_wait_idle {
- struct drm_amdgpu_gem_wait_idle_in in;
- struct drm_amdgpu_gem_wait_idle_out out;
-};
-
-struct drm_amdgpu_wait_cs_in {
- /* Command submission handle
- * handle equals 0 means none to wait for
- * handle equals ~0ull means wait for the latest sequence number
- */
- __u64 handle;
- /** Absolute timeout to wait */
- __u64 timeout;
- __u32 ip_type;
- __u32 ip_instance;
- __u32 ring;
- __u32 ctx_id;
-};
-
-struct drm_amdgpu_wait_cs_out {
- /** CS status: 0 - CS completed, 1 - CS still busy */
- __u64 status;
-};
-
-union drm_amdgpu_wait_cs {
- struct drm_amdgpu_wait_cs_in in;
- struct drm_amdgpu_wait_cs_out out;
-};
-
-struct drm_amdgpu_fence {
- __u32 ctx_id;
- __u32 ip_type;
- __u32 ip_instance;
- __u32 ring;
- __u64 seq_no;
-};
-
-struct drm_amdgpu_wait_fences_in {
- /** This points to uint64_t * which points to fences */
- __u64 fences;
- __u32 fence_count;
- __u32 wait_all;
- __u64 timeout_ns;
-};
-
-struct drm_amdgpu_wait_fences_out {
- __u32 status;
- __u32 first_signaled;
-};
-
-union drm_amdgpu_wait_fences {
- struct drm_amdgpu_wait_fences_in in;
- struct drm_amdgpu_wait_fences_out out;
-};
-
-#define AMDGPU_GEM_OP_GET_GEM_CREATE_INFO 0
-#define AMDGPU_GEM_OP_SET_PLACEMENT 1
-
-/* Sets or returns a value associated with a buffer. */
-struct drm_amdgpu_gem_op {
- /** GEM object handle */
- __u32 handle;
- /** AMDGPU_GEM_OP_* */
- __u32 op;
- /** Input or return value */
- __u64 value;
-};
-
-#define AMDGPU_VA_OP_MAP 1
-#define AMDGPU_VA_OP_UNMAP 2
-#define AMDGPU_VA_OP_CLEAR 3
-#define AMDGPU_VA_OP_REPLACE 4
-
-/* Delay the page table update till the next CS */
-#define AMDGPU_VM_DELAY_UPDATE (1 << 0)
-
-/* Mapping flags */
-/* readable mapping */
-#define AMDGPU_VM_PAGE_READABLE (1 << 1)
-/* writable mapping */
-#define AMDGPU_VM_PAGE_WRITEABLE (1 << 2)
-/* executable mapping, new for VI */
-#define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3)
-/* partially resident texture */
-#define AMDGPU_VM_PAGE_PRT (1 << 4)
-/* MTYPE flags use bit 5 to 8 */
-#define AMDGPU_VM_MTYPE_MASK (0xf << 5)
-/* Default MTYPE. Pre-AI must use this. Recommended for newer ASICs. */
-#define AMDGPU_VM_MTYPE_DEFAULT (0 << 5)
-/* Use NC MTYPE instead of default MTYPE */
-#define AMDGPU_VM_MTYPE_NC (1 << 5)
-/* Use WC MTYPE instead of default MTYPE */
-#define AMDGPU_VM_MTYPE_WC (2 << 5)
-/* Use CC MTYPE instead of default MTYPE */
-#define AMDGPU_VM_MTYPE_CC (3 << 5)
-/* Use UC MTYPE instead of default MTYPE */
-#define AMDGPU_VM_MTYPE_UC (4 << 5)
-
-struct drm_amdgpu_gem_va {
- /** GEM object handle */
- __u32 handle;
- __u32 _pad;
- /** AMDGPU_VA_OP_* */
- __u32 operation;
- /** AMDGPU_VM_PAGE_* */
- __u32 flags;
- /** va address to assign . Must be correctly aligned.*/
- __u64 va_address;
- /** Specify offset inside of BO to assign. Must be correctly aligned.*/
- __u64 offset_in_bo;
- /** Specify mapping size. Must be correctly aligned. */
- __u64 map_size;
-};
-
-#define AMDGPU_HW_IP_GFX 0
-#define AMDGPU_HW_IP_COMPUTE 1
-#define AMDGPU_HW_IP_DMA 2
-#define AMDGPU_HW_IP_UVD 3
-#define AMDGPU_HW_IP_VCE 4
-#define AMDGPU_HW_IP_UVD_ENC 5
-#define AMDGPU_HW_IP_VCN_DEC 6
-#define AMDGPU_HW_IP_VCN_ENC 7
-#define AMDGPU_HW_IP_VCN_JPEG 8
-#define AMDGPU_HW_IP_NUM 9
-
-#define AMDGPU_HW_IP_INSTANCE_MAX_COUNT 1
-
-#define AMDGPU_CHUNK_ID_IB 0x01
-#define AMDGPU_CHUNK_ID_FENCE 0x02
-#define AMDGPU_CHUNK_ID_DEPENDENCIES 0x03
-#define AMDGPU_CHUNK_ID_SYNCOBJ_IN 0x04
-#define AMDGPU_CHUNK_ID_SYNCOBJ_OUT 0x05
-#define AMDGPU_CHUNK_ID_BO_HANDLES 0x06
-
-struct drm_amdgpu_cs_chunk {
- __u32 chunk_id;
- __u32 length_dw;
- __u64 chunk_data;
-};
-
-struct drm_amdgpu_cs_in {
- /** Rendering context id */
- __u32 ctx_id;
- /** Handle of resource list associated with CS */
- __u32 bo_list_handle;
- __u32 num_chunks;
- __u32 _pad;
- /** this points to __u64 * which point to cs chunks */
- __u64 chunks;
-};
-
-struct drm_amdgpu_cs_out {
- __u64 handle;
-};
-
-union drm_amdgpu_cs {
- struct drm_amdgpu_cs_in in;
- struct drm_amdgpu_cs_out out;
-};
-
-/* Specify flags to be used for IB */
-
-/* This IB should be submitted to CE */
-#define AMDGPU_IB_FLAG_CE (1<<0)
-
-/* Preamble flag, which means the IB could be dropped if no context switch */
-#define AMDGPU_IB_FLAG_PREAMBLE (1<<1)
-
-/* Preempt flag, IB should set Pre_enb bit if PREEMPT flag detected */
-#define AMDGPU_IB_FLAG_PREEMPT (1<<2)
-
-/* The IB fence should do the L2 writeback but not invalidate any shader
- * caches (L2/vL1/sL1/I$). */
-#define AMDGPU_IB_FLAG_TC_WB_NOT_INVALIDATE (1 << 3)
-
-struct drm_amdgpu_cs_chunk_ib {
- __u32 _pad;
- /** AMDGPU_IB_FLAG_* */
- __u32 flags;
- /** Virtual address to begin IB execution */
- __u64 va_start;
- /** Size of submission */
- __u32 ib_bytes;
- /** HW IP to submit to */
- __u32 ip_type;
- /** HW IP index of the same type to submit to */
- __u32 ip_instance;
- /** Ring index to submit to */
- __u32 ring;
-};
-
-struct drm_amdgpu_cs_chunk_dep {
- __u32 ip_type;
- __u32 ip_instance;
- __u32 ring;
- __u32 ctx_id;
- __u64 handle;
-};
-
-struct drm_amdgpu_cs_chunk_fence {
- __u32 handle;
- __u32 offset;
-};
-
-struct drm_amdgpu_cs_chunk_sem {
- __u32 handle;
-};
-
-#define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ 0
-#define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ_FD 1
-#define AMDGPU_FENCE_TO_HANDLE_GET_SYNC_FILE_FD 2
-
-union drm_amdgpu_fence_to_handle {
- struct {
- struct drm_amdgpu_fence fence;
- __u32 what;
- __u32 pad;
- } in;
- struct {
- __u32 handle;
- } out;
-};
-
-struct drm_amdgpu_cs_chunk_data {
- union {
- struct drm_amdgpu_cs_chunk_ib ib_data;
- struct drm_amdgpu_cs_chunk_fence fence_data;
- };
-};
-
-/**
- * Query h/w info: Flag that this is integrated (a.h.a. fusion) GPU
- *
- */
-#define AMDGPU_IDS_FLAGS_FUSION 0x1
-#define AMDGPU_IDS_FLAGS_PREEMPTION 0x2
-
-/* indicate if acceleration can be working */
-#define AMDGPU_INFO_ACCEL_WORKING 0x00
-/* get the crtc_id from the mode object id? */
-#define AMDGPU_INFO_CRTC_FROM_ID 0x01
-/* query hw IP info */
-#define AMDGPU_INFO_HW_IP_INFO 0x02
-/* query hw IP instance count for the specified type */
-#define AMDGPU_INFO_HW_IP_COUNT 0x03
-/* timestamp for GL_ARB_timer_query */
-#define AMDGPU_INFO_TIMESTAMP 0x05
-/* Query the firmware version */
-#define AMDGPU_INFO_FW_VERSION 0x0e
- /* Subquery id: Query VCE firmware version */
- #define AMDGPU_INFO_FW_VCE 0x1
- /* Subquery id: Query UVD firmware version */
- #define AMDGPU_INFO_FW_UVD 0x2
- /* Subquery id: Query GMC firmware version */
- #define AMDGPU_INFO_FW_GMC 0x03
- /* Subquery id: Query GFX ME firmware version */
- #define AMDGPU_INFO_FW_GFX_ME 0x04
- /* Subquery id: Query GFX PFP firmware version */
- #define AMDGPU_INFO_FW_GFX_PFP 0x05
- /* Subquery id: Query GFX CE firmware version */
- #define AMDGPU_INFO_FW_GFX_CE 0x06
- /* Subquery id: Query GFX RLC firmware version */
- #define AMDGPU_INFO_FW_GFX_RLC 0x07
- /* Subquery id: Query GFX MEC firmware version */
- #define AMDGPU_INFO_FW_GFX_MEC 0x08
- /* Subquery id: Query SMC firmware version */
- #define AMDGPU_INFO_FW_SMC 0x0a
- /* Subquery id: Query SDMA firmware version */
- #define AMDGPU_INFO_FW_SDMA 0x0b
- /* Subquery id: Query PSP SOS firmware version */
- #define AMDGPU_INFO_FW_SOS 0x0c
- /* Subquery id: Query PSP ASD firmware version */
- #define AMDGPU_INFO_FW_ASD 0x0d
- /* Subquery id: Query VCN firmware version */
- #define AMDGPU_INFO_FW_VCN 0x0e
- /* Subquery id: Query GFX RLC SRLC firmware version */
- #define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_CNTL 0x0f
- /* Subquery id: Query GFX RLC SRLG firmware version */
- #define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_GPM_MEM 0x10
- /* Subquery id: Query GFX RLC SRLS firmware version */
- #define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_SRM_MEM 0x11
-/* number of bytes moved for TTM migration */
-#define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f
-/* the used VRAM size */
-#define AMDGPU_INFO_VRAM_USAGE 0x10
-/* the used GTT size */
-#define AMDGPU_INFO_GTT_USAGE 0x11
-/* Information about GDS, etc. resource configuration */
-#define AMDGPU_INFO_GDS_CONFIG 0x13
-/* Query information about VRAM and GTT domains */
-#define AMDGPU_INFO_VRAM_GTT 0x14
-/* Query information about register in MMR address space*/
-#define AMDGPU_INFO_READ_MMR_REG 0x15
-/* Query information about device: rev id, family, etc. */
-#define AMDGPU_INFO_DEV_INFO 0x16
-/* visible vram usage */
-#define AMDGPU_INFO_VIS_VRAM_USAGE 0x17
-/* number of TTM buffer evictions */
-#define AMDGPU_INFO_NUM_EVICTIONS 0x18
-/* Query memory about VRAM and GTT domains */
-#define AMDGPU_INFO_MEMORY 0x19
-/* Query vce clock table */
-#define AMDGPU_INFO_VCE_CLOCK_TABLE 0x1A
-/* Query vbios related information */
-#define AMDGPU_INFO_VBIOS 0x1B
- /* Subquery id: Query vbios size */
- #define AMDGPU_INFO_VBIOS_SIZE 0x1
- /* Subquery id: Query vbios image */
- #define AMDGPU_INFO_VBIOS_IMAGE 0x2
-/* Query UVD handles */
-#define AMDGPU_INFO_NUM_HANDLES 0x1C
-/* Query sensor related information */
-#define AMDGPU_INFO_SENSOR 0x1D
- /* Subquery id: Query GPU shader clock */
- #define AMDGPU_INFO_SENSOR_GFX_SCLK 0x1
- /* Subquery id: Query GPU memory clock */
- #define AMDGPU_INFO_SENSOR_GFX_MCLK 0x2
- /* Subquery id: Query GPU temperature */
- #define AMDGPU_INFO_SENSOR_GPU_TEMP 0x3
- /* Subquery id: Query GPU load */
- #define AMDGPU_INFO_SENSOR_GPU_LOAD 0x4
- /* Subquery id: Query average GPU power */
- #define AMDGPU_INFO_SENSOR_GPU_AVG_POWER 0x5
- /* Subquery id: Query northbridge voltage */
- #define AMDGPU_INFO_SENSOR_VDDNB 0x6
- /* Subquery id: Query graphics voltage */
- #define AMDGPU_INFO_SENSOR_VDDGFX 0x7
- /* Subquery id: Query GPU stable pstate shader clock */
- #define AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_SCLK 0x8
- /* Subquery id: Query GPU stable pstate memory clock */
- #define AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_MCLK 0x9
-/* Number of VRAM page faults on CPU access. */
-#define AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS 0x1E
-#define AMDGPU_INFO_VRAM_LOST_COUNTER 0x1F
-
-#define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0
-#define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff
-#define AMDGPU_INFO_MMR_SH_INDEX_SHIFT 8
-#define AMDGPU_INFO_MMR_SH_INDEX_MASK 0xff
-
-struct drm_amdgpu_query_fw {
- /** AMDGPU_INFO_FW_* */
- __u32 fw_type;
- /**
- * Index of the IP if there are more IPs of
- * the same type.
- */
- __u32 ip_instance;
- /**
- * Index of the engine. Whether this is used depends
- * on the firmware type. (e.g. MEC, SDMA)
- */
- __u32 index;
- __u32 _pad;
-};
-
-/* Input structure for the INFO ioctl */
-struct drm_amdgpu_info {
- /* Where the return value will be stored */
- __u64 return_pointer;
- /* The size of the return value. Just like "size" in "snprintf",
- * it limits how many bytes the kernel can write. */
- __u32 return_size;
- /* The query request id. */
- __u32 query;
-
- union {
- struct {
- __u32 id;
- __u32 _pad;
- } mode_crtc;
-
- struct {
- /** AMDGPU_HW_IP_* */
- __u32 type;
- /**
- * Index of the IP if there are more IPs of the same
- * type. Ignored by AMDGPU_INFO_HW_IP_COUNT.
- */
- __u32 ip_instance;
- } query_hw_ip;
-
- struct {
- __u32 dword_offset;
- /** number of registers to read */
- __u32 count;
- __u32 instance;
- /** For future use, no flags defined so far */
- __u32 flags;
- } read_mmr_reg;
-
- struct drm_amdgpu_query_fw query_fw;
-
- struct {
- __u32 type;
- __u32 offset;
- } vbios_info;
-
- struct {
- __u32 type;
- } sensor_info;
- };
-};
-
-struct drm_amdgpu_info_gds {
- /** GDS GFX partition size */
- __u32 gds_gfx_partition_size;
- /** GDS compute partition size */
- __u32 compute_partition_size;
- /** total GDS memory size */
- __u32 gds_total_size;
- /** GWS size per GFX partition */
- __u32 gws_per_gfx_partition;
- /** GSW size per compute partition */
- __u32 gws_per_compute_partition;
- /** OA size per GFX partition */
- __u32 oa_per_gfx_partition;
- /** OA size per compute partition */
- __u32 oa_per_compute_partition;
- __u32 _pad;
-};
-
-struct drm_amdgpu_info_vram_gtt {
- __u64 vram_size;
- __u64 vram_cpu_accessible_size;
- __u64 gtt_size;
-};
-
-struct drm_amdgpu_heap_info {
- /** max. physical memory */
- __u64 total_heap_size;
-
- /** Theoretical max. available memory in the given heap */
- __u64 usable_heap_size;
-
- /**
- * Number of bytes allocated in the heap. This includes all processes
- * and private allocations in the kernel. It changes when new buffers
- * are allocated, freed, and moved. It cannot be larger than
- * heap_size.
- */
- __u64 heap_usage;
-
- /**
- * Theoretical possible max. size of buffer which
- * could be allocated in the given heap
- */
- __u64 max_allocation;
-};
-
-struct drm_amdgpu_memory_info {
- struct drm_amdgpu_heap_info vram;
- struct drm_amdgpu_heap_info cpu_accessible_vram;
- struct drm_amdgpu_heap_info gtt;
-};
-
-struct drm_amdgpu_info_firmware {
- __u32 ver;
- __u32 feature;
-};
-
-#define AMDGPU_VRAM_TYPE_UNKNOWN 0
-#define AMDGPU_VRAM_TYPE_GDDR1 1
-#define AMDGPU_VRAM_TYPE_DDR2 2
-#define AMDGPU_VRAM_TYPE_GDDR3 3
-#define AMDGPU_VRAM_TYPE_GDDR4 4
-#define AMDGPU_VRAM_TYPE_GDDR5 5
-#define AMDGPU_VRAM_TYPE_HBM 6
-#define AMDGPU_VRAM_TYPE_DDR3 7
-#define AMDGPU_VRAM_TYPE_DDR4 8
-
-struct drm_amdgpu_info_device {
- /** PCI Device ID */
- __u32 device_id;
- /** Internal chip revision: A0, A1, etc.) */
- __u32 chip_rev;
- __u32 external_rev;
- /** Revision id in PCI Config space */
- __u32 pci_rev;
- __u32 family;
- __u32 num_shader_engines;
- __u32 num_shader_arrays_per_engine;
- /* in KHz */
- __u32 gpu_counter_freq;
- __u64 max_engine_clock;
- __u64 max_memory_clock;
- /* cu information */
- __u32 cu_active_number;
- /* NOTE: cu_ao_mask is INVALID, DON'T use it */
- __u32 cu_ao_mask;
- __u32 cu_bitmap[4][4];
- /** Render backend pipe mask. One render backend is CB+DB. */
- __u32 enabled_rb_pipes_mask;
- __u32 num_rb_pipes;
- __u32 num_hw_gfx_contexts;
- __u32 _pad;
- __u64 ids_flags;
- /** Starting virtual address for UMDs. */
- __u64 virtual_address_offset;
- /** The maximum virtual address */
- __u64 virtual_address_max;
- /** Required alignment of virtual addresses. */
- __u32 virtual_address_alignment;
- /** Page table entry - fragment size */
- __u32 pte_fragment_size;
- __u32 gart_page_size;
- /** constant engine ram size*/
- __u32 ce_ram_size;
- /** video memory type info*/
- __u32 vram_type;
- /** video memory bit width*/
- __u32 vram_bit_width;
- /* vce harvesting instance */
- __u32 vce_harvest_config;
- /* gfx double offchip LDS buffers */
- __u32 gc_double_offchip_lds_buf;
- /* NGG Primitive Buffer */
- __u64 prim_buf_gpu_addr;
- /* NGG Position Buffer */
- __u64 pos_buf_gpu_addr;
- /* NGG Control Sideband */
- __u64 cntl_sb_buf_gpu_addr;
- /* NGG Parameter Cache */
- __u64 param_buf_gpu_addr;
- __u32 prim_buf_size;
- __u32 pos_buf_size;
- __u32 cntl_sb_buf_size;
- __u32 param_buf_size;
- /* wavefront size*/
- __u32 wave_front_size;
- /* shader visible vgprs*/
- __u32 num_shader_visible_vgprs;
- /* CU per shader array*/
- __u32 num_cu_per_sh;
- /* number of tcc blocks*/
- __u32 num_tcc_blocks;
- /* gs vgt table depth*/
- __u32 gs_vgt_table_depth;
- /* gs primitive buffer depth*/
- __u32 gs_prim_buffer_depth;
- /* max gs wavefront per vgt*/
- __u32 max_gs_waves_per_vgt;
- __u32 _pad1;
- /* always on cu bitmap */
- __u32 cu_ao_bitmap[4][4];
- /** Starting high virtual address for UMDs. */
- __u64 high_va_offset;
- /** The maximum high virtual address */
- __u64 high_va_max;
-};
-
-struct drm_amdgpu_info_hw_ip {
- /** Version of h/w IP */
- __u32 hw_ip_version_major;
- __u32 hw_ip_version_minor;
- /** Capabilities */
- __u64 capabilities_flags;
- /** command buffer address start alignment*/
- __u32 ib_start_alignment;
- /** command buffer size alignment*/
- __u32 ib_size_alignment;
- /** Bitmask of available rings. Bit 0 means ring 0, etc. */
- __u32 available_rings;
- __u32 _pad;
-};
-
-struct drm_amdgpu_info_num_handles {
- /** Max handles as supported by firmware for UVD */
- __u32 uvd_max_handles;
- /** Handles currently in use for UVD */
- __u32 uvd_used_handles;
-};
-
-#define AMDGPU_VCE_CLOCK_TABLE_ENTRIES 6
-
-struct drm_amdgpu_info_vce_clock_table_entry {
- /** System clock */
- __u32 sclk;
- /** Memory clock */
- __u32 mclk;
- /** VCE clock */
- __u32 eclk;
- __u32 pad;
-};
-
-struct drm_amdgpu_info_vce_clock_table {
- struct drm_amdgpu_info_vce_clock_table_entry entries[AMDGPU_VCE_CLOCK_TABLE_ENTRIES];
- __u32 num_valid_entries;
- __u32 pad;
-};
-
-/*
- * Supported GPU families
- */
-#define AMDGPU_FAMILY_UNKNOWN 0
-#define AMDGPU_FAMILY_SI 110 /* Hainan, Oland, Verde, Pitcairn, Tahiti */
-#define AMDGPU_FAMILY_CI 120 /* Bonaire, Hawaii */
-#define AMDGPU_FAMILY_KV 125 /* Kaveri, Kabini, Mullins */
-#define AMDGPU_FAMILY_VI 130 /* Iceland, Tonga */
-#define AMDGPU_FAMILY_CZ 135 /* Carrizo, Stoney */
-#define AMDGPU_FAMILY_AI 141 /* Vega10 */
-#define AMDGPU_FAMILY_RV 142 /* Raven */
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/armada_drm.h b/lib/libc/include/generic-musl/drm/armada_drm.h
deleted file mode 100644
index e669f2e8d5919631a9cf7af6f8e92ec5c6c9d9e9..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/armada_drm.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
- * Copyright (C) 2012 Russell King
- * With inspiration from the i915 driver
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#ifndef DRM_ARMADA_IOCTL_H
-#define DRM_ARMADA_IOCTL_H
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#define DRM_ARMADA_GEM_CREATE 0x00
-#define DRM_ARMADA_GEM_MMAP 0x02
-#define DRM_ARMADA_GEM_PWRITE 0x03
-
-#define ARMADA_IOCTL(dir, name, str) \
- DRM_##dir(DRM_COMMAND_BASE + DRM_ARMADA_##name, struct drm_armada_##str)
-
-struct drm_armada_gem_create {
- __u32 handle;
- __u32 size;
-};
-#define DRM_IOCTL_ARMADA_GEM_CREATE \
- ARMADA_IOCTL(IOWR, GEM_CREATE, gem_create)
-
-struct drm_armada_gem_mmap {
- __u32 handle;
- __u32 pad;
- __u64 offset;
- __u64 size;
- __u64 addr;
-};
-#define DRM_IOCTL_ARMADA_GEM_MMAP \
- ARMADA_IOCTL(IOWR, GEM_MMAP, gem_mmap)
-
-struct drm_armada_gem_pwrite {
- __u64 ptr;
- __u32 handle;
- __u32 offset;
- __u32 size;
-};
-#define DRM_IOCTL_ARMADA_GEM_PWRITE \
- ARMADA_IOCTL(IOW, GEM_PWRITE, gem_pwrite)
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/drm.h b/lib/libc/include/generic-musl/drm/drm.h
deleted file mode 100644
index 573572bdd9076aef7753e2165d95cb89d9b02112..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/drm.h
+++ /dev/null
@@ -1,1004 +0,0 @@
-/**
- * \file drm.h
- * Header for the Direct Rendering Manager
- *
- * \author Rickard E. (Rik) Faith
- *
- * \par Acknowledgments:
- * Dec 1999, Richard Henderson , move to generic \c cmpxchg.
- */
-
-/*
- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _DRM_H_
-#define _DRM_H_
-
-#if defined(__linux__)
-
-#include
-#include
-typedef unsigned int drm_handle_t;
-
-#else /* One of the BSDs */
-
-#include
-#include
-typedef int8_t __s8;
-typedef uint8_t __u8;
-typedef int16_t __s16;
-typedef uint16_t __u16;
-typedef int32_t __s32;
-typedef uint32_t __u32;
-typedef int64_t __s64;
-typedef uint64_t __u64;
-typedef size_t __kernel_size_t;
-typedef unsigned long drm_handle_t;
-
-#endif
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */
-#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */
-#define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */
-#define DRM_RAM_PERCENT 10 /**< How much system ram can we lock? */
-
-#define _DRM_LOCK_HELD 0x80000000U /**< Hardware lock is held */
-#define _DRM_LOCK_CONT 0x40000000U /**< Hardware lock is contended */
-#define _DRM_LOCK_IS_HELD(lock) ((lock) & _DRM_LOCK_HELD)
-#define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT)
-#define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT))
-
-typedef unsigned int drm_context_t;
-typedef unsigned int drm_drawable_t;
-typedef unsigned int drm_magic_t;
-
-/**
- * Cliprect.
- *
- * \warning: If you change this structure, make sure you change
- * XF86DRIClipRectRec in the server as well
- *
- * \note KW: Actually it's illegal to change either for
- * backwards-compatibility reasons.
- */
-struct drm_clip_rect {
- unsigned short x1;
- unsigned short y1;
- unsigned short x2;
- unsigned short y2;
-};
-
-/**
- * Drawable information.
- */
-struct drm_drawable_info {
- unsigned int num_rects;
- struct drm_clip_rect *rects;
-};
-
-/**
- * Texture region,
- */
-struct drm_tex_region {
- unsigned char next;
- unsigned char prev;
- unsigned char in_use;
- unsigned char padding;
- unsigned int age;
-};
-
-/**
- * Hardware lock.
- *
- * The lock structure is a simple cache-line aligned integer. To avoid
- * processor bus contention on a multiprocessor system, there should not be any
- * other data stored in the same cache line.
- */
-struct drm_hw_lock {
- __volatile__ unsigned int lock; /**< lock variable */
- char padding[60]; /**< Pad to cache line */
-};
-
-/**
- * DRM_IOCTL_VERSION ioctl argument type.
- *
- * \sa drmGetVersion().
- */
-struct drm_version {
- int version_major; /**< Major version */
- int version_minor; /**< Minor version */
- int version_patchlevel; /**< Patch level */
- __kernel_size_t name_len; /**< Length of name buffer */
- char *name; /**< Name of driver */
- __kernel_size_t date_len; /**< Length of date buffer */
- char *date; /**< User-space buffer to hold date */
- __kernel_size_t desc_len; /**< Length of desc buffer */
- char *desc; /**< User-space buffer to hold desc */
-};
-
-/**
- * DRM_IOCTL_GET_UNIQUE ioctl argument type.
- *
- * \sa drmGetBusid() and drmSetBusId().
- */
-struct drm_unique {
- __kernel_size_t unique_len; /**< Length of unique */
- char *unique; /**< Unique name for driver instantiation */
-};
-
-struct drm_list {
- int count; /**< Length of user-space structures */
- struct drm_version *version;
-};
-
-struct drm_block {
- int unused;
-};
-
-/**
- * DRM_IOCTL_CONTROL ioctl argument type.
- *
- * \sa drmCtlInstHandler() and drmCtlUninstHandler().
- */
-struct drm_control {
- enum {
- DRM_ADD_COMMAND,
- DRM_RM_COMMAND,
- DRM_INST_HANDLER,
- DRM_UNINST_HANDLER
- } func;
- int irq;
-};
-
-/**
- * Type of memory to map.
- */
-enum drm_map_type {
- _DRM_FRAME_BUFFER = 0, /**< WC (no caching), no core dump */
- _DRM_REGISTERS = 1, /**< no caching, no core dump */
- _DRM_SHM = 2, /**< shared, cached */
- _DRM_AGP = 3, /**< AGP/GART */
- _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */
- _DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */
-};
-
-/**
- * Memory mapping flags.
- */
-enum drm_map_flags {
- _DRM_RESTRICTED = 0x01, /**< Cannot be mapped to user-virtual */
- _DRM_READ_ONLY = 0x02,
- _DRM_LOCKED = 0x04, /**< shared, cached, locked */
- _DRM_KERNEL = 0x08, /**< kernel requires access */
- _DRM_WRITE_COMBINING = 0x10, /**< use write-combining if available */
- _DRM_CONTAINS_LOCK = 0x20, /**< SHM page that contains lock */
- _DRM_REMOVABLE = 0x40, /**< Removable mapping */
- _DRM_DRIVER = 0x80 /**< Managed by driver */
-};
-
-struct drm_ctx_priv_map {
- unsigned int ctx_id; /**< Context requesting private mapping */
- void *handle; /**< Handle of map */
-};
-
-/**
- * DRM_IOCTL_GET_MAP, DRM_IOCTL_ADD_MAP and DRM_IOCTL_RM_MAP ioctls
- * argument type.
- *
- * \sa drmAddMap().
- */
-struct drm_map {
- unsigned long offset; /**< Requested physical address (0 for SAREA)*/
- unsigned long size; /**< Requested physical size (bytes) */
- enum drm_map_type type; /**< Type of memory to map */
- enum drm_map_flags flags; /**< Flags */
- void *handle; /**< User-space: "Handle" to pass to mmap() */
- /**< Kernel-space: kernel-virtual address */
- int mtrr; /**< MTRR slot used */
- /* Private data */
-};
-
-/**
- * DRM_IOCTL_GET_CLIENT ioctl argument type.
- */
-struct drm_client {
- int idx; /**< Which client desired? */
- int auth; /**< Is client authenticated? */
- unsigned long pid; /**< Process ID */
- unsigned long uid; /**< User ID */
- unsigned long magic; /**< Magic */
- unsigned long iocs; /**< Ioctl count */
-};
-
-enum drm_stat_type {
- _DRM_STAT_LOCK,
- _DRM_STAT_OPENS,
- _DRM_STAT_CLOSES,
- _DRM_STAT_IOCTLS,
- _DRM_STAT_LOCKS,
- _DRM_STAT_UNLOCKS,
- _DRM_STAT_VALUE, /**< Generic value */
- _DRM_STAT_BYTE, /**< Generic byte counter (1024bytes/K) */
- _DRM_STAT_COUNT, /**< Generic non-byte counter (1000/k) */
-
- _DRM_STAT_IRQ, /**< IRQ */
- _DRM_STAT_PRIMARY, /**< Primary DMA bytes */
- _DRM_STAT_SECONDARY, /**< Secondary DMA bytes */
- _DRM_STAT_DMA, /**< DMA */
- _DRM_STAT_SPECIAL, /**< Special DMA (e.g., priority or polled) */
- _DRM_STAT_MISSED /**< Missed DMA opportunity */
- /* Add to the *END* of the list */
-};
-
-/**
- * DRM_IOCTL_GET_STATS ioctl argument type.
- */
-struct drm_stats {
- unsigned long count;
- struct {
- unsigned long value;
- enum drm_stat_type type;
- } data[15];
-};
-
-/**
- * Hardware locking flags.
- */
-enum drm_lock_flags {
- _DRM_LOCK_READY = 0x01, /**< Wait until hardware is ready for DMA */
- _DRM_LOCK_QUIESCENT = 0x02, /**< Wait until hardware quiescent */
- _DRM_LOCK_FLUSH = 0x04, /**< Flush this context's DMA queue first */
- _DRM_LOCK_FLUSH_ALL = 0x08, /**< Flush all DMA queues first */
- /* These *HALT* flags aren't supported yet
- -- they will be used to support the
- full-screen DGA-like mode. */
- _DRM_HALT_ALL_QUEUES = 0x10, /**< Halt all current and future queues */
- _DRM_HALT_CUR_QUEUES = 0x20 /**< Halt all current queues */
-};
-
-/**
- * DRM_IOCTL_LOCK, DRM_IOCTL_UNLOCK and DRM_IOCTL_FINISH ioctl argument type.
- *
- * \sa drmGetLock() and drmUnlock().
- */
-struct drm_lock {
- int context;
- enum drm_lock_flags flags;
-};
-
-/**
- * DMA flags
- *
- * \warning
- * These values \e must match xf86drm.h.
- *
- * \sa drm_dma.
- */
-enum drm_dma_flags {
- /* Flags for DMA buffer dispatch */
- _DRM_DMA_BLOCK = 0x01, /**<
- * Block until buffer dispatched.
- *
- * \note The buffer may not yet have
- * been processed by the hardware --
- * getting a hardware lock with the
- * hardware quiescent will ensure
- * that the buffer has been
- * processed.
- */
- _DRM_DMA_WHILE_LOCKED = 0x02, /**< Dispatch while lock held */
- _DRM_DMA_PRIORITY = 0x04, /**< High priority dispatch */
-
- /* Flags for DMA buffer request */
- _DRM_DMA_WAIT = 0x10, /**< Wait for free buffers */
- _DRM_DMA_SMALLER_OK = 0x20, /**< Smaller-than-requested buffers OK */
- _DRM_DMA_LARGER_OK = 0x40 /**< Larger-than-requested buffers OK */
-};
-
-/**
- * DRM_IOCTL_ADD_BUFS and DRM_IOCTL_MARK_BUFS ioctl argument type.
- *
- * \sa drmAddBufs().
- */
-struct drm_buf_desc {
- int count; /**< Number of buffers of this size */
- int size; /**< Size in bytes */
- int low_mark; /**< Low water mark */
- int high_mark; /**< High water mark */
- enum {
- _DRM_PAGE_ALIGN = 0x01, /**< Align on page boundaries for DMA */
- _DRM_AGP_BUFFER = 0x02, /**< Buffer is in AGP space */
- _DRM_SG_BUFFER = 0x04, /**< Scatter/gather memory buffer */
- _DRM_FB_BUFFER = 0x08, /**< Buffer is in frame buffer */
- _DRM_PCI_BUFFER_RO = 0x10 /**< Map PCI DMA buffer read-only */
- } flags;
- unsigned long agp_start; /**<
- * Start address of where the AGP buffers are
- * in the AGP aperture
- */
-};
-
-/**
- * DRM_IOCTL_INFO_BUFS ioctl argument type.
- */
-struct drm_buf_info {
- int count; /**< Entries in list */
- struct drm_buf_desc *list;
-};
-
-/**
- * DRM_IOCTL_FREE_BUFS ioctl argument type.
- */
-struct drm_buf_free {
- int count;
- int *list;
-};
-
-/**
- * Buffer information
- *
- * \sa drm_buf_map.
- */
-struct drm_buf_pub {
- int idx; /**< Index into the master buffer list */
- int total; /**< Buffer size */
- int used; /**< Amount of buffer in use (for DMA) */
- void *address; /**< Address of buffer */
-};
-
-/**
- * DRM_IOCTL_MAP_BUFS ioctl argument type.
- */
-struct drm_buf_map {
- int count; /**< Length of the buffer list */
-#ifdef __cplusplus
- void *virt;
-#else
- void *virtual; /**< Mmap'd area in user-virtual */
-#endif
- struct drm_buf_pub *list; /**< Buffer information */
-};
-
-/**
- * DRM_IOCTL_DMA ioctl argument type.
- *
- * Indices here refer to the offset into the buffer list in drm_buf_get.
- *
- * \sa drmDMA().
- */
-struct drm_dma {
- int context; /**< Context handle */
- int send_count; /**< Number of buffers to send */
- int *send_indices; /**< List of handles to buffers */
- int *send_sizes; /**< Lengths of data to send */
- enum drm_dma_flags flags; /**< Flags */
- int request_count; /**< Number of buffers requested */
- int request_size; /**< Desired size for buffers */
- int *request_indices; /**< Buffer information */
- int *request_sizes;
- int granted_count; /**< Number of buffers granted */
-};
-
-enum drm_ctx_flags {
- _DRM_CONTEXT_PRESERVED = 0x01,
- _DRM_CONTEXT_2DONLY = 0x02
-};
-
-/**
- * DRM_IOCTL_ADD_CTX ioctl argument type.
- *
- * \sa drmCreateContext() and drmDestroyContext().
- */
-struct drm_ctx {
- drm_context_t handle;
- enum drm_ctx_flags flags;
-};
-
-/**
- * DRM_IOCTL_RES_CTX ioctl argument type.
- */
-struct drm_ctx_res {
- int count;
- struct drm_ctx *contexts;
-};
-
-/**
- * DRM_IOCTL_ADD_DRAW and DRM_IOCTL_RM_DRAW ioctl argument type.
- */
-struct drm_draw {
- drm_drawable_t handle;
-};
-
-/**
- * DRM_IOCTL_UPDATE_DRAW ioctl argument type.
- */
-typedef enum {
- DRM_DRAWABLE_CLIPRECTS
-} drm_drawable_info_type_t;
-
-struct drm_update_draw {
- drm_drawable_t handle;
- unsigned int type;
- unsigned int num;
- unsigned long long data;
-};
-
-/**
- * DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type.
- */
-struct drm_auth {
- drm_magic_t magic;
-};
-
-/**
- * DRM_IOCTL_IRQ_BUSID ioctl argument type.
- *
- * \sa drmGetInterruptFromBusID().
- */
-struct drm_irq_busid {
- int irq; /**< IRQ number */
- int busnum; /**< bus number */
- int devnum; /**< device number */
- int funcnum; /**< function number */
-};
-
-enum drm_vblank_seq_type {
- _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */
- _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */
- /* bits 1-6 are reserved for high crtcs */
- _DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e,
- _DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */
- _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */
- _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */
- _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */
- _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */
-};
-#define _DRM_VBLANK_HIGH_CRTC_SHIFT 1
-
-#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE)
-#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \
- _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS)
-
-struct drm_wait_vblank_request {
- enum drm_vblank_seq_type type;
- unsigned int sequence;
- unsigned long signal;
-};
-
-struct drm_wait_vblank_reply {
- enum drm_vblank_seq_type type;
- unsigned int sequence;
- long tval_sec;
- long tval_usec;
-};
-
-/**
- * DRM_IOCTL_WAIT_VBLANK ioctl argument type.
- *
- * \sa drmWaitVBlank().
- */
-union drm_wait_vblank {
- struct drm_wait_vblank_request request;
- struct drm_wait_vblank_reply reply;
-};
-
-#define _DRM_PRE_MODESET 1
-#define _DRM_POST_MODESET 2
-
-/**
- * DRM_IOCTL_MODESET_CTL ioctl argument type
- *
- * \sa drmModesetCtl().
- */
-struct drm_modeset_ctl {
- __u32 crtc;
- __u32 cmd;
-};
-
-/**
- * DRM_IOCTL_AGP_ENABLE ioctl argument type.
- *
- * \sa drmAgpEnable().
- */
-struct drm_agp_mode {
- unsigned long mode; /**< AGP mode */
-};
-
-/**
- * DRM_IOCTL_AGP_ALLOC and DRM_IOCTL_AGP_FREE ioctls argument type.
- *
- * \sa drmAgpAlloc() and drmAgpFree().
- */
-struct drm_agp_buffer {
- unsigned long size; /**< In bytes -- will round to page boundary */
- unsigned long handle; /**< Used for binding / unbinding */
- unsigned long type; /**< Type of memory to allocate */
- unsigned long physical; /**< Physical used by i810 */
-};
-
-/**
- * DRM_IOCTL_AGP_BIND and DRM_IOCTL_AGP_UNBIND ioctls argument type.
- *
- * \sa drmAgpBind() and drmAgpUnbind().
- */
-struct drm_agp_binding {
- unsigned long handle; /**< From drm_agp_buffer */
- unsigned long offset; /**< In bytes -- will round to page boundary */
-};
-
-/**
- * DRM_IOCTL_AGP_INFO ioctl argument type.
- *
- * \sa drmAgpVersionMajor(), drmAgpVersionMinor(), drmAgpGetMode(),
- * drmAgpBase(), drmAgpSize(), drmAgpMemoryUsed(), drmAgpMemoryAvail(),
- * drmAgpVendorId() and drmAgpDeviceId().
- */
-struct drm_agp_info {
- int agp_version_major;
- int agp_version_minor;
- unsigned long mode;
- unsigned long aperture_base; /* physical address */
- unsigned long aperture_size; /* bytes */
- unsigned long memory_allowed; /* bytes */
- unsigned long memory_used;
-
- /* PCI information */
- unsigned short id_vendor;
- unsigned short id_device;
-};
-
-/**
- * DRM_IOCTL_SG_ALLOC ioctl argument type.
- */
-struct drm_scatter_gather {
- unsigned long size; /**< In bytes -- will round to page boundary */
- unsigned long handle; /**< Used for mapping / unmapping */
-};
-
-/**
- * DRM_IOCTL_SET_VERSION ioctl argument type.
- */
-struct drm_set_version {
- int drm_di_major;
- int drm_di_minor;
- int drm_dd_major;
- int drm_dd_minor;
-};
-
-/** DRM_IOCTL_GEM_CLOSE ioctl argument type */
-struct drm_gem_close {
- /** Handle of the object to be closed. */
- __u32 handle;
- __u32 pad;
-};
-
-/** DRM_IOCTL_GEM_FLINK ioctl argument type */
-struct drm_gem_flink {
- /** Handle for the object being named */
- __u32 handle;
-
- /** Returned global name */
- __u32 name;
-};
-
-/** DRM_IOCTL_GEM_OPEN ioctl argument type */
-struct drm_gem_open {
- /** Name of object being opened */
- __u32 name;
-
- /** Returned handle for the object */
- __u32 handle;
-
- /** Returned size of the object */
- __u64 size;
-};
-
-#define DRM_CAP_DUMB_BUFFER 0x1
-#define DRM_CAP_VBLANK_HIGH_CRTC 0x2
-#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3
-#define DRM_CAP_DUMB_PREFER_SHADOW 0x4
-#define DRM_CAP_PRIME 0x5
-#define DRM_PRIME_CAP_IMPORT 0x1
-#define DRM_PRIME_CAP_EXPORT 0x2
-#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6
-#define DRM_CAP_ASYNC_PAGE_FLIP 0x7
-/*
- * The CURSOR_WIDTH and CURSOR_HEIGHT capabilities return a valid widthxheight
- * combination for the hardware cursor. The intention is that a hardware
- * agnostic userspace can query a cursor plane size to use.
- *
- * Note that the cross-driver contract is to merely return a valid size;
- * drivers are free to attach another meaning on top, eg. i915 returns the
- * maximum plane size.
- */
-#define DRM_CAP_CURSOR_WIDTH 0x8
-#define DRM_CAP_CURSOR_HEIGHT 0x9
-#define DRM_CAP_ADDFB2_MODIFIERS 0x10
-#define DRM_CAP_PAGE_FLIP_TARGET 0x11
-#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12
-#define DRM_CAP_SYNCOBJ 0x13
-
-/** DRM_IOCTL_GET_CAP ioctl argument type */
-struct drm_get_cap {
- __u64 capability;
- __u64 value;
-};
-
-/**
- * DRM_CLIENT_CAP_STEREO_3D
- *
- * if set to 1, the DRM core will expose the stereo 3D capabilities of the
- * monitor by advertising the supported 3D layouts in the flags of struct
- * drm_mode_modeinfo.
- */
-#define DRM_CLIENT_CAP_STEREO_3D 1
-
-/**
- * DRM_CLIENT_CAP_UNIVERSAL_PLANES
- *
- * If set to 1, the DRM core will expose all planes (overlay, primary, and
- * cursor) to userspace.
- */
-#define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2
-
-/**
- * DRM_CLIENT_CAP_ATOMIC
- *
- * If set to 1, the DRM core will expose atomic properties to userspace
- */
-#define DRM_CLIENT_CAP_ATOMIC 3
-
-/**
- * DRM_CLIENT_CAP_ASPECT_RATIO
- *
- * If set to 1, the DRM core will provide aspect ratio information in modes.
- */
-#define DRM_CLIENT_CAP_ASPECT_RATIO 4
-
-/**
- * DRM_CLIENT_CAP_WRITEBACK_CONNECTORS
- *
- * If set to 1, the DRM core will expose special connectors to be used for
- * writing back to memory the scene setup in the commit. Depends on client
- * also supporting DRM_CLIENT_CAP_ATOMIC
- */
-#define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5
-
-/** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
-struct drm_set_client_cap {
- __u64 capability;
- __u64 value;
-};
-
-#define DRM_RDWR O_RDWR
-#define DRM_CLOEXEC O_CLOEXEC
-struct drm_prime_handle {
- __u32 handle;
-
- /** Flags.. only applicable for handle->fd */
- __u32 flags;
-
- /** Returned dmabuf file descriptor */
- __s32 fd;
-};
-
-struct drm_syncobj_create {
- __u32 handle;
-#define DRM_SYNCOBJ_CREATE_SIGNALED (1 << 0)
- __u32 flags;
-};
-
-struct drm_syncobj_destroy {
- __u32 handle;
- __u32 pad;
-};
-
-#define DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_IMPORT_SYNC_FILE (1 << 0)
-#define DRM_SYNCOBJ_HANDLE_TO_FD_FLAGS_EXPORT_SYNC_FILE (1 << 0)
-struct drm_syncobj_handle {
- __u32 handle;
- __u32 flags;
-
- __s32 fd;
- __u32 pad;
-};
-
-#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0)
-#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1)
-struct drm_syncobj_wait {
- __u64 handles;
- /* absolute timeout */
- __s64 timeout_nsec;
- __u32 count_handles;
- __u32 flags;
- __u32 first_signaled; /* only valid when not waiting all */
- __u32 pad;
-};
-
-struct drm_syncobj_array {
- __u64 handles;
- __u32 count_handles;
- __u32 pad;
-};
-
-/* Query current scanout sequence number */
-struct drm_crtc_get_sequence {
- __u32 crtc_id; /* requested crtc_id */
- __u32 active; /* return: crtc output is active */
- __u64 sequence; /* return: most recent vblank sequence */
- __s64 sequence_ns; /* return: most recent time of first pixel out */
-};
-
-/* Queue event to be delivered at specified sequence. Time stamp marks
- * when the first pixel of the refresh cycle leaves the display engine
- * for the display
- */
-#define DRM_CRTC_SEQUENCE_RELATIVE 0x00000001 /* sequence is relative to current */
-#define DRM_CRTC_SEQUENCE_NEXT_ON_MISS 0x00000002 /* Use next sequence if we've missed */
-
-struct drm_crtc_queue_sequence {
- __u32 crtc_id;
- __u32 flags;
- __u64 sequence; /* on input, target sequence. on output, actual sequence */
- __u64 user_data; /* user data passed to event */
-};
-
-#if defined(__cplusplus)
-}
-#endif
-
-#include "drm_mode.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#define DRM_IOCTL_BASE 'd'
-#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr)
-#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type)
-#define DRM_IOW(nr,type) _IOW(DRM_IOCTL_BASE,nr,type)
-#define DRM_IOWR(nr,type) _IOWR(DRM_IOCTL_BASE,nr,type)
-
-#define DRM_IOCTL_VERSION DRM_IOWR(0x00, struct drm_version)
-#define DRM_IOCTL_GET_UNIQUE DRM_IOWR(0x01, struct drm_unique)
-#define DRM_IOCTL_GET_MAGIC DRM_IOR( 0x02, struct drm_auth)
-#define DRM_IOCTL_IRQ_BUSID DRM_IOWR(0x03, struct drm_irq_busid)
-#define DRM_IOCTL_GET_MAP DRM_IOWR(0x04, struct drm_map)
-#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client)
-#define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats)
-#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version)
-#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl)
-#define DRM_IOCTL_GEM_CLOSE DRM_IOW (0x09, struct drm_gem_close)
-#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink)
-#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open)
-#define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap)
-#define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW( 0x0d, struct drm_set_client_cap)
-
-#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique)
-#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth)
-#define DRM_IOCTL_BLOCK DRM_IOWR(0x12, struct drm_block)
-#define DRM_IOCTL_UNBLOCK DRM_IOWR(0x13, struct drm_block)
-#define DRM_IOCTL_CONTROL DRM_IOW( 0x14, struct drm_control)
-#define DRM_IOCTL_ADD_MAP DRM_IOWR(0x15, struct drm_map)
-#define DRM_IOCTL_ADD_BUFS DRM_IOWR(0x16, struct drm_buf_desc)
-#define DRM_IOCTL_MARK_BUFS DRM_IOW( 0x17, struct drm_buf_desc)
-#define DRM_IOCTL_INFO_BUFS DRM_IOWR(0x18, struct drm_buf_info)
-#define DRM_IOCTL_MAP_BUFS DRM_IOWR(0x19, struct drm_buf_map)
-#define DRM_IOCTL_FREE_BUFS DRM_IOW( 0x1a, struct drm_buf_free)
-
-#define DRM_IOCTL_RM_MAP DRM_IOW( 0x1b, struct drm_map)
-
-#define DRM_IOCTL_SET_SAREA_CTX DRM_IOW( 0x1c, struct drm_ctx_priv_map)
-#define DRM_IOCTL_GET_SAREA_CTX DRM_IOWR(0x1d, struct drm_ctx_priv_map)
-
-#define DRM_IOCTL_SET_MASTER DRM_IO(0x1e)
-#define DRM_IOCTL_DROP_MASTER DRM_IO(0x1f)
-
-#define DRM_IOCTL_ADD_CTX DRM_IOWR(0x20, struct drm_ctx)
-#define DRM_IOCTL_RM_CTX DRM_IOWR(0x21, struct drm_ctx)
-#define DRM_IOCTL_MOD_CTX DRM_IOW( 0x22, struct drm_ctx)
-#define DRM_IOCTL_GET_CTX DRM_IOWR(0x23, struct drm_ctx)
-#define DRM_IOCTL_SWITCH_CTX DRM_IOW( 0x24, struct drm_ctx)
-#define DRM_IOCTL_NEW_CTX DRM_IOW( 0x25, struct drm_ctx)
-#define DRM_IOCTL_RES_CTX DRM_IOWR(0x26, struct drm_ctx_res)
-#define DRM_IOCTL_ADD_DRAW DRM_IOWR(0x27, struct drm_draw)
-#define DRM_IOCTL_RM_DRAW DRM_IOWR(0x28, struct drm_draw)
-#define DRM_IOCTL_DMA DRM_IOWR(0x29, struct drm_dma)
-#define DRM_IOCTL_LOCK DRM_IOW( 0x2a, struct drm_lock)
-#define DRM_IOCTL_UNLOCK DRM_IOW( 0x2b, struct drm_lock)
-#define DRM_IOCTL_FINISH DRM_IOW( 0x2c, struct drm_lock)
-
-#define DRM_IOCTL_PRIME_HANDLE_TO_FD DRM_IOWR(0x2d, struct drm_prime_handle)
-#define DRM_IOCTL_PRIME_FD_TO_HANDLE DRM_IOWR(0x2e, struct drm_prime_handle)
-
-#define DRM_IOCTL_AGP_ACQUIRE DRM_IO( 0x30)
-#define DRM_IOCTL_AGP_RELEASE DRM_IO( 0x31)
-#define DRM_IOCTL_AGP_ENABLE DRM_IOW( 0x32, struct drm_agp_mode)
-#define DRM_IOCTL_AGP_INFO DRM_IOR( 0x33, struct drm_agp_info)
-#define DRM_IOCTL_AGP_ALLOC DRM_IOWR(0x34, struct drm_agp_buffer)
-#define DRM_IOCTL_AGP_FREE DRM_IOW( 0x35, struct drm_agp_buffer)
-#define DRM_IOCTL_AGP_BIND DRM_IOW( 0x36, struct drm_agp_binding)
-#define DRM_IOCTL_AGP_UNBIND DRM_IOW( 0x37, struct drm_agp_binding)
-
-#define DRM_IOCTL_SG_ALLOC DRM_IOWR(0x38, struct drm_scatter_gather)
-#define DRM_IOCTL_SG_FREE DRM_IOW( 0x39, struct drm_scatter_gather)
-
-#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank)
-
-#define DRM_IOCTL_CRTC_GET_SEQUENCE DRM_IOWR(0x3b, struct drm_crtc_get_sequence)
-#define DRM_IOCTL_CRTC_QUEUE_SEQUENCE DRM_IOWR(0x3c, struct drm_crtc_queue_sequence)
-
-#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw)
-
-#define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res)
-#define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc)
-#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA2, struct drm_mode_crtc)
-#define DRM_IOCTL_MODE_CURSOR DRM_IOWR(0xA3, struct drm_mode_cursor)
-#define DRM_IOCTL_MODE_GETGAMMA DRM_IOWR(0xA4, struct drm_mode_crtc_lut)
-#define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut)
-#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder)
-#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector)
-#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA8, struct drm_mode_mode_cmd) /* deprecated (never worked) */
-#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd) /* deprecated (never worked) */
-
-#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property)
-#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property)
-#define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xAC, struct drm_mode_get_blob)
-#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd)
-#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd)
-#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int)
-#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip)
-#define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd)
-
-#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb)
-#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb)
-#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb)
-#define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res)
-#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane)
-#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane)
-#define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2)
-#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties)
-#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property)
-#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2)
-#define DRM_IOCTL_MODE_ATOMIC DRM_IOWR(0xBC, struct drm_mode_atomic)
-#define DRM_IOCTL_MODE_CREATEPROPBLOB DRM_IOWR(0xBD, struct drm_mode_create_blob)
-#define DRM_IOCTL_MODE_DESTROYPROPBLOB DRM_IOWR(0xBE, struct drm_mode_destroy_blob)
-
-#define DRM_IOCTL_SYNCOBJ_CREATE DRM_IOWR(0xBF, struct drm_syncobj_create)
-#define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy)
-#define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle)
-#define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle)
-#define DRM_IOCTL_SYNCOBJ_WAIT DRM_IOWR(0xC3, struct drm_syncobj_wait)
-#define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array)
-#define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array)
-
-#define DRM_IOCTL_MODE_CREATE_LEASE DRM_IOWR(0xC6, struct drm_mode_create_lease)
-#define DRM_IOCTL_MODE_LIST_LESSEES DRM_IOWR(0xC7, struct drm_mode_list_lessees)
-#define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease)
-#define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease)
-
-/**
- * Device specific ioctls should only be in their respective headers
- * The device specific ioctl range is from 0x40 to 0x9f.
- * Generic IOCTLS restart at 0xA0.
- *
- * \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and
- * drmCommandReadWrite().
- */
-#define DRM_COMMAND_BASE 0x40
-#define DRM_COMMAND_END 0xA0
-
-/**
- * Header for events written back to userspace on the drm fd. The
- * type defines the type of event, the length specifies the total
- * length of the event (including the header), and user_data is
- * typically a 64 bit value passed with the ioctl that triggered the
- * event. A read on the drm fd will always only return complete
- * events, that is, if for example the read buffer is 100 bytes, and
- * there are two 64 byte events pending, only one will be returned.
- *
- * Event types 0 - 0x7fffffff are generic drm events, 0x80000000 and
- * up are chipset specific.
- */
-struct drm_event {
- __u32 type;
- __u32 length;
-};
-
-#define DRM_EVENT_VBLANK 0x01
-#define DRM_EVENT_FLIP_COMPLETE 0x02
-#define DRM_EVENT_CRTC_SEQUENCE 0x03
-
-struct drm_event_vblank {
- struct drm_event base;
- __u64 user_data;
- __u32 tv_sec;
- __u32 tv_usec;
- __u32 sequence;
- __u32 crtc_id; /* 0 on older kernels that do not support this */
-};
-
-/* Event delivered at sequence. Time stamp marks when the first pixel
- * of the refresh cycle leaves the display engine for the display
- */
-struct drm_event_crtc_sequence {
- struct drm_event base;
- __u64 user_data;
- __s64 time_ns;
- __u64 sequence;
-};
-
-/* typedef area */
-typedef struct drm_clip_rect drm_clip_rect_t;
-typedef struct drm_drawable_info drm_drawable_info_t;
-typedef struct drm_tex_region drm_tex_region_t;
-typedef struct drm_hw_lock drm_hw_lock_t;
-typedef struct drm_version drm_version_t;
-typedef struct drm_unique drm_unique_t;
-typedef struct drm_list drm_list_t;
-typedef struct drm_block drm_block_t;
-typedef struct drm_control drm_control_t;
-typedef enum drm_map_type drm_map_type_t;
-typedef enum drm_map_flags drm_map_flags_t;
-typedef struct drm_ctx_priv_map drm_ctx_priv_map_t;
-typedef struct drm_map drm_map_t;
-typedef struct drm_client drm_client_t;
-typedef enum drm_stat_type drm_stat_type_t;
-typedef struct drm_stats drm_stats_t;
-typedef enum drm_lock_flags drm_lock_flags_t;
-typedef struct drm_lock drm_lock_t;
-typedef enum drm_dma_flags drm_dma_flags_t;
-typedef struct drm_buf_desc drm_buf_desc_t;
-typedef struct drm_buf_info drm_buf_info_t;
-typedef struct drm_buf_free drm_buf_free_t;
-typedef struct drm_buf_pub drm_buf_pub_t;
-typedef struct drm_buf_map drm_buf_map_t;
-typedef struct drm_dma drm_dma_t;
-typedef union drm_wait_vblank drm_wait_vblank_t;
-typedef struct drm_agp_mode drm_agp_mode_t;
-typedef enum drm_ctx_flags drm_ctx_flags_t;
-typedef struct drm_ctx drm_ctx_t;
-typedef struct drm_ctx_res drm_ctx_res_t;
-typedef struct drm_draw drm_draw_t;
-typedef struct drm_update_draw drm_update_draw_t;
-typedef struct drm_auth drm_auth_t;
-typedef struct drm_irq_busid drm_irq_busid_t;
-typedef enum drm_vblank_seq_type drm_vblank_seq_type_t;
-
-typedef struct drm_agp_buffer drm_agp_buffer_t;
-typedef struct drm_agp_binding drm_agp_binding_t;
-typedef struct drm_agp_info drm_agp_info_t;
-typedef struct drm_scatter_gather drm_scatter_gather_t;
-typedef struct drm_set_version drm_set_version_t;
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/drm_fourcc.h b/lib/libc/include/generic-musl/drm/drm_fourcc.h
deleted file mode 100644
index 73091a3746f4bbcc2b182b42fe7eb6aeea942248..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/drm_fourcc.h
+++ /dev/null
@@ -1,588 +0,0 @@
-/*
- * Copyright 2011 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef DRM_FOURCC_H
-#define DRM_FOURCC_H
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \
- ((__u32)(c) << 16) | ((__u32)(d) << 24))
-
-#define DRM_FORMAT_BIG_ENDIAN (1<<31) /* format is big endian instead of little endian */
-
-/* color index */
-#define DRM_FORMAT_C8 fourcc_code('C', '8', ' ', ' ') /* [7:0] C */
-
-/* 8 bpp Red */
-#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ') /* [7:0] R */
-
-/* 16 bpp Red */
-#define DRM_FORMAT_R16 fourcc_code('R', '1', '6', ' ') /* [15:0] R little endian */
-
-/* 16 bpp RG */
-#define DRM_FORMAT_RG88 fourcc_code('R', 'G', '8', '8') /* [15:0] R:G 8:8 little endian */
-#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '8') /* [15:0] G:R 8:8 little endian */
-
-/* 32 bpp RG */
-#define DRM_FORMAT_RG1616 fourcc_code('R', 'G', '3', '2') /* [31:0] R:G 16:16 little endian */
-#define DRM_FORMAT_GR1616 fourcc_code('G', 'R', '3', '2') /* [31:0] G:R 16:16 little endian */
-
-/* 8 bpp RGB */
-#define DRM_FORMAT_RGB332 fourcc_code('R', 'G', 'B', '8') /* [7:0] R:G:B 3:3:2 */
-#define DRM_FORMAT_BGR233 fourcc_code('B', 'G', 'R', '8') /* [7:0] B:G:R 2:3:3 */
-
-/* 16 bpp RGB */
-#define DRM_FORMAT_XRGB4444 fourcc_code('X', 'R', '1', '2') /* [15:0] x:R:G:B 4:4:4:4 little endian */
-#define DRM_FORMAT_XBGR4444 fourcc_code('X', 'B', '1', '2') /* [15:0] x:B:G:R 4:4:4:4 little endian */
-#define DRM_FORMAT_RGBX4444 fourcc_code('R', 'X', '1', '2') /* [15:0] R:G:B:x 4:4:4:4 little endian */
-#define DRM_FORMAT_BGRX4444 fourcc_code('B', 'X', '1', '2') /* [15:0] B:G:R:x 4:4:4:4 little endian */
-
-#define DRM_FORMAT_ARGB4444 fourcc_code('A', 'R', '1', '2') /* [15:0] A:R:G:B 4:4:4:4 little endian */
-#define DRM_FORMAT_ABGR4444 fourcc_code('A', 'B', '1', '2') /* [15:0] A:B:G:R 4:4:4:4 little endian */
-#define DRM_FORMAT_RGBA4444 fourcc_code('R', 'A', '1', '2') /* [15:0] R:G:B:A 4:4:4:4 little endian */
-#define DRM_FORMAT_BGRA4444 fourcc_code('B', 'A', '1', '2') /* [15:0] B:G:R:A 4:4:4:4 little endian */
-
-#define DRM_FORMAT_XRGB1555 fourcc_code('X', 'R', '1', '5') /* [15:0] x:R:G:B 1:5:5:5 little endian */
-#define DRM_FORMAT_XBGR1555 fourcc_code('X', 'B', '1', '5') /* [15:0] x:B:G:R 1:5:5:5 little endian */
-#define DRM_FORMAT_RGBX5551 fourcc_code('R', 'X', '1', '5') /* [15:0] R:G:B:x 5:5:5:1 little endian */
-#define DRM_FORMAT_BGRX5551 fourcc_code('B', 'X', '1', '5') /* [15:0] B:G:R:x 5:5:5:1 little endian */
-
-#define DRM_FORMAT_ARGB1555 fourcc_code('A', 'R', '1', '5') /* [15:0] A:R:G:B 1:5:5:5 little endian */
-#define DRM_FORMAT_ABGR1555 fourcc_code('A', 'B', '1', '5') /* [15:0] A:B:G:R 1:5:5:5 little endian */
-#define DRM_FORMAT_RGBA5551 fourcc_code('R', 'A', '1', '5') /* [15:0] R:G:B:A 5:5:5:1 little endian */
-#define DRM_FORMAT_BGRA5551 fourcc_code('B', 'A', '1', '5') /* [15:0] B:G:R:A 5:5:5:1 little endian */
-
-#define DRM_FORMAT_RGB565 fourcc_code('R', 'G', '1', '6') /* [15:0] R:G:B 5:6:5 little endian */
-#define DRM_FORMAT_BGR565 fourcc_code('B', 'G', '1', '6') /* [15:0] B:G:R 5:6:5 little endian */
-
-/* 24 bpp RGB */
-#define DRM_FORMAT_RGB888 fourcc_code('R', 'G', '2', '4') /* [23:0] R:G:B little endian */
-#define DRM_FORMAT_BGR888 fourcc_code('B', 'G', '2', '4') /* [23:0] B:G:R little endian */
-
-/* 32 bpp RGB */
-#define DRM_FORMAT_XRGB8888 fourcc_code('X', 'R', '2', '4') /* [31:0] x:R:G:B 8:8:8:8 little endian */
-#define DRM_FORMAT_XBGR8888 fourcc_code('X', 'B', '2', '4') /* [31:0] x:B:G:R 8:8:8:8 little endian */
-#define DRM_FORMAT_RGBX8888 fourcc_code('R', 'X', '2', '4') /* [31:0] R:G:B:x 8:8:8:8 little endian */
-#define DRM_FORMAT_BGRX8888 fourcc_code('B', 'X', '2', '4') /* [31:0] B:G:R:x 8:8:8:8 little endian */
-
-#define DRM_FORMAT_ARGB8888 fourcc_code('A', 'R', '2', '4') /* [31:0] A:R:G:B 8:8:8:8 little endian */
-#define DRM_FORMAT_ABGR8888 fourcc_code('A', 'B', '2', '4') /* [31:0] A:B:G:R 8:8:8:8 little endian */
-#define DRM_FORMAT_RGBA8888 fourcc_code('R', 'A', '2', '4') /* [31:0] R:G:B:A 8:8:8:8 little endian */
-#define DRM_FORMAT_BGRA8888 fourcc_code('B', 'A', '2', '4') /* [31:0] B:G:R:A 8:8:8:8 little endian */
-
-#define DRM_FORMAT_XRGB2101010 fourcc_code('X', 'R', '3', '0') /* [31:0] x:R:G:B 2:10:10:10 little endian */
-#define DRM_FORMAT_XBGR2101010 fourcc_code('X', 'B', '3', '0') /* [31:0] x:B:G:R 2:10:10:10 little endian */
-#define DRM_FORMAT_RGBX1010102 fourcc_code('R', 'X', '3', '0') /* [31:0] R:G:B:x 10:10:10:2 little endian */
-#define DRM_FORMAT_BGRX1010102 fourcc_code('B', 'X', '3', '0') /* [31:0] B:G:R:x 10:10:10:2 little endian */
-
-#define DRM_FORMAT_ARGB2101010 fourcc_code('A', 'R', '3', '0') /* [31:0] A:R:G:B 2:10:10:10 little endian */
-#define DRM_FORMAT_ABGR2101010 fourcc_code('A', 'B', '3', '0') /* [31:0] A:B:G:R 2:10:10:10 little endian */
-#define DRM_FORMAT_RGBA1010102 fourcc_code('R', 'A', '3', '0') /* [31:0] R:G:B:A 10:10:10:2 little endian */
-#define DRM_FORMAT_BGRA1010102 fourcc_code('B', 'A', '3', '0') /* [31:0] B:G:R:A 10:10:10:2 little endian */
-
-/* packed YCbCr */
-#define DRM_FORMAT_YUYV fourcc_code('Y', 'U', 'Y', 'V') /* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */
-#define DRM_FORMAT_YVYU fourcc_code('Y', 'V', 'Y', 'U') /* [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian */
-#define DRM_FORMAT_UYVY fourcc_code('U', 'Y', 'V', 'Y') /* [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian */
-#define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y') /* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */
-
-#define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */
-
-/*
- * 2 plane RGB + A
- * index 0 = RGB plane, same format as the corresponding non _A8 format has
- * index 1 = A plane, [7:0] A
- */
-#define DRM_FORMAT_XRGB8888_A8 fourcc_code('X', 'R', 'A', '8')
-#define DRM_FORMAT_XBGR8888_A8 fourcc_code('X', 'B', 'A', '8')
-#define DRM_FORMAT_RGBX8888_A8 fourcc_code('R', 'X', 'A', '8')
-#define DRM_FORMAT_BGRX8888_A8 fourcc_code('B', 'X', 'A', '8')
-#define DRM_FORMAT_RGB888_A8 fourcc_code('R', '8', 'A', '8')
-#define DRM_FORMAT_BGR888_A8 fourcc_code('B', '8', 'A', '8')
-#define DRM_FORMAT_RGB565_A8 fourcc_code('R', '5', 'A', '8')
-#define DRM_FORMAT_BGR565_A8 fourcc_code('B', '5', 'A', '8')
-
-/*
- * 2 plane YCbCr
- * index 0 = Y plane, [7:0] Y
- * index 1 = Cr:Cb plane, [15:0] Cr:Cb little endian
- * or
- * index 1 = Cb:Cr plane, [15:0] Cb:Cr little endian
- */
-#define DRM_FORMAT_NV12 fourcc_code('N', 'V', '1', '2') /* 2x2 subsampled Cr:Cb plane */
-#define DRM_FORMAT_NV21 fourcc_code('N', 'V', '2', '1') /* 2x2 subsampled Cb:Cr plane */
-#define DRM_FORMAT_NV16 fourcc_code('N', 'V', '1', '6') /* 2x1 subsampled Cr:Cb plane */
-#define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */
-#define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4') /* non-subsampled Cr:Cb plane */
-#define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */
-
-/*
- * 3 plane YCbCr
- * index 0: Y plane, [7:0] Y
- * index 1: Cb plane, [7:0] Cb
- * index 2: Cr plane, [7:0] Cr
- * or
- * index 1: Cr plane, [7:0] Cr
- * index 2: Cb plane, [7:0] Cb
- */
-#define DRM_FORMAT_YUV410 fourcc_code('Y', 'U', 'V', '9') /* 4x4 subsampled Cb (1) and Cr (2) planes */
-#define DRM_FORMAT_YVU410 fourcc_code('Y', 'V', 'U', '9') /* 4x4 subsampled Cr (1) and Cb (2) planes */
-#define DRM_FORMAT_YUV411 fourcc_code('Y', 'U', '1', '1') /* 4x1 subsampled Cb (1) and Cr (2) planes */
-#define DRM_FORMAT_YVU411 fourcc_code('Y', 'V', '1', '1') /* 4x1 subsampled Cr (1) and Cb (2) planes */
-#define DRM_FORMAT_YUV420 fourcc_code('Y', 'U', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes */
-#define DRM_FORMAT_YVU420 fourcc_code('Y', 'V', '1', '2') /* 2x2 subsampled Cr (1) and Cb (2) planes */
-#define DRM_FORMAT_YUV422 fourcc_code('Y', 'U', '1', '6') /* 2x1 subsampled Cb (1) and Cr (2) planes */
-#define DRM_FORMAT_YVU422 fourcc_code('Y', 'V', '1', '6') /* 2x1 subsampled Cr (1) and Cb (2) planes */
-#define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */
-#define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */
-
-
-/*
- * Format Modifiers:
- *
- * Format modifiers describe, typically, a re-ordering or modification
- * of the data in a plane of an FB. This can be used to express tiled/
- * swizzled formats, or compression, or a combination of the two.
- *
- * The upper 8 bits of the format modifier are a vendor-id as assigned
- * below. The lower 56 bits are assigned as vendor sees fit.
- */
-
-/* Vendor Ids: */
-#define DRM_FORMAT_MOD_NONE 0
-#define DRM_FORMAT_MOD_VENDOR_NONE 0
-#define DRM_FORMAT_MOD_VENDOR_INTEL 0x01
-#define DRM_FORMAT_MOD_VENDOR_AMD 0x02
-#define DRM_FORMAT_MOD_VENDOR_NVIDIA 0x03
-#define DRM_FORMAT_MOD_VENDOR_SAMSUNG 0x04
-#define DRM_FORMAT_MOD_VENDOR_QCOM 0x05
-#define DRM_FORMAT_MOD_VENDOR_VIVANTE 0x06
-#define DRM_FORMAT_MOD_VENDOR_BROADCOM 0x07
-#define DRM_FORMAT_MOD_VENDOR_ARM 0x08
-/* add more to the end as needed */
-
-#define DRM_FORMAT_RESERVED ((1ULL << 56) - 1)
-
-#define fourcc_mod_code(vendor, val) \
- ((((__u64)DRM_FORMAT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
-
-/*
- * Format Modifier tokens:
- *
- * When adding a new token please document the layout with a code comment,
- * similar to the fourcc codes above. drm_fourcc.h is considered the
- * authoritative source for all of these.
- */
-
-/*
- * Invalid Modifier
- *
- * This modifier can be used as a sentinel to terminate the format modifiers
- * list, or to initialize a variable with an invalid modifier. It might also be
- * used to report an error back to userspace for certain APIs.
- */
-#define DRM_FORMAT_MOD_INVALID fourcc_mod_code(NONE, DRM_FORMAT_RESERVED)
-
-/*
- * Linear Layout
- *
- * Just plain linear layout. Note that this is different from no specifying any
- * modifier (e.g. not setting DRM_MODE_FB_MODIFIERS in the DRM_ADDFB2 ioctl),
- * which tells the driver to also take driver-internal information into account
- * and so might actually result in a tiled framebuffer.
- */
-#define DRM_FORMAT_MOD_LINEAR fourcc_mod_code(NONE, 0)
-
-/* Intel framebuffer modifiers */
-
-/*
- * Intel X-tiling layout
- *
- * This is a tiled layout using 4Kb tiles (except on gen2 where the tiles 2Kb)
- * in row-major layout. Within the tile bytes are laid out row-major, with
- * a platform-dependent stride. On top of that the memory can apply
- * platform-depending swizzling of some higher address bits into bit6.
- *
- * This format is highly platforms specific and not useful for cross-driver
- * sharing. It exists since on a given platform it does uniquely identify the
- * layout in a simple way for i915-specific userspace.
- */
-#define I915_FORMAT_MOD_X_TILED fourcc_mod_code(INTEL, 1)
-
-/*
- * Intel Y-tiling layout
- *
- * This is a tiled layout using 4Kb tiles (except on gen2 where the tiles 2Kb)
- * in row-major layout. Within the tile bytes are laid out in OWORD (16 bytes)
- * chunks column-major, with a platform-dependent height. On top of that the
- * memory can apply platform-depending swizzling of some higher address bits
- * into bit6.
- *
- * This format is highly platforms specific and not useful for cross-driver
- * sharing. It exists since on a given platform it does uniquely identify the
- * layout in a simple way for i915-specific userspace.
- */
-#define I915_FORMAT_MOD_Y_TILED fourcc_mod_code(INTEL, 2)
-
-/*
- * Intel Yf-tiling layout
- *
- * This is a tiled layout using 4Kb tiles in row-major layout.
- * Within the tile pixels are laid out in 16 256 byte units / sub-tiles which
- * are arranged in four groups (two wide, two high) with column-major layout.
- * Each group therefore consits out of four 256 byte units, which are also laid
- * out as 2x2 column-major.
- * 256 byte units are made out of four 64 byte blocks of pixels, producing
- * either a square block or a 2:1 unit.
- * 64 byte blocks of pixels contain four pixel rows of 16 bytes, where the width
- * in pixel depends on the pixel depth.
- */
-#define I915_FORMAT_MOD_Yf_TILED fourcc_mod_code(INTEL, 3)
-
-/*
- * Intel color control surface (CCS) for render compression
- *
- * The framebuffer format must be one of the 8:8:8:8 RGB formats.
- * The main surface will be plane index 0 and must be Y/Yf-tiled,
- * the CCS will be plane index 1.
- *
- * Each CCS tile matches a 1024x512 pixel area of the main surface.
- * To match certain aspects of the 3D hardware the CCS is
- * considered to be made up of normal 128Bx32 Y tiles, Thus
- * the CCS pitch must be specified in multiples of 128 bytes.
- *
- * In reality the CCS tile appears to be a 64Bx64 Y tile, composed
- * of QWORD (8 bytes) chunks instead of OWORD (16 bytes) chunks.
- * But that fact is not relevant unless the memory is accessed
- * directly.
- */
-#define I915_FORMAT_MOD_Y_TILED_CCS fourcc_mod_code(INTEL, 4)
-#define I915_FORMAT_MOD_Yf_TILED_CCS fourcc_mod_code(INTEL, 5)
-
-/*
- * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks
- *
- * Macroblocks are laid in a Z-shape, and each pixel data is following the
- * standard NV12 style.
- * As for NV12, an image is the result of two frame buffers: one for Y,
- * one for the interleaved Cb/Cr components (1/2 the height of the Y buffer).
- * Alignment requirements are (for each buffer):
- * - multiple of 128 pixels for the width
- * - multiple of 32 pixels for the height
- *
- * For more information: see https://linuxtv.org/downloads/v4l-dvb-apis/re32.html
- */
-#define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1)
-
-/*
- * Qualcomm Compressed Format
- *
- * Refers to a compressed variant of the base format that is compressed.
- * Implementation may be platform and base-format specific.
- *
- * Each macrotile consists of m x n (mostly 4 x 4) tiles.
- * Pixel data pitch/stride is aligned with macrotile width.
- * Pixel data height is aligned with macrotile height.
- * Entire pixel data buffer is aligned with 4k(bytes).
- */
-#define DRM_FORMAT_MOD_QCOM_COMPRESSED fourcc_mod_code(QCOM, 1)
-
-/* Vivante framebuffer modifiers */
-
-/*
- * Vivante 4x4 tiling layout
- *
- * This is a simple tiled layout using tiles of 4x4 pixels in a row-major
- * layout.
- */
-#define DRM_FORMAT_MOD_VIVANTE_TILED fourcc_mod_code(VIVANTE, 1)
-
-/*
- * Vivante 64x64 super-tiling layout
- *
- * This is a tiled layout using 64x64 pixel super-tiles, where each super-tile
- * contains 8x4 groups of 2x4 tiles of 4x4 pixels (like above) each, all in row-
- * major layout.
- *
- * For more information: see
- * https://github.com/etnaviv/etna_viv/blob/master/doc/hardware.md#texture-tiling
- */
-#define DRM_FORMAT_MOD_VIVANTE_SUPER_TILED fourcc_mod_code(VIVANTE, 2)
-
-/*
- * Vivante 4x4 tiling layout for dual-pipe
- *
- * Same as the 4x4 tiling layout, except every second 4x4 pixel tile starts at a
- * different base address. Offsets from the base addresses are therefore halved
- * compared to the non-split tiled layout.
- */
-#define DRM_FORMAT_MOD_VIVANTE_SPLIT_TILED fourcc_mod_code(VIVANTE, 3)
-
-/*
- * Vivante 64x64 super-tiling layout for dual-pipe
- *
- * Same as the 64x64 super-tiling layout, except every second 4x4 pixel tile
- * starts at a different base address. Offsets from the base addresses are
- * therefore halved compared to the non-split super-tiled layout.
- */
-#define DRM_FORMAT_MOD_VIVANTE_SPLIT_SUPER_TILED fourcc_mod_code(VIVANTE, 4)
-
-/* NVIDIA frame buffer modifiers */
-
-/*
- * Tegra Tiled Layout, used by Tegra 2, 3 and 4.
- *
- * Pixels are arranged in simple tiles of 16 x 16 bytes.
- */
-#define DRM_FORMAT_MOD_NVIDIA_TEGRA_TILED fourcc_mod_code(NVIDIA, 1)
-
-/*
- * 16Bx2 Block Linear layout, used by desktop GPUs, and Tegra K1 and later
- *
- * Pixels are arranged in 64x8 Groups Of Bytes (GOBs). GOBs are then stacked
- * vertically by a power of 2 (1 to 32 GOBs) to form a block.
- *
- * Within a GOB, data is ordered as 16B x 2 lines sectors laid in Z-shape.
- *
- * Parameter 'v' is the log2 encoding of the number of GOBs stacked vertically.
- * Valid values are:
- *
- * 0 == ONE_GOB
- * 1 == TWO_GOBS
- * 2 == FOUR_GOBS
- * 3 == EIGHT_GOBS
- * 4 == SIXTEEN_GOBS
- * 5 == THIRTYTWO_GOBS
- *
- * Chapter 20 "Pixel Memory Formats" of the Tegra X1 TRM describes this format
- * in full detail.
- */
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(v) \
- fourcc_mod_code(NVIDIA, 0x10 | ((v) & 0xf))
-
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_ONE_GOB \
- fourcc_mod_code(NVIDIA, 0x10)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_TWO_GOB \
- fourcc_mod_code(NVIDIA, 0x11)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_FOUR_GOB \
- fourcc_mod_code(NVIDIA, 0x12)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_EIGHT_GOB \
- fourcc_mod_code(NVIDIA, 0x13)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_SIXTEEN_GOB \
- fourcc_mod_code(NVIDIA, 0x14)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_THIRTYTWO_GOB \
- fourcc_mod_code(NVIDIA, 0x15)
-
-/*
- * Some Broadcom modifiers take parameters, for example the number of
- * vertical lines in the image. Reserve the lower 32 bits for modifier
- * type, and the next 24 bits for parameters. Top 8 bits are the
- * vendor code.
- */
-#define __fourcc_mod_broadcom_param_shift 8
-#define __fourcc_mod_broadcom_param_bits 48
-#define fourcc_mod_broadcom_code(val, params) \
- fourcc_mod_code(BROADCOM, ((((__u64)params) << __fourcc_mod_broadcom_param_shift) | val))
-#define fourcc_mod_broadcom_param(m) \
- ((int)(((m) >> __fourcc_mod_broadcom_param_shift) & \
- ((1ULL << __fourcc_mod_broadcom_param_bits) - 1)))
-#define fourcc_mod_broadcom_mod(m) \
- ((m) & ~(((1ULL << __fourcc_mod_broadcom_param_bits) - 1) << \
- __fourcc_mod_broadcom_param_shift))
-
-/*
- * Broadcom VC4 "T" format
- *
- * This is the primary layout that the V3D GPU can texture from (it
- * can't do linear). The T format has:
- *
- * - 64b utiles of pixels in a raster-order grid according to cpp. It's 4x4
- * pixels at 32 bit depth.
- *
- * - 1k subtiles made of a 4x4 raster-order grid of 64b utiles (so usually
- * 16x16 pixels).
- *
- * - 4k tiles made of a 2x2 grid of 1k subtiles (so usually 32x32 pixels). On
- * even 4k tile rows, they're arranged as (BL, TL, TR, BR), and on odd rows
- * they're (TR, BR, BL, TL), where bottom left is start of memory.
- *
- * - an image made of 4k tiles in rows either left-to-right (even rows of 4k
- * tiles) or right-to-left (odd rows of 4k tiles).
- */
-#define DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED fourcc_mod_code(BROADCOM, 1)
-
-/*
- * Broadcom SAND format
- *
- * This is the native format that the H.264 codec block uses. For VC4
- * HVS, it is only valid for H.264 (NV12/21) and RGBA modes.
- *
- * The image can be considered to be split into columns, and the
- * columns are placed consecutively into memory. The width of those
- * columns can be either 32, 64, 128, or 256 pixels, but in practice
- * only 128 pixel columns are used.
- *
- * The pitch between the start of each column is set to optimally
- * switch between SDRAM banks. This is passed as the number of lines
- * of column width in the modifier (we can't use the stride value due
- * to various core checks that look at it , so you should set the
- * stride to width*cpp).
- *
- * Note that the column height for this format modifier is the same
- * for all of the planes, assuming that each column contains both Y
- * and UV. Some SAND-using hardware stores UV in a separate tiled
- * image from Y to reduce the column height, which is not supported
- * with these modifiers.
- */
-
-#define DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(v) \
- fourcc_mod_broadcom_code(2, v)
-#define DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(v) \
- fourcc_mod_broadcom_code(3, v)
-#define DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(v) \
- fourcc_mod_broadcom_code(4, v)
-#define DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(v) \
- fourcc_mod_broadcom_code(5, v)
-
-#define DRM_FORMAT_MOD_BROADCOM_SAND32 \
- DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(0)
-#define DRM_FORMAT_MOD_BROADCOM_SAND64 \
- DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(0)
-#define DRM_FORMAT_MOD_BROADCOM_SAND128 \
- DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(0)
-#define DRM_FORMAT_MOD_BROADCOM_SAND256 \
- DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(0)
-
-/* Broadcom UIF format
- *
- * This is the common format for the current Broadcom multimedia
- * blocks, including V3D 3.x and newer, newer video codecs, and
- * displays.
- *
- * The image consists of utiles (64b blocks), UIF blocks (2x2 utiles),
- * and macroblocks (4x4 UIF blocks). Those 4x4 UIF block groups are
- * stored in columns, with padding between the columns to ensure that
- * moving from one column to the next doesn't hit the same SDRAM page
- * bank.
- *
- * To calculate the padding, it is assumed that each hardware block
- * and the software driving it knows the platform's SDRAM page size,
- * number of banks, and XOR address, and that it's identical between
- * all blocks using the format. This tiling modifier will use XOR as
- * necessary to reduce the padding. If a hardware block can't do XOR,
- * the assumption is that a no-XOR tiling modifier will be created.
- */
-#define DRM_FORMAT_MOD_BROADCOM_UIF fourcc_mod_code(BROADCOM, 6)
-
-/*
- * Arm Framebuffer Compression (AFBC) modifiers
- *
- * AFBC is a proprietary lossless image compression protocol and format.
- * It provides fine-grained random access and minimizes the amount of data
- * transferred between IP blocks.
- *
- * AFBC has several features which may be supported and/or used, which are
- * represented using bits in the modifier. Not all combinations are valid,
- * and different devices or use-cases may support different combinations.
- */
-#define DRM_FORMAT_MOD_ARM_AFBC(__afbc_mode) fourcc_mod_code(ARM, __afbc_mode)
-
-/*
- * AFBC superblock size
- *
- * Indicates the superblock size(s) used for the AFBC buffer. The buffer
- * size (in pixels) must be aligned to a multiple of the superblock size.
- * Four lowest significant bits(LSBs) are reserved for block size.
- */
-#define AFBC_FORMAT_MOD_BLOCK_SIZE_MASK 0xf
-#define AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 (1ULL)
-#define AFBC_FORMAT_MOD_BLOCK_SIZE_32x8 (2ULL)
-
-/*
- * AFBC lossless colorspace transform
- *
- * Indicates that the buffer makes use of the AFBC lossless colorspace
- * transform.
- */
-#define AFBC_FORMAT_MOD_YTR (1ULL << 4)
-
-/*
- * AFBC block-split
- *
- * Indicates that the payload of each superblock is split. The second
- * half of the payload is positioned at a predefined offset from the start
- * of the superblock payload.
- */
-#define AFBC_FORMAT_MOD_SPLIT (1ULL << 5)
-
-/*
- * AFBC sparse layout
- *
- * This flag indicates that the payload of each superblock must be stored at a
- * predefined position relative to the other superblocks in the same AFBC
- * buffer. This order is the same order used by the header buffer. In this mode
- * each superblock is given the same amount of space as an uncompressed
- * superblock of the particular format would require, rounding up to the next
- * multiple of 128 bytes in size.
- */
-#define AFBC_FORMAT_MOD_SPARSE (1ULL << 6)
-
-/*
- * AFBC copy-block restrict
- *
- * Buffers with this flag must obey the copy-block restriction. The restriction
- * is such that there are no copy-blocks referring across the border of 8x8
- * blocks. For the subsampled data the 8x8 limitation is also subsampled.
- */
-#define AFBC_FORMAT_MOD_CBR (1ULL << 7)
-
-/*
- * AFBC tiled layout
- *
- * The tiled layout groups superblocks in 8x8 or 4x4 tiles, where all
- * superblocks inside a tile are stored together in memory. 8x8 tiles are used
- * for pixel formats up to and including 32 bpp while 4x4 tiles are used for
- * larger bpp formats. The order between the tiles is scan line.
- * When the tiled layout is used, the buffer size (in pixels) must be aligned
- * to the tile size.
- */
-#define AFBC_FORMAT_MOD_TILED (1ULL << 8)
-
-/*
- * AFBC solid color blocks
- *
- * Indicates that the buffer makes use of solid-color blocks, whereby bandwidth
- * can be reduced if a whole superblock is a single color.
- */
-#define AFBC_FORMAT_MOD_SC (1ULL << 9)
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* DRM_FOURCC_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/drm_mode.h b/lib/libc/include/generic-musl/drm/drm_mode.h
deleted file mode 100644
index 6ed4a8546fb1c77a5544eca5331b46a26e60f650..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/drm_mode.h
+++ /dev/null
@@ -1,894 +0,0 @@
-/*
- * Copyright (c) 2007 Dave Airlie
- * Copyright (c) 2007 Jakob Bornecrantz
- * Copyright (c) 2008 Red Hat Inc.
- * Copyright (c) 2007-2008 Tungsten Graphics, Inc., Cedar Park, TX., USA
- * Copyright (c) 2007-2008 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef _DRM_MODE_H
-#define _DRM_MODE_H
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#define DRM_DISPLAY_INFO_LEN 32
-#define DRM_CONNECTOR_NAME_LEN 32
-#define DRM_DISPLAY_MODE_LEN 32
-#define DRM_PROP_NAME_LEN 32
-
-#define DRM_MODE_TYPE_BUILTIN (1<<0) /* deprecated */
-#define DRM_MODE_TYPE_CLOCK_C ((1<<1) | DRM_MODE_TYPE_BUILTIN) /* deprecated */
-#define DRM_MODE_TYPE_CRTC_C ((1<<2) | DRM_MODE_TYPE_BUILTIN) /* deprecated */
-#define DRM_MODE_TYPE_PREFERRED (1<<3)
-#define DRM_MODE_TYPE_DEFAULT (1<<4) /* deprecated */
-#define DRM_MODE_TYPE_USERDEF (1<<5)
-#define DRM_MODE_TYPE_DRIVER (1<<6)
-
-#define DRM_MODE_TYPE_ALL (DRM_MODE_TYPE_PREFERRED | \
- DRM_MODE_TYPE_USERDEF | \
- DRM_MODE_TYPE_DRIVER)
-
-/* Video mode flags */
-/* bit compatible with the xrandr RR_ definitions (bits 0-13)
- *
- * ABI warning: Existing userspace really expects
- * the mode flags to match the xrandr definitions. Any
- * changes that don't match the xrandr definitions will
- * likely need a new client cap or some other mechanism
- * to avoid breaking existing userspace. This includes
- * allocating new flags in the previously unused bits!
- */
-#define DRM_MODE_FLAG_PHSYNC (1<<0)
-#define DRM_MODE_FLAG_NHSYNC (1<<1)
-#define DRM_MODE_FLAG_PVSYNC (1<<2)
-#define DRM_MODE_FLAG_NVSYNC (1<<3)
-#define DRM_MODE_FLAG_INTERLACE (1<<4)
-#define DRM_MODE_FLAG_DBLSCAN (1<<5)
-#define DRM_MODE_FLAG_CSYNC (1<<6)
-#define DRM_MODE_FLAG_PCSYNC (1<<7)
-#define DRM_MODE_FLAG_NCSYNC (1<<8)
-#define DRM_MODE_FLAG_HSKEW (1<<9) /* hskew provided */
-#define DRM_MODE_FLAG_BCAST (1<<10) /* deprecated */
-#define DRM_MODE_FLAG_PIXMUX (1<<11) /* deprecated */
-#define DRM_MODE_FLAG_DBLCLK (1<<12)
-#define DRM_MODE_FLAG_CLKDIV2 (1<<13)
- /*
- * When adding a new stereo mode don't forget to adjust DRM_MODE_FLAGS_3D_MAX
- * (define not exposed to user space).
- */
-#define DRM_MODE_FLAG_3D_MASK (0x1f<<14)
-#define DRM_MODE_FLAG_3D_NONE (0<<14)
-#define DRM_MODE_FLAG_3D_FRAME_PACKING (1<<14)
-#define DRM_MODE_FLAG_3D_FIELD_ALTERNATIVE (2<<14)
-#define DRM_MODE_FLAG_3D_LINE_ALTERNATIVE (3<<14)
-#define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_FULL (4<<14)
-#define DRM_MODE_FLAG_3D_L_DEPTH (5<<14)
-#define DRM_MODE_FLAG_3D_L_DEPTH_GFX_GFX_DEPTH (6<<14)
-#define DRM_MODE_FLAG_3D_TOP_AND_BOTTOM (7<<14)
-#define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF (8<<14)
-
-/* Picture aspect ratio options */
-#define DRM_MODE_PICTURE_ASPECT_NONE 0
-#define DRM_MODE_PICTURE_ASPECT_4_3 1
-#define DRM_MODE_PICTURE_ASPECT_16_9 2
-#define DRM_MODE_PICTURE_ASPECT_64_27 3
-#define DRM_MODE_PICTURE_ASPECT_256_135 4
-
-/* Content type options */
-#define DRM_MODE_CONTENT_TYPE_NO_DATA 0
-#define DRM_MODE_CONTENT_TYPE_GRAPHICS 1
-#define DRM_MODE_CONTENT_TYPE_PHOTO 2
-#define DRM_MODE_CONTENT_TYPE_CINEMA 3
-#define DRM_MODE_CONTENT_TYPE_GAME 4
-
-/* Aspect ratio flag bitmask (4 bits 22:19) */
-#define DRM_MODE_FLAG_PIC_AR_MASK (0x0F<<19)
-#define DRM_MODE_FLAG_PIC_AR_NONE \
- (DRM_MODE_PICTURE_ASPECT_NONE<<19)
-#define DRM_MODE_FLAG_PIC_AR_4_3 \
- (DRM_MODE_PICTURE_ASPECT_4_3<<19)
-#define DRM_MODE_FLAG_PIC_AR_16_9 \
- (DRM_MODE_PICTURE_ASPECT_16_9<<19)
-#define DRM_MODE_FLAG_PIC_AR_64_27 \
- (DRM_MODE_PICTURE_ASPECT_64_27<<19)
-#define DRM_MODE_FLAG_PIC_AR_256_135 \
- (DRM_MODE_PICTURE_ASPECT_256_135<<19)
-
-#define DRM_MODE_FLAG_ALL (DRM_MODE_FLAG_PHSYNC | \
- DRM_MODE_FLAG_NHSYNC | \
- DRM_MODE_FLAG_PVSYNC | \
- DRM_MODE_FLAG_NVSYNC | \
- DRM_MODE_FLAG_INTERLACE | \
- DRM_MODE_FLAG_DBLSCAN | \
- DRM_MODE_FLAG_CSYNC | \
- DRM_MODE_FLAG_PCSYNC | \
- DRM_MODE_FLAG_NCSYNC | \
- DRM_MODE_FLAG_HSKEW | \
- DRM_MODE_FLAG_DBLCLK | \
- DRM_MODE_FLAG_CLKDIV2 | \
- DRM_MODE_FLAG_3D_MASK)
-
-/* DPMS flags */
-/* bit compatible with the xorg definitions. */
-#define DRM_MODE_DPMS_ON 0
-#define DRM_MODE_DPMS_STANDBY 1
-#define DRM_MODE_DPMS_SUSPEND 2
-#define DRM_MODE_DPMS_OFF 3
-
-/* Scaling mode options */
-#define DRM_MODE_SCALE_NONE 0 /* Unmodified timing (display or
- software can still scale) */
-#define DRM_MODE_SCALE_FULLSCREEN 1 /* Full screen, ignore aspect */
-#define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */
-#define DRM_MODE_SCALE_ASPECT 3 /* Full screen, preserve aspect */
-
-/* Dithering mode options */
-#define DRM_MODE_DITHERING_OFF 0
-#define DRM_MODE_DITHERING_ON 1
-#define DRM_MODE_DITHERING_AUTO 2
-
-/* Dirty info options */
-#define DRM_MODE_DIRTY_OFF 0
-#define DRM_MODE_DIRTY_ON 1
-#define DRM_MODE_DIRTY_ANNOTATE 2
-
-/* Link Status options */
-#define DRM_MODE_LINK_STATUS_GOOD 0
-#define DRM_MODE_LINK_STATUS_BAD 1
-
-/*
- * DRM_MODE_ROTATE_
- *
- * Signals that a drm plane is been rotated degrees in counter
- * clockwise direction.
- *
- * This define is provided as a convenience, looking up the property id
- * using the name->prop id lookup is the preferred method.
- */
-#define DRM_MODE_ROTATE_0 (1<<0)
-#define DRM_MODE_ROTATE_90 (1<<1)
-#define DRM_MODE_ROTATE_180 (1<<2)
-#define DRM_MODE_ROTATE_270 (1<<3)
-
-/*
- * DRM_MODE_ROTATE_MASK
- *
- * Bitmask used to look for drm plane rotations.
- */
-#define DRM_MODE_ROTATE_MASK (\
- DRM_MODE_ROTATE_0 | \
- DRM_MODE_ROTATE_90 | \
- DRM_MODE_ROTATE_180 | \
- DRM_MODE_ROTATE_270)
-
-/*
- * DRM_MODE_REFLECT_
- *
- * Signals that the contents of a drm plane is reflected in the axis,
- * in the same way as mirroring.
- *
- * This define is provided as a convenience, looking up the property id
- * using the name->prop id lookup is the preferred method.
- */
-#define DRM_MODE_REFLECT_X (1<<4)
-#define DRM_MODE_REFLECT_Y (1<<5)
-
-/*
- * DRM_MODE_REFLECT_MASK
- *
- * Bitmask used to look for drm plane reflections.
- */
-#define DRM_MODE_REFLECT_MASK (\
- DRM_MODE_REFLECT_X | \
- DRM_MODE_REFLECT_Y)
-
-/* Content Protection Flags */
-#define DRM_MODE_CONTENT_PROTECTION_UNDESIRED 0
-#define DRM_MODE_CONTENT_PROTECTION_DESIRED 1
-#define DRM_MODE_CONTENT_PROTECTION_ENABLED 2
-
-struct drm_mode_modeinfo {
- __u32 clock;
- __u16 hdisplay;
- __u16 hsync_start;
- __u16 hsync_end;
- __u16 htotal;
- __u16 hskew;
- __u16 vdisplay;
- __u16 vsync_start;
- __u16 vsync_end;
- __u16 vtotal;
- __u16 vscan;
-
- __u32 vrefresh;
-
- __u32 flags;
- __u32 type;
- char name[DRM_DISPLAY_MODE_LEN];
-};
-
-struct drm_mode_card_res {
- __u64 fb_id_ptr;
- __u64 crtc_id_ptr;
- __u64 connector_id_ptr;
- __u64 encoder_id_ptr;
- __u32 count_fbs;
- __u32 count_crtcs;
- __u32 count_connectors;
- __u32 count_encoders;
- __u32 min_width;
- __u32 max_width;
- __u32 min_height;
- __u32 max_height;
-};
-
-struct drm_mode_crtc {
- __u64 set_connectors_ptr;
- __u32 count_connectors;
-
- __u32 crtc_id; /**< Id */
- __u32 fb_id; /**< Id of framebuffer */
-
- __u32 x; /**< x Position on the framebuffer */
- __u32 y; /**< y Position on the framebuffer */
-
- __u32 gamma_size;
- __u32 mode_valid;
- struct drm_mode_modeinfo mode;
-};
-
-#define DRM_MODE_PRESENT_TOP_FIELD (1<<0)
-#define DRM_MODE_PRESENT_BOTTOM_FIELD (1<<1)
-
-/* Planes blend with or override other bits on the CRTC */
-struct drm_mode_set_plane {
- __u32 plane_id;
- __u32 crtc_id;
- __u32 fb_id; /* fb object contains surface format type */
- __u32 flags; /* see above flags */
-
- /* Signed dest location allows it to be partially off screen */
- __s32 crtc_x;
- __s32 crtc_y;
- __u32 crtc_w;
- __u32 crtc_h;
-
- /* Source values are 16.16 fixed point */
- __u32 src_x;
- __u32 src_y;
- __u32 src_h;
- __u32 src_w;
-};
-
-struct drm_mode_get_plane {
- __u32 plane_id;
-
- __u32 crtc_id;
- __u32 fb_id;
-
- __u32 possible_crtcs;
- __u32 gamma_size;
-
- __u32 count_format_types;
- __u64 format_type_ptr;
-};
-
-struct drm_mode_get_plane_res {
- __u64 plane_id_ptr;
- __u32 count_planes;
-};
-
-#define DRM_MODE_ENCODER_NONE 0
-#define DRM_MODE_ENCODER_DAC 1
-#define DRM_MODE_ENCODER_TMDS 2
-#define DRM_MODE_ENCODER_LVDS 3
-#define DRM_MODE_ENCODER_TVDAC 4
-#define DRM_MODE_ENCODER_VIRTUAL 5
-#define DRM_MODE_ENCODER_DSI 6
-#define DRM_MODE_ENCODER_DPMST 7
-#define DRM_MODE_ENCODER_DPI 8
-
-struct drm_mode_get_encoder {
- __u32 encoder_id;
- __u32 encoder_type;
-
- __u32 crtc_id; /**< Id of crtc */
-
- __u32 possible_crtcs;
- __u32 possible_clones;
-};
-
-/* This is for connectors with multiple signal types. */
-/* Try to match DRM_MODE_CONNECTOR_X as closely as possible. */
-enum drm_mode_subconnector {
- DRM_MODE_SUBCONNECTOR_Automatic = 0,
- DRM_MODE_SUBCONNECTOR_Unknown = 0,
- DRM_MODE_SUBCONNECTOR_DVID = 3,
- DRM_MODE_SUBCONNECTOR_DVIA = 4,
- DRM_MODE_SUBCONNECTOR_Composite = 5,
- DRM_MODE_SUBCONNECTOR_SVIDEO = 6,
- DRM_MODE_SUBCONNECTOR_Component = 8,
- DRM_MODE_SUBCONNECTOR_SCART = 9,
-};
-
-#define DRM_MODE_CONNECTOR_Unknown 0
-#define DRM_MODE_CONNECTOR_VGA 1
-#define DRM_MODE_CONNECTOR_DVII 2
-#define DRM_MODE_CONNECTOR_DVID 3
-#define DRM_MODE_CONNECTOR_DVIA 4
-#define DRM_MODE_CONNECTOR_Composite 5
-#define DRM_MODE_CONNECTOR_SVIDEO 6
-#define DRM_MODE_CONNECTOR_LVDS 7
-#define DRM_MODE_CONNECTOR_Component 8
-#define DRM_MODE_CONNECTOR_9PinDIN 9
-#define DRM_MODE_CONNECTOR_DisplayPort 10
-#define DRM_MODE_CONNECTOR_HDMIA 11
-#define DRM_MODE_CONNECTOR_HDMIB 12
-#define DRM_MODE_CONNECTOR_TV 13
-#define DRM_MODE_CONNECTOR_eDP 14
-#define DRM_MODE_CONNECTOR_VIRTUAL 15
-#define DRM_MODE_CONNECTOR_DSI 16
-#define DRM_MODE_CONNECTOR_DPI 17
-#define DRM_MODE_CONNECTOR_WRITEBACK 18
-
-struct drm_mode_get_connector {
-
- __u64 encoders_ptr;
- __u64 modes_ptr;
- __u64 props_ptr;
- __u64 prop_values_ptr;
-
- __u32 count_modes;
- __u32 count_props;
- __u32 count_encoders;
-
- __u32 encoder_id; /**< Current Encoder */
- __u32 connector_id; /**< Id */
- __u32 connector_type;
- __u32 connector_type_id;
-
- __u32 connection;
- __u32 mm_width; /**< width in millimeters */
- __u32 mm_height; /**< height in millimeters */
- __u32 subpixel;
-
- __u32 pad;
-};
-
-#define DRM_MODE_PROP_PENDING (1<<0) /* deprecated, do not use */
-#define DRM_MODE_PROP_RANGE (1<<1)
-#define DRM_MODE_PROP_IMMUTABLE (1<<2)
-#define DRM_MODE_PROP_ENUM (1<<3) /* enumerated type with text strings */
-#define DRM_MODE_PROP_BLOB (1<<4)
-#define DRM_MODE_PROP_BITMASK (1<<5) /* bitmask of enumerated types */
-
-/* non-extended types: legacy bitmask, one bit per type: */
-#define DRM_MODE_PROP_LEGACY_TYPE ( \
- DRM_MODE_PROP_RANGE | \
- DRM_MODE_PROP_ENUM | \
- DRM_MODE_PROP_BLOB | \
- DRM_MODE_PROP_BITMASK)
-
-/* extended-types: rather than continue to consume a bit per type,
- * grab a chunk of the bits to use as integer type id.
- */
-#define DRM_MODE_PROP_EXTENDED_TYPE 0x0000ffc0
-#define DRM_MODE_PROP_TYPE(n) ((n) << 6)
-#define DRM_MODE_PROP_OBJECT DRM_MODE_PROP_TYPE(1)
-#define DRM_MODE_PROP_SIGNED_RANGE DRM_MODE_PROP_TYPE(2)
-
-/* the PROP_ATOMIC flag is used to hide properties from userspace that
- * is not aware of atomic properties. This is mostly to work around
- * older userspace (DDX drivers) that read/write each prop they find,
- * witout being aware that this could be triggering a lengthy modeset.
- */
-#define DRM_MODE_PROP_ATOMIC 0x80000000
-
-struct drm_mode_property_enum {
- __u64 value;
- char name[DRM_PROP_NAME_LEN];
-};
-
-struct drm_mode_get_property {
- __u64 values_ptr; /* values and blob lengths */
- __u64 enum_blob_ptr; /* enum and blob id ptrs */
-
- __u32 prop_id;
- __u32 flags;
- char name[DRM_PROP_NAME_LEN];
-
- __u32 count_values;
- /* This is only used to count enum values, not blobs. The _blobs is
- * simply because of a historical reason, i.e. backwards compat. */
- __u32 count_enum_blobs;
-};
-
-struct drm_mode_connector_set_property {
- __u64 value;
- __u32 prop_id;
- __u32 connector_id;
-};
-
-#define DRM_MODE_OBJECT_CRTC 0xcccccccc
-#define DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0
-#define DRM_MODE_OBJECT_ENCODER 0xe0e0e0e0
-#define DRM_MODE_OBJECT_MODE 0xdededede
-#define DRM_MODE_OBJECT_PROPERTY 0xb0b0b0b0
-#define DRM_MODE_OBJECT_FB 0xfbfbfbfb
-#define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb
-#define DRM_MODE_OBJECT_PLANE 0xeeeeeeee
-#define DRM_MODE_OBJECT_ANY 0
-
-struct drm_mode_obj_get_properties {
- __u64 props_ptr;
- __u64 prop_values_ptr;
- __u32 count_props;
- __u32 obj_id;
- __u32 obj_type;
-};
-
-struct drm_mode_obj_set_property {
- __u64 value;
- __u32 prop_id;
- __u32 obj_id;
- __u32 obj_type;
-};
-
-struct drm_mode_get_blob {
- __u32 blob_id;
- __u32 length;
- __u64 data;
-};
-
-struct drm_mode_fb_cmd {
- __u32 fb_id;
- __u32 width;
- __u32 height;
- __u32 pitch;
- __u32 bpp;
- __u32 depth;
- /* driver specific handle */
- __u32 handle;
-};
-
-#define DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */
-#define DRM_MODE_FB_MODIFIERS (1<<1) /* enables ->modifer[] */
-
-struct drm_mode_fb_cmd2 {
- __u32 fb_id;
- __u32 width;
- __u32 height;
- __u32 pixel_format; /* fourcc code from drm_fourcc.h */
- __u32 flags; /* see above flags */
-
- /*
- * In case of planar formats, this ioctl allows up to 4
- * buffer objects with offsets and pitches per plane.
- * The pitch and offset order is dictated by the fourcc,
- * e.g. NV12 (http://fourcc.org/yuv.php#NV12) is described as:
- *
- * YUV 4:2:0 image with a plane of 8 bit Y samples
- * followed by an interleaved U/V plane containing
- * 8 bit 2x2 subsampled colour difference samples.
- *
- * So it would consist of Y as offsets[0] and UV as
- * offsets[1]. Note that offsets[0] will generally
- * be 0 (but this is not required).
- *
- * To accommodate tiled, compressed, etc formats, a
- * modifier can be specified. The default value of zero
- * indicates "native" format as specified by the fourcc.
- * Vendor specific modifier token. Note that even though
- * it looks like we have a modifier per-plane, we in fact
- * do not. The modifier for each plane must be identical.
- * Thus all combinations of different data layouts for
- * multi plane formats must be enumerated as separate
- * modifiers.
- */
- __u32 handles[4];
- __u32 pitches[4]; /* pitch for each plane */
- __u32 offsets[4]; /* offset of each plane */
- __u64 modifier[4]; /* ie, tiling, compress */
-};
-
-#define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01
-#define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02
-#define DRM_MODE_FB_DIRTY_FLAGS 0x03
-
-#define DRM_MODE_FB_DIRTY_MAX_CLIPS 256
-
-/*
- * Mark a region of a framebuffer as dirty.
- *
- * Some hardware does not automatically update display contents
- * as a hardware or software draw to a framebuffer. This ioctl
- * allows userspace to tell the kernel and the hardware what
- * regions of the framebuffer have changed.
- *
- * The kernel or hardware is free to update more then just the
- * region specified by the clip rects. The kernel or hardware
- * may also delay and/or coalesce several calls to dirty into a
- * single update.
- *
- * Userspace may annotate the updates, the annotates are a
- * promise made by the caller that the change is either a copy
- * of pixels or a fill of a single color in the region specified.
- *
- * If the DRM_MODE_FB_DIRTY_ANNOTATE_COPY flag is given then
- * the number of updated regions are half of num_clips given,
- * where the clip rects are paired in src and dst. The width and
- * height of each one of the pairs must match.
- *
- * If the DRM_MODE_FB_DIRTY_ANNOTATE_FILL flag is given the caller
- * promises that the region specified of the clip rects is filled
- * completely with a single color as given in the color argument.
- */
-
-struct drm_mode_fb_dirty_cmd {
- __u32 fb_id;
- __u32 flags;
- __u32 color;
- __u32 num_clips;
- __u64 clips_ptr;
-};
-
-struct drm_mode_mode_cmd {
- __u32 connector_id;
- struct drm_mode_modeinfo mode;
-};
-
-#define DRM_MODE_CURSOR_BO 0x01
-#define DRM_MODE_CURSOR_MOVE 0x02
-#define DRM_MODE_CURSOR_FLAGS 0x03
-
-/*
- * depending on the value in flags different members are used.
- *
- * CURSOR_BO uses
- * crtc_id
- * width
- * height
- * handle - if 0 turns the cursor off
- *
- * CURSOR_MOVE uses
- * crtc_id
- * x
- * y
- */
-struct drm_mode_cursor {
- __u32 flags;
- __u32 crtc_id;
- __s32 x;
- __s32 y;
- __u32 width;
- __u32 height;
- /* driver specific handle */
- __u32 handle;
-};
-
-struct drm_mode_cursor2 {
- __u32 flags;
- __u32 crtc_id;
- __s32 x;
- __s32 y;
- __u32 width;
- __u32 height;
- /* driver specific handle */
- __u32 handle;
- __s32 hot_x;
- __s32 hot_y;
-};
-
-struct drm_mode_crtc_lut {
- __u32 crtc_id;
- __u32 gamma_size;
-
- /* pointers to arrays */
- __u64 red;
- __u64 green;
- __u64 blue;
-};
-
-struct drm_color_ctm {
- /*
- * Conversion matrix in S31.32 sign-magnitude
- * (not two's complement!) format.
- */
- __u64 matrix[9];
-};
-
-struct drm_color_lut {
- /*
- * Data is U0.16 fixed point format.
- */
- __u16 red;
- __u16 green;
- __u16 blue;
- __u16 reserved;
-};
-
-#define DRM_MODE_PAGE_FLIP_EVENT 0x01
-#define DRM_MODE_PAGE_FLIP_ASYNC 0x02
-#define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4
-#define DRM_MODE_PAGE_FLIP_TARGET_RELATIVE 0x8
-#define DRM_MODE_PAGE_FLIP_TARGET (DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE | \
- DRM_MODE_PAGE_FLIP_TARGET_RELATIVE)
-#define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT | \
- DRM_MODE_PAGE_FLIP_ASYNC | \
- DRM_MODE_PAGE_FLIP_TARGET)
-
-/*
- * Request a page flip on the specified crtc.
- *
- * This ioctl will ask KMS to schedule a page flip for the specified
- * crtc. Once any pending rendering targeting the specified fb (as of
- * ioctl time) has completed, the crtc will be reprogrammed to display
- * that fb after the next vertical refresh. The ioctl returns
- * immediately, but subsequent rendering to the current fb will block
- * in the execbuffer ioctl until the page flip happens. If a page
- * flip is already pending as the ioctl is called, EBUSY will be
- * returned.
- *
- * Flag DRM_MODE_PAGE_FLIP_EVENT requests that drm sends back a vblank
- * event (see drm.h: struct drm_event_vblank) when the page flip is
- * done. The user_data field passed in with this ioctl will be
- * returned as the user_data field in the vblank event struct.
- *
- * Flag DRM_MODE_PAGE_FLIP_ASYNC requests that the flip happen
- * 'as soon as possible', meaning that it not delay waiting for vblank.
- * This may cause tearing on the screen.
- *
- * The reserved field must be zero.
- */
-
-struct drm_mode_crtc_page_flip {
- __u32 crtc_id;
- __u32 fb_id;
- __u32 flags;
- __u32 reserved;
- __u64 user_data;
-};
-
-/*
- * Request a page flip on the specified crtc.
- *
- * Same as struct drm_mode_crtc_page_flip, but supports new flags and
- * re-purposes the reserved field:
- *
- * The sequence field must be zero unless either of the
- * DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is specified. When
- * the ABSOLUTE flag is specified, the sequence field denotes the absolute
- * vblank sequence when the flip should take effect. When the RELATIVE
- * flag is specified, the sequence field denotes the relative (to the
- * current one when the ioctl is called) vblank sequence when the flip
- * should take effect. NOTE: DRM_IOCTL_WAIT_VBLANK must still be used to
- * make sure the vblank sequence before the target one has passed before
- * calling this ioctl. The purpose of the
- * DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is merely to clarify
- * the target for when code dealing with a page flip runs during a
- * vertical blank period.
- */
-
-struct drm_mode_crtc_page_flip_target {
- __u32 crtc_id;
- __u32 fb_id;
- __u32 flags;
- __u32 sequence;
- __u64 user_data;
-};
-
-/* create a dumb scanout buffer */
-struct drm_mode_create_dumb {
- __u32 height;
- __u32 width;
- __u32 bpp;
- __u32 flags;
- /* handle, pitch, size will be returned */
- __u32 handle;
- __u32 pitch;
- __u64 size;
-};
-
-/* set up for mmap of a dumb scanout buffer */
-struct drm_mode_map_dumb {
- /** Handle for the object being mapped. */
- __u32 handle;
- __u32 pad;
- /**
- * Fake offset to use for subsequent mmap call
- *
- * This is a fixed-size type for 32/64 compatibility.
- */
- __u64 offset;
-};
-
-struct drm_mode_destroy_dumb {
- __u32 handle;
-};
-
-/* page-flip flags are valid, plus: */
-#define DRM_MODE_ATOMIC_TEST_ONLY 0x0100
-#define DRM_MODE_ATOMIC_NONBLOCK 0x0200
-#define DRM_MODE_ATOMIC_ALLOW_MODESET 0x0400
-
-#define DRM_MODE_ATOMIC_FLAGS (\
- DRM_MODE_PAGE_FLIP_EVENT |\
- DRM_MODE_PAGE_FLIP_ASYNC |\
- DRM_MODE_ATOMIC_TEST_ONLY |\
- DRM_MODE_ATOMIC_NONBLOCK |\
- DRM_MODE_ATOMIC_ALLOW_MODESET)
-
-struct drm_mode_atomic {
- __u32 flags;
- __u32 count_objs;
- __u64 objs_ptr;
- __u64 count_props_ptr;
- __u64 props_ptr;
- __u64 prop_values_ptr;
- __u64 reserved;
- __u64 user_data;
-};
-
-struct drm_format_modifier_blob {
-#define FORMAT_BLOB_CURRENT 1
- /* Version of this blob format */
- __u32 version;
-
- /* Flags */
- __u32 flags;
-
- /* Number of fourcc formats supported */
- __u32 count_formats;
-
- /* Where in this blob the formats exist (in bytes) */
- __u32 formats_offset;
-
- /* Number of drm_format_modifiers */
- __u32 count_modifiers;
-
- /* Where in this blob the modifiers exist (in bytes) */
- __u32 modifiers_offset;
-
- /* __u32 formats[] */
- /* struct drm_format_modifier modifiers[] */
-};
-
-struct drm_format_modifier {
- /* Bitmask of formats in get_plane format list this info applies to. The
- * offset allows a sliding window of which 64 formats (bits).
- *
- * Some examples:
- * In today's world with < 65 formats, and formats 0, and 2 are
- * supported
- * 0x0000000000000005
- * ^-offset = 0, formats = 5
- *
- * If the number formats grew to 128, and formats 98-102 are
- * supported with the modifier:
- *
- * 0x0000007c00000000 0000000000000000
- * ^
- * |__offset = 64, formats = 0x7c00000000
- *
- */
- __u64 formats;
- __u32 offset;
- __u32 pad;
-
- /* The modifier that applies to the >get_plane format list bitmask. */
- __u64 modifier;
-};
-
-/**
- * Create a new 'blob' data property, copying length bytes from data pointer,
- * and returning new blob ID.
- */
-struct drm_mode_create_blob {
- /** Pointer to data to copy. */
- __u64 data;
- /** Length of data to copy. */
- __u32 length;
- /** Return: new property ID. */
- __u32 blob_id;
-};
-
-/**
- * Destroy a user-created blob property.
- */
-struct drm_mode_destroy_blob {
- __u32 blob_id;
-};
-
-/**
- * Lease mode resources, creating another drm_master.
- */
-struct drm_mode_create_lease {
- /** Pointer to array of object ids (__u32) */
- __u64 object_ids;
- /** Number of object ids */
- __u32 object_count;
- /** flags for new FD (O_CLOEXEC, etc) */
- __u32 flags;
-
- /** Return: unique identifier for lessee. */
- __u32 lessee_id;
- /** Return: file descriptor to new drm_master file */
- __u32 fd;
-};
-
-/**
- * List lesses from a drm_master
- */
-struct drm_mode_list_lessees {
- /** Number of lessees.
- * On input, provides length of the array.
- * On output, provides total number. No
- * more than the input number will be written
- * back, so two calls can be used to get
- * the size and then the data.
- */
- __u32 count_lessees;
- __u32 pad;
-
- /** Pointer to lessees.
- * pointer to __u64 array of lessee ids
- */
- __u64 lessees_ptr;
-};
-
-/**
- * Get leased objects
- */
-struct drm_mode_get_lease {
- /** Number of leased objects.
- * On input, provides length of the array.
- * On output, provides total number. No
- * more than the input number will be written
- * back, so two calls can be used to get
- * the size and then the data.
- */
- __u32 count_objects;
- __u32 pad;
-
- /** Pointer to objects.
- * pointer to __u32 array of object ids
- */
- __u64 objects_ptr;
-};
-
-/**
- * Revoke lease
- */
-struct drm_mode_revoke_lease {
- /** Unique ID of lessee
- */
- __u32 lessee_id;
-};
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/drm_sarea.h b/lib/libc/include/generic-musl/drm/drm_sarea.h
deleted file mode 100644
index 911f2935dfc88b197a450ddade0b413ffcde1fc0..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/drm_sarea.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * \file drm_sarea.h
- * \brief SAREA definitions
- *
- * \author Michel Dänzer
- */
-
-/*
- * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _DRM_SAREA_H_
-#define _DRM_SAREA_H_
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* SAREA area needs to be at least a page */
-#if defined(__alpha__)
-#define SAREA_MAX 0x2000U
-#elif defined(__mips__)
-#define SAREA_MAX 0x4000U
-#elif defined(__ia64__)
-#define SAREA_MAX 0x10000U /* 64kB */
-#else
-/* Intel 830M driver needs at least 8k SAREA */
-#define SAREA_MAX 0x2000U
-#endif
-
-/** Maximum number of drawables in the SAREA */
-#define SAREA_MAX_DRAWABLES 256
-
-#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000
-
-/** SAREA drawable */
-struct drm_sarea_drawable {
- unsigned int stamp;
- unsigned int flags;
-};
-
-/** SAREA frame */
-struct drm_sarea_frame {
- unsigned int x;
- unsigned int y;
- unsigned int width;
- unsigned int height;
- unsigned int fullscreen;
-};
-
-/** SAREA */
-struct drm_sarea {
- /** first thing is always the DRM locking structure */
- struct drm_hw_lock lock;
- /** \todo Use readers/writer lock for drm_sarea::drawable_lock */
- struct drm_hw_lock drawable_lock;
- struct drm_sarea_drawable drawableTable[SAREA_MAX_DRAWABLES]; /**< drawables */
- struct drm_sarea_frame frame; /**< frame */
- drm_context_t dummy_context;
-};
-
-typedef struct drm_sarea_drawable drm_sarea_drawable_t;
-typedef struct drm_sarea_frame drm_sarea_frame_t;
-typedef struct drm_sarea drm_sarea_t;
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* _DRM_SAREA_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/etnaviv_drm.h b/lib/libc/include/generic-musl/drm/etnaviv_drm.h
deleted file mode 100644
index 2202410f60326aebed8002741623edf0a1347359..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/etnaviv_drm.h
+++ /dev/null
@@ -1,289 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
- * Copyright (C) 2015 Etnaviv Project
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by
- * the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see .
- */
-
-#ifndef __ETNAVIV_DRM_H__
-#define __ETNAVIV_DRM_H__
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* Please note that modifications to all structs defined here are
- * subject to backwards-compatibility constraints:
- * 1) Do not use pointers, use __u64 instead for 32 bit / 64 bit
- * user/kernel compatibility
- * 2) Keep fields aligned to their size
- * 3) Because of how drm_ioctl() works, we can add new fields at
- * the end of an ioctl if some care is taken: drm_ioctl() will
- * zero out the new fields at the tail of the ioctl, so a zero
- * value should have a backwards compatible meaning. And for
- * output params, userspace won't see the newly added output
- * fields.. so that has to be somehow ok.
- */
-
-/* timeouts are specified in clock-monotonic absolute times (to simplify
- * restarting interrupted ioctls). The following struct is logically the
- * same as 'struct timespec' but 32/64b ABI safe.
- */
-struct drm_etnaviv_timespec {
- __s64 tv_sec; /* seconds */
- __s64 tv_nsec; /* nanoseconds */
-};
-
-#define ETNAVIV_PARAM_GPU_MODEL 0x01
-#define ETNAVIV_PARAM_GPU_REVISION 0x02
-#define ETNAVIV_PARAM_GPU_FEATURES_0 0x03
-#define ETNAVIV_PARAM_GPU_FEATURES_1 0x04
-#define ETNAVIV_PARAM_GPU_FEATURES_2 0x05
-#define ETNAVIV_PARAM_GPU_FEATURES_3 0x06
-#define ETNAVIV_PARAM_GPU_FEATURES_4 0x07
-#define ETNAVIV_PARAM_GPU_FEATURES_5 0x08
-#define ETNAVIV_PARAM_GPU_FEATURES_6 0x09
-#define ETNAVIV_PARAM_GPU_FEATURES_7 0x0a
-#define ETNAVIV_PARAM_GPU_FEATURES_8 0x0b
-#define ETNAVIV_PARAM_GPU_FEATURES_9 0x0c
-#define ETNAVIV_PARAM_GPU_FEATURES_10 0x0d
-#define ETNAVIV_PARAM_GPU_FEATURES_11 0x0e
-#define ETNAVIV_PARAM_GPU_FEATURES_12 0x0f
-
-#define ETNAVIV_PARAM_GPU_STREAM_COUNT 0x10
-#define ETNAVIV_PARAM_GPU_REGISTER_MAX 0x11
-#define ETNAVIV_PARAM_GPU_THREAD_COUNT 0x12
-#define ETNAVIV_PARAM_GPU_VERTEX_CACHE_SIZE 0x13
-#define ETNAVIV_PARAM_GPU_SHADER_CORE_COUNT 0x14
-#define ETNAVIV_PARAM_GPU_PIXEL_PIPES 0x15
-#define ETNAVIV_PARAM_GPU_VERTEX_OUTPUT_BUFFER_SIZE 0x16
-#define ETNAVIV_PARAM_GPU_BUFFER_SIZE 0x17
-#define ETNAVIV_PARAM_GPU_INSTRUCTION_COUNT 0x18
-#define ETNAVIV_PARAM_GPU_NUM_CONSTANTS 0x19
-#define ETNAVIV_PARAM_GPU_NUM_VARYINGS 0x1a
-
-#define ETNA_MAX_PIPES 4
-
-struct drm_etnaviv_param {
- __u32 pipe; /* in */
- __u32 param; /* in, ETNAVIV_PARAM_x */
- __u64 value; /* out (get_param) or in (set_param) */
-};
-
-/*
- * GEM buffers:
- */
-
-#define ETNA_BO_CACHE_MASK 0x000f0000
-/* cache modes */
-#define ETNA_BO_CACHED 0x00010000
-#define ETNA_BO_WC 0x00020000
-#define ETNA_BO_UNCACHED 0x00040000
-/* map flags */
-#define ETNA_BO_FORCE_MMU 0x00100000
-
-struct drm_etnaviv_gem_new {
- __u64 size; /* in */
- __u32 flags; /* in, mask of ETNA_BO_x */
- __u32 handle; /* out */
-};
-
-struct drm_etnaviv_gem_info {
- __u32 handle; /* in */
- __u32 pad;
- __u64 offset; /* out, offset to pass to mmap() */
-};
-
-#define ETNA_PREP_READ 0x01
-#define ETNA_PREP_WRITE 0x02
-#define ETNA_PREP_NOSYNC 0x04
-
-struct drm_etnaviv_gem_cpu_prep {
- __u32 handle; /* in */
- __u32 op; /* in, mask of ETNA_PREP_x */
- struct drm_etnaviv_timespec timeout; /* in */
-};
-
-struct drm_etnaviv_gem_cpu_fini {
- __u32 handle; /* in */
- __u32 flags; /* in, placeholder for now, no defined values */
-};
-
-/*
- * Cmdstream Submission:
- */
-
-/* The value written into the cmdstream is logically:
- * relocbuf->gpuaddr + reloc_offset
- *
- * NOTE that reloc's must be sorted by order of increasing submit_offset,
- * otherwise EINVAL.
- */
-struct drm_etnaviv_gem_submit_reloc {
- __u32 submit_offset; /* in, offset from submit_bo */
- __u32 reloc_idx; /* in, index of reloc_bo buffer */
- __u64 reloc_offset; /* in, offset from start of reloc_bo */
- __u32 flags; /* in, placeholder for now, no defined values */
-};
-
-/* Each buffer referenced elsewhere in the cmdstream submit (ie. the
- * cmdstream buffer(s) themselves or reloc entries) has one (and only
- * one) entry in the submit->bos[] table.
- *
- * As a optimization, the current buffer (gpu virtual address) can be
- * passed back through the 'presumed' field. If on a subsequent reloc,
- * userspace passes back a 'presumed' address that is still valid,
- * then patching the cmdstream for this entry is skipped. This can
- * avoid kernel needing to map/access the cmdstream bo in the common
- * case.
- */
-#define ETNA_SUBMIT_BO_READ 0x0001
-#define ETNA_SUBMIT_BO_WRITE 0x0002
-struct drm_etnaviv_gem_submit_bo {
- __u32 flags; /* in, mask of ETNA_SUBMIT_BO_x */
- __u32 handle; /* in, GEM handle */
- __u64 presumed; /* in/out, presumed buffer address */
-};
-
-/* performance monitor request (pmr) */
-#define ETNA_PM_PROCESS_PRE 0x0001
-#define ETNA_PM_PROCESS_POST 0x0002
-struct drm_etnaviv_gem_submit_pmr {
- __u32 flags; /* in, when to process request (ETNA_PM_PROCESS_x) */
- __u8 domain; /* in, pm domain */
- __u8 pad;
- __u16 signal; /* in, pm signal */
- __u32 sequence; /* in, sequence number */
- __u32 read_offset; /* in, offset from read_bo */
- __u32 read_idx; /* in, index of read_bo buffer */
-};
-
-/* Each cmdstream submit consists of a table of buffers involved, and
- * one or more cmdstream buffers. This allows for conditional execution
- * (context-restore), and IB buffers needed for per tile/bin draw cmds.
- */
-#define ETNA_SUBMIT_NO_IMPLICIT 0x0001
-#define ETNA_SUBMIT_FENCE_FD_IN 0x0002
-#define ETNA_SUBMIT_FENCE_FD_OUT 0x0004
-#define ETNA_SUBMIT_FLAGS (ETNA_SUBMIT_NO_IMPLICIT | \
- ETNA_SUBMIT_FENCE_FD_IN | \
- ETNA_SUBMIT_FENCE_FD_OUT)
-#define ETNA_PIPE_3D 0x00
-#define ETNA_PIPE_2D 0x01
-#define ETNA_PIPE_VG 0x02
-struct drm_etnaviv_gem_submit {
- __u32 fence; /* out */
- __u32 pipe; /* in */
- __u32 exec_state; /* in, initial execution state (ETNA_PIPE_x) */
- __u32 nr_bos; /* in, number of submit_bo's */
- __u32 nr_relocs; /* in, number of submit_reloc's */
- __u32 stream_size; /* in, cmdstream size */
- __u64 bos; /* in, ptr to array of submit_bo's */
- __u64 relocs; /* in, ptr to array of submit_reloc's */
- __u64 stream; /* in, ptr to cmdstream */
- __u32 flags; /* in, mask of ETNA_SUBMIT_x */
- __s32 fence_fd; /* in/out, fence fd (see ETNA_SUBMIT_FENCE_FD_x) */
- __u64 pmrs; /* in, ptr to array of submit_pmr's */
- __u32 nr_pmrs; /* in, number of submit_pmr's */
- __u32 pad;
-};
-
-/* The normal way to synchronize with the GPU is just to CPU_PREP on
- * a buffer if you need to access it from the CPU (other cmdstream
- * submission from same or other contexts, PAGE_FLIP ioctl, etc, all
- * handle the required synchronization under the hood). This ioctl
- * mainly just exists as a way to implement the gallium pipe_fence
- * APIs without requiring a dummy bo to synchronize on.
- */
-#define ETNA_WAIT_NONBLOCK 0x01
-struct drm_etnaviv_wait_fence {
- __u32 pipe; /* in */
- __u32 fence; /* in */
- __u32 flags; /* in, mask of ETNA_WAIT_x */
- __u32 pad;
- struct drm_etnaviv_timespec timeout; /* in */
-};
-
-#define ETNA_USERPTR_READ 0x01
-#define ETNA_USERPTR_WRITE 0x02
-struct drm_etnaviv_gem_userptr {
- __u64 user_ptr; /* in, page aligned user pointer */
- __u64 user_size; /* in, page aligned user size */
- __u32 flags; /* in, flags */
- __u32 handle; /* out, non-zero handle */
-};
-
-struct drm_etnaviv_gem_wait {
- __u32 pipe; /* in */
- __u32 handle; /* in, bo to be waited for */
- __u32 flags; /* in, mask of ETNA_WAIT_x */
- __u32 pad;
- struct drm_etnaviv_timespec timeout; /* in */
-};
-
-/*
- * Performance Monitor (PM):
- */
-
-struct drm_etnaviv_pm_domain {
- __u32 pipe; /* in */
- __u8 iter; /* in/out, select pm domain at index iter */
- __u8 id; /* out, id of domain */
- __u16 nr_signals; /* out, how many signals does this domain provide */
- char name[64]; /* out, name of domain */
-};
-
-struct drm_etnaviv_pm_signal {
- __u32 pipe; /* in */
- __u8 domain; /* in, pm domain index */
- __u8 pad;
- __u16 iter; /* in/out, select pm source at index iter */
- __u16 id; /* out, id of signal */
- char name[64]; /* out, name of domain */
-};
-
-#define DRM_ETNAVIV_GET_PARAM 0x00
-/* placeholder:
-#define DRM_ETNAVIV_SET_PARAM 0x01
- */
-#define DRM_ETNAVIV_GEM_NEW 0x02
-#define DRM_ETNAVIV_GEM_INFO 0x03
-#define DRM_ETNAVIV_GEM_CPU_PREP 0x04
-#define DRM_ETNAVIV_GEM_CPU_FINI 0x05
-#define DRM_ETNAVIV_GEM_SUBMIT 0x06
-#define DRM_ETNAVIV_WAIT_FENCE 0x07
-#define DRM_ETNAVIV_GEM_USERPTR 0x08
-#define DRM_ETNAVIV_GEM_WAIT 0x09
-#define DRM_ETNAVIV_PM_QUERY_DOM 0x0a
-#define DRM_ETNAVIV_PM_QUERY_SIG 0x0b
-#define DRM_ETNAVIV_NUM_IOCTLS 0x0c
-
-#define DRM_IOCTL_ETNAVIV_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GET_PARAM, struct drm_etnaviv_param)
-#define DRM_IOCTL_ETNAVIV_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_NEW, struct drm_etnaviv_gem_new)
-#define DRM_IOCTL_ETNAVIV_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_INFO, struct drm_etnaviv_gem_info)
-#define DRM_IOCTL_ETNAVIV_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_PREP, struct drm_etnaviv_gem_cpu_prep)
-#define DRM_IOCTL_ETNAVIV_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_FINI, struct drm_etnaviv_gem_cpu_fini)
-#define DRM_IOCTL_ETNAVIV_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_SUBMIT, struct drm_etnaviv_gem_submit)
-#define DRM_IOCTL_ETNAVIV_WAIT_FENCE DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_WAIT_FENCE, struct drm_etnaviv_wait_fence)
-#define DRM_IOCTL_ETNAVIV_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_USERPTR, struct drm_etnaviv_gem_userptr)
-#define DRM_IOCTL_ETNAVIV_GEM_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_WAIT, struct drm_etnaviv_gem_wait)
-#define DRM_IOCTL_ETNAVIV_PM_QUERY_DOM DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_DOM, struct drm_etnaviv_pm_domain)
-#define DRM_IOCTL_ETNAVIV_PM_QUERY_SIG DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_SIG, struct drm_etnaviv_pm_signal)
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* __ETNAVIV_DRM_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/exynos_drm.h b/lib/libc/include/generic-musl/drm/exynos_drm.h
deleted file mode 100644
index d25aae2efbeaa68f84a281d7a1e09be7a8dbadaf..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/exynos_drm.h
+++ /dev/null
@@ -1,424 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
-/* exynos_drm.h
- *
- * Copyright (c) 2011 Samsung Electronics Co., Ltd.
- * Authors:
- * Inki Dae
- * Joonyoung Shim
- * Seung-Woo Kim
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- */
-
-#ifndef _EXYNOS_DRM_H_
-#define _EXYNOS_DRM_H_
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/**
- * User-desired buffer creation information structure.
- *
- * @size: user-desired memory allocation size.
- * - this size value would be page-aligned internally.
- * @flags: user request for setting memory type or cache attributes.
- * @handle: returned a handle to created gem object.
- * - this handle will be set by gem module of kernel side.
- */
-struct drm_exynos_gem_create {
- __u64 size;
- __u32 flags;
- __u32 handle;
-};
-
-/**
- * A structure for getting a fake-offset that can be used with mmap.
- *
- * @handle: handle of gem object.
- * @reserved: just padding to be 64-bit aligned.
- * @offset: a fake-offset of gem object.
- */
-struct drm_exynos_gem_map {
- __u32 handle;
- __u32 reserved;
- __u64 offset;
-};
-
-/**
- * A structure to gem information.
- *
- * @handle: a handle to gem object created.
- * @flags: flag value including memory type and cache attribute and
- * this value would be set by driver.
- * @size: size to memory region allocated by gem and this size would
- * be set by driver.
- */
-struct drm_exynos_gem_info {
- __u32 handle;
- __u32 flags;
- __u64 size;
-};
-
-/**
- * A structure for user connection request of virtual display.
- *
- * @connection: indicate whether doing connetion or not by user.
- * @extensions: if this value is 1 then the vidi driver would need additional
- * 128bytes edid data.
- * @edid: the edid data pointer from user side.
- */
-struct drm_exynos_vidi_connection {
- __u32 connection;
- __u32 extensions;
- __u64 edid;
-};
-
-/* memory type definitions. */
-enum e_drm_exynos_gem_mem_type {
- /* Physically Continuous memory and used as default. */
- EXYNOS_BO_CONTIG = 0 << 0,
- /* Physically Non-Continuous memory. */
- EXYNOS_BO_NONCONTIG = 1 << 0,
- /* non-cachable mapping and used as default. */
- EXYNOS_BO_NONCACHABLE = 0 << 1,
- /* cachable mapping. */
- EXYNOS_BO_CACHABLE = 1 << 1,
- /* write-combine mapping. */
- EXYNOS_BO_WC = 1 << 2,
- EXYNOS_BO_MASK = EXYNOS_BO_NONCONTIG | EXYNOS_BO_CACHABLE |
- EXYNOS_BO_WC
-};
-
-struct drm_exynos_g2d_get_ver {
- __u32 major;
- __u32 minor;
-};
-
-struct drm_exynos_g2d_cmd {
- __u32 offset;
- __u32 data;
-};
-
-enum drm_exynos_g2d_buf_type {
- G2D_BUF_USERPTR = 1 << 31,
-};
-
-enum drm_exynos_g2d_event_type {
- G2D_EVENT_NOT,
- G2D_EVENT_NONSTOP,
- G2D_EVENT_STOP, /* not yet */
-};
-
-struct drm_exynos_g2d_userptr {
- unsigned long userptr;
- unsigned long size;
-};
-
-struct drm_exynos_g2d_set_cmdlist {
- __u64 cmd;
- __u64 cmd_buf;
- __u32 cmd_nr;
- __u32 cmd_buf_nr;
-
- /* for g2d event */
- __u64 event_type;
- __u64 user_data;
-};
-
-struct drm_exynos_g2d_exec {
- __u64 async;
-};
-
-/* Exynos DRM IPP v2 API */
-
-/**
- * Enumerate available IPP hardware modules.
- *
- * @count_ipps: size of ipp_id array / number of ipp modules (set by driver)
- * @reserved: padding
- * @ipp_id_ptr: pointer to ipp_id array or NULL
- */
-struct drm_exynos_ioctl_ipp_get_res {
- __u32 count_ipps;
- __u32 reserved;
- __u64 ipp_id_ptr;
-};
-
-enum drm_exynos_ipp_format_type {
- DRM_EXYNOS_IPP_FORMAT_SOURCE = 0x01,
- DRM_EXYNOS_IPP_FORMAT_DESTINATION = 0x02,
-};
-
-struct drm_exynos_ipp_format {
- __u32 fourcc;
- __u32 type;
- __u64 modifier;
-};
-
-enum drm_exynos_ipp_capability {
- DRM_EXYNOS_IPP_CAP_CROP = 0x01,
- DRM_EXYNOS_IPP_CAP_ROTATE = 0x02,
- DRM_EXYNOS_IPP_CAP_SCALE = 0x04,
- DRM_EXYNOS_IPP_CAP_CONVERT = 0x08,
-};
-
-/**
- * Get IPP hardware capabilities and supported image formats.
- *
- * @ipp_id: id of IPP module to query
- * @capabilities: bitmask of drm_exynos_ipp_capability (set by driver)
- * @reserved: padding
- * @formats_count: size of formats array (in entries) / number of filled
- * formats (set by driver)
- * @formats_ptr: pointer to formats array or NULL
- */
-struct drm_exynos_ioctl_ipp_get_caps {
- __u32 ipp_id;
- __u32 capabilities;
- __u32 reserved;
- __u32 formats_count;
- __u64 formats_ptr;
-};
-
-enum drm_exynos_ipp_limit_type {
- /* size (horizontal/vertial) limits, in pixels (min, max, alignment) */
- DRM_EXYNOS_IPP_LIMIT_TYPE_SIZE = 0x0001,
- /* scale ratio (horizonta/vertial), 16.16 fixed point (min, max) */
- DRM_EXYNOS_IPP_LIMIT_TYPE_SCALE = 0x0002,
-
- /* image buffer area */
- DRM_EXYNOS_IPP_LIMIT_SIZE_BUFFER = 0x0001 << 16,
- /* src/dst rectangle area */
- DRM_EXYNOS_IPP_LIMIT_SIZE_AREA = 0x0002 << 16,
- /* src/dst rectangle area when rotation enabled */
- DRM_EXYNOS_IPP_LIMIT_SIZE_ROTATED = 0x0003 << 16,
-
- DRM_EXYNOS_IPP_LIMIT_TYPE_MASK = 0x000f,
- DRM_EXYNOS_IPP_LIMIT_SIZE_MASK = 0x000f << 16,
-};
-
-struct drm_exynos_ipp_limit_val {
- __u32 min;
- __u32 max;
- __u32 align;
- __u32 reserved;
-};
-
-/**
- * IPP module limitation.
- *
- * @type: limit type (see drm_exynos_ipp_limit_type enum)
- * @reserved: padding
- * @h: horizontal limits
- * @v: vertical limits
- */
-struct drm_exynos_ipp_limit {
- __u32 type;
- __u32 reserved;
- struct drm_exynos_ipp_limit_val h;
- struct drm_exynos_ipp_limit_val v;
-};
-
-/**
- * Get IPP limits for given image format.
- *
- * @ipp_id: id of IPP module to query
- * @fourcc: image format code (see DRM_FORMAT_* in drm_fourcc.h)
- * @modifier: image format modifier (see DRM_FORMAT_MOD_* in drm_fourcc.h)
- * @type: source/destination identifier (drm_exynos_ipp_format_flag enum)
- * @limits_count: size of limits array (in entries) / number of filled entries
- * (set by driver)
- * @limits_ptr: pointer to limits array or NULL
- */
-struct drm_exynos_ioctl_ipp_get_limits {
- __u32 ipp_id;
- __u32 fourcc;
- __u64 modifier;
- __u32 type;
- __u32 limits_count;
- __u64 limits_ptr;
-};
-
-enum drm_exynos_ipp_task_id {
- /* buffer described by struct drm_exynos_ipp_task_buffer */
- DRM_EXYNOS_IPP_TASK_BUFFER = 0x0001,
- /* rectangle described by struct drm_exynos_ipp_task_rect */
- DRM_EXYNOS_IPP_TASK_RECTANGLE = 0x0002,
- /* transformation described by struct drm_exynos_ipp_task_transform */
- DRM_EXYNOS_IPP_TASK_TRANSFORM = 0x0003,
- /* alpha configuration described by struct drm_exynos_ipp_task_alpha */
- DRM_EXYNOS_IPP_TASK_ALPHA = 0x0004,
-
- /* source image data (for buffer and rectangle chunks) */
- DRM_EXYNOS_IPP_TASK_TYPE_SOURCE = 0x0001 << 16,
- /* destination image data (for buffer and rectangle chunks) */
- DRM_EXYNOS_IPP_TASK_TYPE_DESTINATION = 0x0002 << 16,
-};
-
-/**
- * Memory buffer with image data.
- *
- * @id: must be DRM_EXYNOS_IPP_TASK_BUFFER
- * other parameters are same as for AddFB2 generic DRM ioctl
- */
-struct drm_exynos_ipp_task_buffer {
- __u32 id;
- __u32 fourcc;
- __u32 width, height;
- __u32 gem_id[4];
- __u32 offset[4];
- __u32 pitch[4];
- __u64 modifier;
-};
-
-/**
- * Rectangle for processing.
- *
- * @id: must be DRM_EXYNOS_IPP_TASK_RECTANGLE
- * @reserved: padding
- * @x,@y: left corner in pixels
- * @w,@h: width/height in pixels
- */
-struct drm_exynos_ipp_task_rect {
- __u32 id;
- __u32 reserved;
- __u32 x;
- __u32 y;
- __u32 w;
- __u32 h;
-};
-
-/**
- * Image tranformation description.
- *
- * @id: must be DRM_EXYNOS_IPP_TASK_TRANSFORM
- * @rotation: DRM_MODE_ROTATE_* and DRM_MODE_REFLECT_* values
- */
-struct drm_exynos_ipp_task_transform {
- __u32 id;
- __u32 rotation;
-};
-
-/**
- * Image global alpha configuration for formats without alpha values.
- *
- * @id: must be DRM_EXYNOS_IPP_TASK_ALPHA
- * @value: global alpha value (0-255)
- */
-struct drm_exynos_ipp_task_alpha {
- __u32 id;
- __u32 value;
-};
-
-enum drm_exynos_ipp_flag {
- /* generate DRM event after processing */
- DRM_EXYNOS_IPP_FLAG_EVENT = 0x01,
- /* dry run, only check task parameters */
- DRM_EXYNOS_IPP_FLAG_TEST_ONLY = 0x02,
- /* non-blocking processing */
- DRM_EXYNOS_IPP_FLAG_NONBLOCK = 0x04,
-};
-
-#define DRM_EXYNOS_IPP_FLAGS (DRM_EXYNOS_IPP_FLAG_EVENT |\
- DRM_EXYNOS_IPP_FLAG_TEST_ONLY | DRM_EXYNOS_IPP_FLAG_NONBLOCK)
-
-/**
- * Perform image processing described by array of drm_exynos_ipp_task_*
- * structures (parameters array).
- *
- * @ipp_id: id of IPP module to run the task
- * @flags: bitmask of drm_exynos_ipp_flag values
- * @reserved: padding
- * @params_size: size of parameters array (in bytes)
- * @params_ptr: pointer to parameters array or NULL
- * @user_data: (optional) data for drm event
- */
-struct drm_exynos_ioctl_ipp_commit {
- __u32 ipp_id;
- __u32 flags;
- __u32 reserved;
- __u32 params_size;
- __u64 params_ptr;
- __u64 user_data;
-};
-
-#define DRM_EXYNOS_GEM_CREATE 0x00
-#define DRM_EXYNOS_GEM_MAP 0x01
-/* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */
-#define DRM_EXYNOS_GEM_GET 0x04
-#define DRM_EXYNOS_VIDI_CONNECTION 0x07
-
-/* G2D */
-#define DRM_EXYNOS_G2D_GET_VER 0x20
-#define DRM_EXYNOS_G2D_SET_CMDLIST 0x21
-#define DRM_EXYNOS_G2D_EXEC 0x22
-
-/* Reserved 0x30 ~ 0x33 for obsolete Exynos IPP ioctls */
-/* IPP - Image Post Processing */
-#define DRM_EXYNOS_IPP_GET_RESOURCES 0x40
-#define DRM_EXYNOS_IPP_GET_CAPS 0x41
-#define DRM_EXYNOS_IPP_GET_LIMITS 0x42
-#define DRM_EXYNOS_IPP_COMMIT 0x43
-
-#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \
- DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create)
-#define DRM_IOCTL_EXYNOS_GEM_MAP DRM_IOWR(DRM_COMMAND_BASE + \
- DRM_EXYNOS_GEM_MAP, struct drm_exynos_gem_map)
-#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + \
- DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info)
-
-#define DRM_IOCTL_EXYNOS_VIDI_CONNECTION DRM_IOWR(DRM_COMMAND_BASE + \
- DRM_EXYNOS_VIDI_CONNECTION, struct drm_exynos_vidi_connection)
-
-#define DRM_IOCTL_EXYNOS_G2D_GET_VER DRM_IOWR(DRM_COMMAND_BASE + \
- DRM_EXYNOS_G2D_GET_VER, struct drm_exynos_g2d_get_ver)
-#define DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST DRM_IOWR(DRM_COMMAND_BASE + \
- DRM_EXYNOS_G2D_SET_CMDLIST, struct drm_exynos_g2d_set_cmdlist)
-#define DRM_IOCTL_EXYNOS_G2D_EXEC DRM_IOWR(DRM_COMMAND_BASE + \
- DRM_EXYNOS_G2D_EXEC, struct drm_exynos_g2d_exec)
-
-#define DRM_IOCTL_EXYNOS_IPP_GET_RESOURCES DRM_IOWR(DRM_COMMAND_BASE + \
- DRM_EXYNOS_IPP_GET_RESOURCES, \
- struct drm_exynos_ioctl_ipp_get_res)
-#define DRM_IOCTL_EXYNOS_IPP_GET_CAPS DRM_IOWR(DRM_COMMAND_BASE + \
- DRM_EXYNOS_IPP_GET_CAPS, struct drm_exynos_ioctl_ipp_get_caps)
-#define DRM_IOCTL_EXYNOS_IPP_GET_LIMITS DRM_IOWR(DRM_COMMAND_BASE + \
- DRM_EXYNOS_IPP_GET_LIMITS, \
- struct drm_exynos_ioctl_ipp_get_limits)
-#define DRM_IOCTL_EXYNOS_IPP_COMMIT DRM_IOWR(DRM_COMMAND_BASE + \
- DRM_EXYNOS_IPP_COMMIT, struct drm_exynos_ioctl_ipp_commit)
-
-/* EXYNOS specific events */
-#define DRM_EXYNOS_G2D_EVENT 0x80000000
-#define DRM_EXYNOS_IPP_EVENT 0x80000002
-
-struct drm_exynos_g2d_event {
- struct drm_event base;
- __u64 user_data;
- __u32 tv_sec;
- __u32 tv_usec;
- __u32 cmdlist_no;
- __u32 reserved;
-};
-
-struct drm_exynos_ipp_event {
- struct drm_event base;
- __u64 user_data;
- __u32 tv_sec;
- __u32 tv_usec;
- __u32 ipp_id;
- __u32 sequence;
- __u64 reserved;
-};
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* _EXYNOS_DRM_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/i810_drm.h b/lib/libc/include/generic-musl/drm/i810_drm.h
deleted file mode 100644
index a4d0486684bf13e71f36959f2126b9c643a31f30..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/i810_drm.h
+++ /dev/null
@@ -1,292 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#ifndef _I810_DRM_H_
-#define _I810_DRM_H_
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* WARNING: These defines must be the same as what the Xserver uses.
- * if you change them, you must change the defines in the Xserver.
- */
-
-#ifndef _I810_DEFINES_
-#define _I810_DEFINES_
-
-#define I810_DMA_BUF_ORDER 12
-#define I810_DMA_BUF_SZ (1<> (X % 8)) & 1
- *
- * - the subslice mask for each slice with one bit per subslice telling
- * whether a subslice is available. The availability of subslice Y in slice
- * X can be queried with the following formula :
- *
- * (data[subslice_offset +
- * X * subslice_stride +
- * Y / 8] >> (Y % 8)) & 1
- *
- * - the EU mask for each subslice in each slice with one bit per EU telling
- * whether an EU is available. The availability of EU Z in subslice Y in
- * slice X can be queried with the following formula :
- *
- * (data[eu_offset +
- * (X * max_subslices + Y) * eu_stride +
- * Z / 8] >> (Z % 8)) & 1
- */
-struct drm_i915_query_topology_info {
- /*
- * Unused for now. Must be cleared to zero.
- */
- __u16 flags;
-
- __u16 max_slices;
- __u16 max_subslices;
- __u16 max_eus_per_subslice;
-
- /*
- * Offset in data[] at which the subslice masks are stored.
- */
- __u16 subslice_offset;
-
- /*
- * Stride at which each of the subslice masks for each slice are
- * stored.
- */
- __u16 subslice_stride;
-
- /*
- * Offset in data[] at which the EU masks are stored.
- */
- __u16 eu_offset;
-
- /*
- * Stride at which each of the EU masks for each subslice are stored.
- */
- __u16 eu_stride;
-
- __u8 data[];
-};
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* _I915_DRM_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/mga_drm.h b/lib/libc/include/generic-musl/drm/mga_drm.h
deleted file mode 100644
index cc9853ba43e19b53ff6fd88d848cc96c6f9f4642..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/mga_drm.h
+++ /dev/null
@@ -1,427 +0,0 @@
-/* mga_drm.h -- Public header for the Matrox g200/g400 driver -*- linux-c -*-
- * Created: Tue Jan 25 01:50:01 1999 by jhartmann@precisioninsight.com
- *
- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Jeff Hartmann
- * Keith Whitwell
- *
- * Rewritten by:
- * Gareth Hughes
- */
-
-#ifndef __MGA_DRM_H__
-#define __MGA_DRM_H__
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* WARNING: If you change any of these defines, make sure to change the
- * defines in the Xserver file (mga_sarea.h)
- */
-
-#ifndef __MGA_SAREA_DEFINES__
-#define __MGA_SAREA_DEFINES__
-
-/* WARP pipe flags
- */
-#define MGA_F 0x1 /* fog */
-#define MGA_A 0x2 /* alpha */
-#define MGA_S 0x4 /* specular */
-#define MGA_T2 0x8 /* multitexture */
-
-#define MGA_WARP_TGZ 0
-#define MGA_WARP_TGZF (MGA_F)
-#define MGA_WARP_TGZA (MGA_A)
-#define MGA_WARP_TGZAF (MGA_F|MGA_A)
-#define MGA_WARP_TGZS (MGA_S)
-#define MGA_WARP_TGZSF (MGA_S|MGA_F)
-#define MGA_WARP_TGZSA (MGA_S|MGA_A)
-#define MGA_WARP_TGZSAF (MGA_S|MGA_F|MGA_A)
-#define MGA_WARP_T2GZ (MGA_T2)
-#define MGA_WARP_T2GZF (MGA_T2|MGA_F)
-#define MGA_WARP_T2GZA (MGA_T2|MGA_A)
-#define MGA_WARP_T2GZAF (MGA_T2|MGA_A|MGA_F)
-#define MGA_WARP_T2GZS (MGA_T2|MGA_S)
-#define MGA_WARP_T2GZSF (MGA_T2|MGA_S|MGA_F)
-#define MGA_WARP_T2GZSA (MGA_T2|MGA_S|MGA_A)
-#define MGA_WARP_T2GZSAF (MGA_T2|MGA_S|MGA_F|MGA_A)
-
-#define MGA_MAX_G200_PIPES 8 /* no multitex */
-#define MGA_MAX_G400_PIPES 16
-#define MGA_MAX_WARP_PIPES MGA_MAX_G400_PIPES
-#define MGA_WARP_UCODE_SIZE 32768 /* in bytes */
-
-#define MGA_CARD_TYPE_G200 1
-#define MGA_CARD_TYPE_G400 2
-#define MGA_CARD_TYPE_G450 3 /* not currently used */
-#define MGA_CARD_TYPE_G550 4
-
-#define MGA_FRONT 0x1
-#define MGA_BACK 0x2
-#define MGA_DEPTH 0x4
-
-/* What needs to be changed for the current vertex dma buffer?
- */
-#define MGA_UPLOAD_CONTEXT 0x1
-#define MGA_UPLOAD_TEX0 0x2
-#define MGA_UPLOAD_TEX1 0x4
-#define MGA_UPLOAD_PIPE 0x8
-#define MGA_UPLOAD_TEX0IMAGE 0x10 /* handled client-side */
-#define MGA_UPLOAD_TEX1IMAGE 0x20 /* handled client-side */
-#define MGA_UPLOAD_2D 0x40
-#define MGA_WAIT_AGE 0x80 /* handled client-side */
-#define MGA_UPLOAD_CLIPRECTS 0x100 /* handled client-side */
-#if 0
-#define MGA_DMA_FLUSH 0x200 /* set when someone gets the lock
- quiescent */
-#endif
-
-/* 32 buffers of 64k each, total 2 meg.
- */
-#define MGA_BUFFER_SIZE (1 << 16)
-#define MGA_NUM_BUFFERS 128
-
-/* Keep these small for testing.
- */
-#define MGA_NR_SAREA_CLIPRECTS 8
-
-/* 2 heaps (1 for card, 1 for agp), each divided into up to 128
- * regions, subject to a minimum region size of (1<<16) == 64k.
- *
- * Clients may subdivide regions internally, but when sharing between
- * clients, the region size is the minimum granularity.
- */
-
-#define MGA_CARD_HEAP 0
-#define MGA_AGP_HEAP 1
-#define MGA_NR_TEX_HEAPS 2
-#define MGA_NR_TEX_REGIONS 16
-#define MGA_LOG_MIN_TEX_REGION_SIZE 16
-
-#define DRM_MGA_IDLE_RETRY 2048
-
-#endif /* __MGA_SAREA_DEFINES__ */
-
-/* Setup registers for 3D context
- */
-typedef struct {
- unsigned int dstorg;
- unsigned int maccess;
- unsigned int plnwt;
- unsigned int dwgctl;
- unsigned int alphactrl;
- unsigned int fogcolor;
- unsigned int wflag;
- unsigned int tdualstage0;
- unsigned int tdualstage1;
- unsigned int fcol;
- unsigned int stencil;
- unsigned int stencilctl;
-} drm_mga_context_regs_t;
-
-/* Setup registers for 2D, X server
- */
-typedef struct {
- unsigned int pitch;
-} drm_mga_server_regs_t;
-
-/* Setup registers for each texture unit
- */
-typedef struct {
- unsigned int texctl;
- unsigned int texctl2;
- unsigned int texfilter;
- unsigned int texbordercol;
- unsigned int texorg;
- unsigned int texwidth;
- unsigned int texheight;
- unsigned int texorg1;
- unsigned int texorg2;
- unsigned int texorg3;
- unsigned int texorg4;
-} drm_mga_texture_regs_t;
-
-/* General aging mechanism
- */
-typedef struct {
- unsigned int head; /* Position of head pointer */
- unsigned int wrap; /* Primary DMA wrap count */
-} drm_mga_age_t;
-
-typedef struct _drm_mga_sarea {
- /* The channel for communication of state information to the kernel
- * on firing a vertex dma buffer.
- */
- drm_mga_context_regs_t context_state;
- drm_mga_server_regs_t server_state;
- drm_mga_texture_regs_t tex_state[2];
- unsigned int warp_pipe;
- unsigned int dirty;
- unsigned int vertsize;
-
- /* The current cliprects, or a subset thereof.
- */
- struct drm_clip_rect boxes[MGA_NR_SAREA_CLIPRECTS];
- unsigned int nbox;
-
- /* Information about the most recently used 3d drawable. The
- * client fills in the req_* fields, the server fills in the
- * exported_ fields and puts the cliprects into boxes, above.
- *
- * The client clears the exported_drawable field before
- * clobbering the boxes data.
- */
- unsigned int req_drawable; /* the X drawable id */
- unsigned int req_draw_buffer; /* MGA_FRONT or MGA_BACK */
-
- unsigned int exported_drawable;
- unsigned int exported_index;
- unsigned int exported_stamp;
- unsigned int exported_buffers;
- unsigned int exported_nfront;
- unsigned int exported_nback;
- int exported_back_x, exported_front_x, exported_w;
- int exported_back_y, exported_front_y, exported_h;
- struct drm_clip_rect exported_boxes[MGA_NR_SAREA_CLIPRECTS];
-
- /* Counters for aging textures and for client-side throttling.
- */
- unsigned int status[4];
- unsigned int last_wrap;
-
- drm_mga_age_t last_frame;
- unsigned int last_enqueue; /* last time a buffer was enqueued */
- unsigned int last_dispatch; /* age of the most recently dispatched buffer */
- unsigned int last_quiescent; /* */
-
- /* LRU lists for texture memory in agp space and on the card.
- */
- struct drm_tex_region texList[MGA_NR_TEX_HEAPS][MGA_NR_TEX_REGIONS + 1];
- unsigned int texAge[MGA_NR_TEX_HEAPS];
-
- /* Mechanism to validate card state.
- */
- int ctxOwner;
-} drm_mga_sarea_t;
-
-/* MGA specific ioctls
- * The device specific ioctl range is 0x40 to 0x79.
- */
-#define DRM_MGA_INIT 0x00
-#define DRM_MGA_FLUSH 0x01
-#define DRM_MGA_RESET 0x02
-#define DRM_MGA_SWAP 0x03
-#define DRM_MGA_CLEAR 0x04
-#define DRM_MGA_VERTEX 0x05
-#define DRM_MGA_INDICES 0x06
-#define DRM_MGA_ILOAD 0x07
-#define DRM_MGA_BLIT 0x08
-#define DRM_MGA_GETPARAM 0x09
-
-/* 3.2:
- * ioctls for operating on fences.
- */
-#define DRM_MGA_SET_FENCE 0x0a
-#define DRM_MGA_WAIT_FENCE 0x0b
-#define DRM_MGA_DMA_BOOTSTRAP 0x0c
-
-#define DRM_IOCTL_MGA_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_INIT, drm_mga_init_t)
-#define DRM_IOCTL_MGA_FLUSH DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_FLUSH, struct drm_lock)
-#define DRM_IOCTL_MGA_RESET DRM_IO( DRM_COMMAND_BASE + DRM_MGA_RESET)
-#define DRM_IOCTL_MGA_SWAP DRM_IO( DRM_COMMAND_BASE + DRM_MGA_SWAP)
-#define DRM_IOCTL_MGA_CLEAR DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_CLEAR, drm_mga_clear_t)
-#define DRM_IOCTL_MGA_VERTEX DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_VERTEX, drm_mga_vertex_t)
-#define DRM_IOCTL_MGA_INDICES DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_INDICES, drm_mga_indices_t)
-#define DRM_IOCTL_MGA_ILOAD DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_ILOAD, drm_mga_iload_t)
-#define DRM_IOCTL_MGA_BLIT DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_BLIT, drm_mga_blit_t)
-#define DRM_IOCTL_MGA_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_GETPARAM, drm_mga_getparam_t)
-#define DRM_IOCTL_MGA_SET_FENCE DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_SET_FENCE, __u32)
-#define DRM_IOCTL_MGA_WAIT_FENCE DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_WAIT_FENCE, __u32)
-#define DRM_IOCTL_MGA_DMA_BOOTSTRAP DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_DMA_BOOTSTRAP, drm_mga_dma_bootstrap_t)
-
-typedef struct _drm_mga_warp_index {
- int installed;
- unsigned long phys_addr;
- int size;
-} drm_mga_warp_index_t;
-
-typedef struct drm_mga_init {
- enum {
- MGA_INIT_DMA = 0x01,
- MGA_CLEANUP_DMA = 0x02
- } func;
-
- unsigned long sarea_priv_offset;
-
- int chipset;
- int sgram;
-
- unsigned int maccess;
-
- unsigned int fb_cpp;
- unsigned int front_offset, front_pitch;
- unsigned int back_offset, back_pitch;
-
- unsigned int depth_cpp;
- unsigned int depth_offset, depth_pitch;
-
- unsigned int texture_offset[MGA_NR_TEX_HEAPS];
- unsigned int texture_size[MGA_NR_TEX_HEAPS];
-
- unsigned long fb_offset;
- unsigned long mmio_offset;
- unsigned long status_offset;
- unsigned long warp_offset;
- unsigned long primary_offset;
- unsigned long buffers_offset;
-} drm_mga_init_t;
-
-typedef struct drm_mga_dma_bootstrap {
- /**
- * \name AGP texture region
- *
- * On return from the DRM_MGA_DMA_BOOTSTRAP ioctl, these fields will
- * be filled in with the actual AGP texture settings.
- *
- * \warning
- * If these fields are non-zero, but dma_mga_dma_bootstrap::agp_mode
- * is zero, it means that PCI memory (most likely through the use of
- * an IOMMU) is being used for "AGP" textures.
- */
- /*@{ */
- unsigned long texture_handle; /**< Handle used to map AGP textures. */
- __u32 texture_size; /**< Size of the AGP texture region. */
- /*@} */
-
- /**
- * Requested size of the primary DMA region.
- *
- * On return from the DRM_MGA_DMA_BOOTSTRAP ioctl, this field will be
- * filled in with the actual AGP mode. If AGP was not available
- */
- __u32 primary_size;
-
- /**
- * Requested number of secondary DMA buffers.
- *
- * On return from the DRM_MGA_DMA_BOOTSTRAP ioctl, this field will be
- * filled in with the actual number of secondary DMA buffers
- * allocated. Particularly when PCI DMA is used, this may be
- * (subtantially) less than the number requested.
- */
- __u32 secondary_bin_count;
-
- /**
- * Requested size of each secondary DMA buffer.
- *
- * While the kernel \b is free to reduce
- * dma_mga_dma_bootstrap::secondary_bin_count, it is \b not allowed
- * to reduce dma_mga_dma_bootstrap::secondary_bin_size.
- */
- __u32 secondary_bin_size;
-
- /**
- * Bit-wise mask of AGPSTAT2_* values. Currently only \c AGPSTAT2_1X,
- * \c AGPSTAT2_2X, and \c AGPSTAT2_4X are supported. If this value is
- * zero, it means that PCI DMA should be used, even if AGP is
- * possible.
- *
- * On return from the DRM_MGA_DMA_BOOTSTRAP ioctl, this field will be
- * filled in with the actual AGP mode. If AGP was not available
- * (i.e., PCI DMA was used), this value will be zero.
- */
- __u32 agp_mode;
-
- /**
- * Desired AGP GART size, measured in megabytes.
- */
- __u8 agp_size;
-} drm_mga_dma_bootstrap_t;
-
-typedef struct drm_mga_clear {
- unsigned int flags;
- unsigned int clear_color;
- unsigned int clear_depth;
- unsigned int color_mask;
- unsigned int depth_mask;
-} drm_mga_clear_t;
-
-typedef struct drm_mga_vertex {
- int idx; /* buffer to queue */
- int used; /* bytes in use */
- int discard; /* client finished with buffer? */
-} drm_mga_vertex_t;
-
-typedef struct drm_mga_indices {
- int idx; /* buffer to queue */
- unsigned int start;
- unsigned int end;
- int discard; /* client finished with buffer? */
-} drm_mga_indices_t;
-
-typedef struct drm_mga_iload {
- int idx;
- unsigned int dstorg;
- unsigned int length;
-} drm_mga_iload_t;
-
-typedef struct _drm_mga_blit {
- unsigned int planemask;
- unsigned int srcorg;
- unsigned int dstorg;
- int src_pitch, dst_pitch;
- int delta_sx, delta_sy;
- int delta_dx, delta_dy;
- int height, ydir; /* flip image vertically */
- int source_pitch, dest_pitch;
-} drm_mga_blit_t;
-
-/* 3.1: An ioctl to get parameters that aren't available to the 3d
- * client any other way.
- */
-#define MGA_PARAM_IRQ_NR 1
-
-/* 3.2: Query the actual card type. The DDX only distinguishes between
- * G200 chips and non-G200 chips, which it calls G400. It turns out that
- * there are some very sublte differences between the G4x0 chips and the G550
- * chips. Using this parameter query, a client-side driver can detect the
- * difference between a G4x0 and a G550.
- */
-#define MGA_PARAM_CARD_TYPE 2
-
-typedef struct drm_mga_getparam {
- int param;
- void *value;
-} drm_mga_getparam_t;
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/msm_drm.h b/lib/libc/include/generic-musl/drm/msm_drm.h
deleted file mode 100644
index 0f57bc65e1d602eb2805324ce6571e56cbb65646..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/msm_drm.h
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * Copyright (C) 2013 Red Hat
- * Author: Rob Clark
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef __MSM_DRM_H__
-#define __MSM_DRM_H__
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* Please note that modifications to all structs defined here are
- * subject to backwards-compatibility constraints:
- * 1) Do not use pointers, use __u64 instead for 32 bit / 64 bit
- * user/kernel compatibility
- * 2) Keep fields aligned to their size
- * 3) Because of how drm_ioctl() works, we can add new fields at
- * the end of an ioctl if some care is taken: drm_ioctl() will
- * zero out the new fields at the tail of the ioctl, so a zero
- * value should have a backwards compatible meaning. And for
- * output params, userspace won't see the newly added output
- * fields.. so that has to be somehow ok.
- */
-
-#define MSM_PIPE_NONE 0x00
-#define MSM_PIPE_2D0 0x01
-#define MSM_PIPE_2D1 0x02
-#define MSM_PIPE_3D0 0x10
-
-/* The pipe-id just uses the lower bits, so can be OR'd with flags in
- * the upper 16 bits (which could be extended further, if needed, maybe
- * we extend/overload the pipe-id some day to deal with multiple rings,
- * but even then I don't think we need the full lower 16 bits).
- */
-#define MSM_PIPE_ID_MASK 0xffff
-#define MSM_PIPE_ID(x) ((x) & MSM_PIPE_ID_MASK)
-#define MSM_PIPE_FLAGS(x) ((x) & ~MSM_PIPE_ID_MASK)
-
-/* timeouts are specified in clock-monotonic absolute times (to simplify
- * restarting interrupted ioctls). The following struct is logically the
- * same as 'struct timespec' but 32/64b ABI safe.
- */
-struct drm_msm_timespec {
- __s64 tv_sec; /* seconds */
- __s64 tv_nsec; /* nanoseconds */
-};
-
-#define MSM_PARAM_GPU_ID 0x01
-#define MSM_PARAM_GMEM_SIZE 0x02
-#define MSM_PARAM_CHIP_ID 0x03
-#define MSM_PARAM_MAX_FREQ 0x04
-#define MSM_PARAM_TIMESTAMP 0x05
-#define MSM_PARAM_GMEM_BASE 0x06
-#define MSM_PARAM_NR_RINGS 0x07
-
-struct drm_msm_param {
- __u32 pipe; /* in, MSM_PIPE_x */
- __u32 param; /* in, MSM_PARAM_x */
- __u64 value; /* out (get_param) or in (set_param) */
-};
-
-/*
- * GEM buffers:
- */
-
-#define MSM_BO_SCANOUT 0x00000001 /* scanout capable */
-#define MSM_BO_GPU_READONLY 0x00000002
-#define MSM_BO_CACHE_MASK 0x000f0000
-/* cache modes */
-#define MSM_BO_CACHED 0x00010000
-#define MSM_BO_WC 0x00020000
-#define MSM_BO_UNCACHED 0x00040000
-
-#define MSM_BO_FLAGS (MSM_BO_SCANOUT | \
- MSM_BO_GPU_READONLY | \
- MSM_BO_CACHED | \
- MSM_BO_WC | \
- MSM_BO_UNCACHED)
-
-struct drm_msm_gem_new {
- __u64 size; /* in */
- __u32 flags; /* in, mask of MSM_BO_x */
- __u32 handle; /* out */
-};
-
-#define MSM_INFO_IOVA 0x01
-
-#define MSM_INFO_FLAGS (MSM_INFO_IOVA)
-
-struct drm_msm_gem_info {
- __u32 handle; /* in */
- __u32 flags; /* in - combination of MSM_INFO_* flags */
- __u64 offset; /* out, mmap() offset or iova */
-};
-
-#define MSM_PREP_READ 0x01
-#define MSM_PREP_WRITE 0x02
-#define MSM_PREP_NOSYNC 0x04
-
-#define MSM_PREP_FLAGS (MSM_PREP_READ | MSM_PREP_WRITE | MSM_PREP_NOSYNC)
-
-struct drm_msm_gem_cpu_prep {
- __u32 handle; /* in */
- __u32 op; /* in, mask of MSM_PREP_x */
- struct drm_msm_timespec timeout; /* in */
-};
-
-struct drm_msm_gem_cpu_fini {
- __u32 handle; /* in */
-};
-
-/*
- * Cmdstream Submission:
- */
-
-/* The value written into the cmdstream is logically:
- *
- * ((relocbuf->gpuaddr + reloc_offset) << shift) | or
- *
- * When we have GPU's w/ >32bit ptrs, it should be possible to deal
- * with this by emit'ing two reloc entries with appropriate shift
- * values. Or a new MSM_SUBMIT_CMD_x type would also be an option.
- *
- * NOTE that reloc's must be sorted by order of increasing submit_offset,
- * otherwise EINVAL.
- */
-struct drm_msm_gem_submit_reloc {
- __u32 submit_offset; /* in, offset from submit_bo */
- __u32 or; /* in, value OR'd with result */
- __s32 shift; /* in, amount of left shift (can be negative) */
- __u32 reloc_idx; /* in, index of reloc_bo buffer */
- __u64 reloc_offset; /* in, offset from start of reloc_bo */
-};
-
-/* submit-types:
- * BUF - this cmd buffer is executed normally.
- * IB_TARGET_BUF - this cmd buffer is an IB target. Reloc's are
- * processed normally, but the kernel does not setup an IB to
- * this buffer in the first-level ringbuffer
- * CTX_RESTORE_BUF - only executed if there has been a GPU context
- * switch since the last SUBMIT ioctl
- */
-#define MSM_SUBMIT_CMD_BUF 0x0001
-#define MSM_SUBMIT_CMD_IB_TARGET_BUF 0x0002
-#define MSM_SUBMIT_CMD_CTX_RESTORE_BUF 0x0003
-struct drm_msm_gem_submit_cmd {
- __u32 type; /* in, one of MSM_SUBMIT_CMD_x */
- __u32 submit_idx; /* in, index of submit_bo cmdstream buffer */
- __u32 submit_offset; /* in, offset into submit_bo */
- __u32 size; /* in, cmdstream size */
- __u32 pad;
- __u32 nr_relocs; /* in, number of submit_reloc's */
- __u64 relocs; /* in, ptr to array of submit_reloc's */
-};
-
-/* Each buffer referenced elsewhere in the cmdstream submit (ie. the
- * cmdstream buffer(s) themselves or reloc entries) has one (and only
- * one) entry in the submit->bos[] table.
- *
- * As a optimization, the current buffer (gpu virtual address) can be
- * passed back through the 'presumed' field. If on a subsequent reloc,
- * userspace passes back a 'presumed' address that is still valid,
- * then patching the cmdstream for this entry is skipped. This can
- * avoid kernel needing to map/access the cmdstream bo in the common
- * case.
- */
-#define MSM_SUBMIT_BO_READ 0x0001
-#define MSM_SUBMIT_BO_WRITE 0x0002
-
-#define MSM_SUBMIT_BO_FLAGS (MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_WRITE)
-
-struct drm_msm_gem_submit_bo {
- __u32 flags; /* in, mask of MSM_SUBMIT_BO_x */
- __u32 handle; /* in, GEM handle */
- __u64 presumed; /* in/out, presumed buffer address */
-};
-
-/* Valid submit ioctl flags: */
-#define MSM_SUBMIT_NO_IMPLICIT 0x80000000 /* disable implicit sync */
-#define MSM_SUBMIT_FENCE_FD_IN 0x40000000 /* enable input fence_fd */
-#define MSM_SUBMIT_FENCE_FD_OUT 0x20000000 /* enable output fence_fd */
-#define MSM_SUBMIT_SUDO 0x10000000 /* run submitted cmds from RB */
-#define MSM_SUBMIT_FLAGS ( \
- MSM_SUBMIT_NO_IMPLICIT | \
- MSM_SUBMIT_FENCE_FD_IN | \
- MSM_SUBMIT_FENCE_FD_OUT | \
- MSM_SUBMIT_SUDO | \
- 0)
-
-/* Each cmdstream submit consists of a table of buffers involved, and
- * one or more cmdstream buffers. This allows for conditional execution
- * (context-restore), and IB buffers needed for per tile/bin draw cmds.
- */
-struct drm_msm_gem_submit {
- __u32 flags; /* MSM_PIPE_x | MSM_SUBMIT_x */
- __u32 fence; /* out */
- __u32 nr_bos; /* in, number of submit_bo's */
- __u32 nr_cmds; /* in, number of submit_cmd's */
- __u64 bos; /* in, ptr to array of submit_bo's */
- __u64 cmds; /* in, ptr to array of submit_cmd's */
- __s32 fence_fd; /* in/out fence fd (see MSM_SUBMIT_FENCE_FD_IN/OUT) */
- __u32 queueid; /* in, submitqueue id */
-};
-
-/* The normal way to synchronize with the GPU is just to CPU_PREP on
- * a buffer if you need to access it from the CPU (other cmdstream
- * submission from same or other contexts, PAGE_FLIP ioctl, etc, all
- * handle the required synchronization under the hood). This ioctl
- * mainly just exists as a way to implement the gallium pipe_fence
- * APIs without requiring a dummy bo to synchronize on.
- */
-struct drm_msm_wait_fence {
- __u32 fence; /* in */
- __u32 pad;
- struct drm_msm_timespec timeout; /* in */
- __u32 queueid; /* in, submitqueue id */
-};
-
-/* madvise provides a way to tell the kernel in case a buffers contents
- * can be discarded under memory pressure, which is useful for userspace
- * bo cache where we want to optimistically hold on to buffer allocate
- * and potential mmap, but allow the pages to be discarded under memory
- * pressure.
- *
- * Typical usage would involve madvise(DONTNEED) when buffer enters BO
- * cache, and madvise(WILLNEED) if trying to recycle buffer from BO cache.
- * In the WILLNEED case, 'retained' indicates to userspace whether the
- * backing pages still exist.
- */
-#define MSM_MADV_WILLNEED 0 /* backing pages are needed, status returned in 'retained' */
-#define MSM_MADV_DONTNEED 1 /* backing pages not needed */
-#define __MSM_MADV_PURGED 2 /* internal state */
-
-struct drm_msm_gem_madvise {
- __u32 handle; /* in, GEM handle */
- __u32 madv; /* in, MSM_MADV_x */
- __u32 retained; /* out, whether backing store still exists */
-};
-
-/*
- * Draw queues allow the user to set specific submission parameter. Command
- * submissions specify a specific submitqueue to use. ID 0 is reserved for
- * backwards compatibility as a "default" submitqueue
- */
-
-#define MSM_SUBMITQUEUE_FLAGS (0)
-
-struct drm_msm_submitqueue {
- __u32 flags; /* in, MSM_SUBMITQUEUE_x */
- __u32 prio; /* in, Priority level */
- __u32 id; /* out, identifier */
-};
-
-#define DRM_MSM_GET_PARAM 0x00
-/* placeholder:
-#define DRM_MSM_SET_PARAM 0x01
- */
-#define DRM_MSM_GEM_NEW 0x02
-#define DRM_MSM_GEM_INFO 0x03
-#define DRM_MSM_GEM_CPU_PREP 0x04
-#define DRM_MSM_GEM_CPU_FINI 0x05
-#define DRM_MSM_GEM_SUBMIT 0x06
-#define DRM_MSM_WAIT_FENCE 0x07
-#define DRM_MSM_GEM_MADVISE 0x08
-/* placeholder:
-#define DRM_MSM_GEM_SVM_NEW 0x09
- */
-#define DRM_MSM_SUBMITQUEUE_NEW 0x0A
-#define DRM_MSM_SUBMITQUEUE_CLOSE 0x0B
-
-#define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param)
-#define DRM_IOCTL_MSM_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_NEW, struct drm_msm_gem_new)
-#define DRM_IOCTL_MSM_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_INFO, struct drm_msm_gem_info)
-#define DRM_IOCTL_MSM_GEM_CPU_PREP DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_PREP, struct drm_msm_gem_cpu_prep)
-#define DRM_IOCTL_MSM_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_FINI, struct drm_msm_gem_cpu_fini)
-#define DRM_IOCTL_MSM_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_SUBMIT, struct drm_msm_gem_submit)
-#define DRM_IOCTL_MSM_WAIT_FENCE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_WAIT_FENCE, struct drm_msm_wait_fence)
-#define DRM_IOCTL_MSM_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_MADVISE, struct drm_msm_gem_madvise)
-#define DRM_IOCTL_MSM_SUBMITQUEUE_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_NEW, struct drm_msm_submitqueue)
-#define DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_CLOSE, __u32)
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* __MSM_DRM_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/nouveau_drm.h b/lib/libc/include/generic-musl/drm/nouveau_drm.h
deleted file mode 100644
index 14d11a1c696d889d8e7d9cb0b508a2125d48d679..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/nouveau_drm.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright 2005 Stephane Marchesin.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef __NOUVEAU_DRM_H__
-#define __NOUVEAU_DRM_H__
-
-#define DRM_NOUVEAU_EVENT_NVIF 0x80000000
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#define NOUVEAU_GEM_DOMAIN_CPU (1 << 0)
-#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1)
-#define NOUVEAU_GEM_DOMAIN_GART (1 << 2)
-#define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3)
-#define NOUVEAU_GEM_DOMAIN_COHERENT (1 << 4)
-
-#define NOUVEAU_GEM_TILE_COMP 0x00030000 /* nv50-only */
-#define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00
-#define NOUVEAU_GEM_TILE_16BPP 0x00000001
-#define NOUVEAU_GEM_TILE_32BPP 0x00000002
-#define NOUVEAU_GEM_TILE_ZETA 0x00000004
-#define NOUVEAU_GEM_TILE_NONCONTIG 0x00000008
-
-struct drm_nouveau_gem_info {
- __u32 handle;
- __u32 domain;
- __u64 size;
- __u64 offset;
- __u64 map_handle;
- __u32 tile_mode;
- __u32 tile_flags;
-};
-
-struct drm_nouveau_gem_new {
- struct drm_nouveau_gem_info info;
- __u32 channel_hint;
- __u32 align;
-};
-
-#define NOUVEAU_GEM_MAX_BUFFERS 1024
-struct drm_nouveau_gem_pushbuf_bo_presumed {
- __u32 valid;
- __u32 domain;
- __u64 offset;
-};
-
-struct drm_nouveau_gem_pushbuf_bo {
- __u64 user_priv;
- __u32 handle;
- __u32 read_domains;
- __u32 write_domains;
- __u32 valid_domains;
- struct drm_nouveau_gem_pushbuf_bo_presumed presumed;
-};
-
-#define NOUVEAU_GEM_RELOC_LOW (1 << 0)
-#define NOUVEAU_GEM_RELOC_HIGH (1 << 1)
-#define NOUVEAU_GEM_RELOC_OR (1 << 2)
-#define NOUVEAU_GEM_MAX_RELOCS 1024
-struct drm_nouveau_gem_pushbuf_reloc {
- __u32 reloc_bo_index;
- __u32 reloc_bo_offset;
- __u32 bo_index;
- __u32 flags;
- __u32 data;
- __u32 vor;
- __u32 tor;
-};
-
-#define NOUVEAU_GEM_MAX_PUSH 512
-struct drm_nouveau_gem_pushbuf_push {
- __u32 bo_index;
- __u32 pad;
- __u64 offset;
- __u64 length;
-};
-
-struct drm_nouveau_gem_pushbuf {
- __u32 channel;
- __u32 nr_buffers;
- __u64 buffers;
- __u32 nr_relocs;
- __u32 nr_push;
- __u64 relocs;
- __u64 push;
- __u32 suffix0;
- __u32 suffix1;
- __u64 vram_available;
- __u64 gart_available;
-};
-
-#define NOUVEAU_GEM_CPU_PREP_NOWAIT 0x00000001
-#define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004
-struct drm_nouveau_gem_cpu_prep {
- __u32 handle;
- __u32 flags;
-};
-
-struct drm_nouveau_gem_cpu_fini {
- __u32 handle;
-};
-
-#define DRM_NOUVEAU_GETPARAM 0x00 /* deprecated */
-#define DRM_NOUVEAU_SETPARAM 0x01 /* deprecated */
-#define DRM_NOUVEAU_CHANNEL_ALLOC 0x02 /* deprecated */
-#define DRM_NOUVEAU_CHANNEL_FREE 0x03 /* deprecated */
-#define DRM_NOUVEAU_GROBJ_ALLOC 0x04 /* deprecated */
-#define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 /* deprecated */
-#define DRM_NOUVEAU_GPUOBJ_FREE 0x06 /* deprecated */
-#define DRM_NOUVEAU_NVIF 0x07
-#define DRM_NOUVEAU_GEM_NEW 0x40
-#define DRM_NOUVEAU_GEM_PUSHBUF 0x41
-#define DRM_NOUVEAU_GEM_CPU_PREP 0x42
-#define DRM_NOUVEAU_GEM_CPU_FINI 0x43
-#define DRM_NOUVEAU_GEM_INFO 0x44
-
-#define DRM_IOCTL_NOUVEAU_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_NEW, struct drm_nouveau_gem_new)
-#define DRM_IOCTL_NOUVEAU_GEM_PUSHBUF DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_PUSHBUF, struct drm_nouveau_gem_pushbuf)
-#define DRM_IOCTL_NOUVEAU_GEM_CPU_PREP DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_PREP, struct drm_nouveau_gem_cpu_prep)
-#define DRM_IOCTL_NOUVEAU_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_FINI, struct drm_nouveau_gem_cpu_fini)
-#define DRM_IOCTL_NOUVEAU_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_INFO, struct drm_nouveau_gem_info)
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* __NOUVEAU_DRM_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/omap_drm.h b/lib/libc/include/generic-musl/drm/omap_drm.h
deleted file mode 100644
index 98cc08bd4c53a13799245701b82e91fda206e8e3..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/omap_drm.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
- * include/uapi/drm/omap_drm.h
- *
- * Copyright (C) 2011 Texas Instruments
- * Author: Rob Clark
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by
- * the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see .
- */
-
-#ifndef __OMAP_DRM_H__
-#define __OMAP_DRM_H__
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* Please note that modifications to all structs defined here are
- * subject to backwards-compatibility constraints.
- */
-
-#define OMAP_PARAM_CHIPSET_ID 1 /* ie. 0x3430, 0x4430, etc */
-
-struct drm_omap_param {
- __u64 param; /* in */
- __u64 value; /* in (set_param), out (get_param) */
-};
-
-#define OMAP_BO_SCANOUT 0x00000001 /* scanout capable (phys contiguous) */
-#define OMAP_BO_CACHE_MASK 0x00000006 /* cache type mask, see cache modes */
-#define OMAP_BO_TILED_MASK 0x00000f00 /* tiled mapping mask, see tiled modes */
-
-/* cache modes */
-#define OMAP_BO_CACHED 0x00000000 /* default */
-#define OMAP_BO_WC 0x00000002 /* write-combine */
-#define OMAP_BO_UNCACHED 0x00000004 /* strongly-ordered (uncached) */
-
-/* tiled modes */
-#define OMAP_BO_TILED_8 0x00000100
-#define OMAP_BO_TILED_16 0x00000200
-#define OMAP_BO_TILED_32 0x00000300
-#define OMAP_BO_TILED (OMAP_BO_TILED_8 | OMAP_BO_TILED_16 | OMAP_BO_TILED_32)
-
-union omap_gem_size {
- __u32 bytes; /* (for non-tiled formats) */
- struct {
- __u16 width;
- __u16 height;
- } tiled; /* (for tiled formats) */
-};
-
-struct drm_omap_gem_new {
- union omap_gem_size size; /* in */
- __u32 flags; /* in */
- __u32 handle; /* out */
- __u32 __pad;
-};
-
-/* mask of operations: */
-enum omap_gem_op {
- OMAP_GEM_READ = 0x01,
- OMAP_GEM_WRITE = 0x02,
-};
-
-struct drm_omap_gem_cpu_prep {
- __u32 handle; /* buffer handle (in) */
- __u32 op; /* mask of omap_gem_op (in) */
-};
-
-struct drm_omap_gem_cpu_fini {
- __u32 handle; /* buffer handle (in) */
- __u32 op; /* mask of omap_gem_op (in) */
- /* TODO maybe here we pass down info about what regions are touched
- * by sw so we can be clever about cache ops? For now a placeholder,
- * set to zero and we just do full buffer flush..
- */
- __u32 nregions;
- __u32 __pad;
-};
-
-struct drm_omap_gem_info {
- __u32 handle; /* buffer handle (in) */
- __u32 pad;
- __u64 offset; /* mmap offset (out) */
- /* note: in case of tiled buffers, the user virtual size can be
- * different from the physical size (ie. how many pages are needed
- * to back the object) which is returned in DRM_IOCTL_GEM_OPEN..
- * This size here is the one that should be used if you want to
- * mmap() the buffer:
- */
- __u32 size; /* virtual size for mmap'ing (out) */
- __u32 __pad;
-};
-
-#define DRM_OMAP_GET_PARAM 0x00
-#define DRM_OMAP_SET_PARAM 0x01
-#define DRM_OMAP_GEM_NEW 0x03
-#define DRM_OMAP_GEM_CPU_PREP 0x04 /* Deprecated, to be removed */
-#define DRM_OMAP_GEM_CPU_FINI 0x05 /* Deprecated, to be removed */
-#define DRM_OMAP_GEM_INFO 0x06
-#define DRM_OMAP_NUM_IOCTLS 0x07
-
-#define DRM_IOCTL_OMAP_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_PARAM, struct drm_omap_param)
-#define DRM_IOCTL_OMAP_SET_PARAM DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param)
-#define DRM_IOCTL_OMAP_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new)
-#define DRM_IOCTL_OMAP_GEM_CPU_PREP DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, struct drm_omap_gem_cpu_prep)
-#define DRM_IOCTL_OMAP_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini)
-#define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info)
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* __OMAP_DRM_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/qxl_drm.h b/lib/libc/include/generic-musl/drm/qxl_drm.h
deleted file mode 100644
index a7abf690cdadf83eb2edb7bef3ee918d691df7de..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/qxl_drm.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright 2013 Red Hat
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-#ifndef QXL_DRM_H
-#define QXL_DRM_H
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* Please note that modifications to all structs defined here are
- * subject to backwards-compatibility constraints.
- *
- * Do not use pointers, use __u64 instead for 32 bit / 64 bit user/kernel
- * compatibility Keep fields aligned to their size
- */
-
-#define QXL_GEM_DOMAIN_CPU 0
-#define QXL_GEM_DOMAIN_VRAM 1
-#define QXL_GEM_DOMAIN_SURFACE 2
-
-#define DRM_QXL_ALLOC 0x00
-#define DRM_QXL_MAP 0x01
-#define DRM_QXL_EXECBUFFER 0x02
-#define DRM_QXL_UPDATE_AREA 0x03
-#define DRM_QXL_GETPARAM 0x04
-#define DRM_QXL_CLIENTCAP 0x05
-
-#define DRM_QXL_ALLOC_SURF 0x06
-
-struct drm_qxl_alloc {
- __u32 size;
- __u32 handle; /* 0 is an invalid handle */
-};
-
-struct drm_qxl_map {
- __u64 offset; /* use for mmap system call */
- __u32 handle;
- __u32 pad;
-};
-
-/*
- * dest is the bo we are writing the relocation into
- * src is bo we are relocating.
- * *(dest_handle.base_addr + dest_offset) = physical_address(src_handle.addr +
- * src_offset)
- */
-#define QXL_RELOC_TYPE_BO 1
-#define QXL_RELOC_TYPE_SURF 2
-
-struct drm_qxl_reloc {
- __u64 src_offset; /* offset into src_handle or src buffer */
- __u64 dst_offset; /* offset in dest handle */
- __u32 src_handle; /* dest handle to compute address from */
- __u32 dst_handle; /* 0 if to command buffer */
- __u32 reloc_type;
- __u32 pad;
-};
-
-struct drm_qxl_command {
- __u64 command; /* void* */
- __u64 relocs; /* struct drm_qxl_reloc* */
- __u32 type;
- __u32 command_size;
- __u32 relocs_num;
- __u32 pad;
-};
-
-struct drm_qxl_execbuffer {
- __u32 flags; /* for future use */
- __u32 commands_num;
- __u64 commands; /* struct drm_qxl_command* */
-};
-
-struct drm_qxl_update_area {
- __u32 handle;
- __u32 top;
- __u32 left;
- __u32 bottom;
- __u32 right;
- __u32 pad;
-};
-
-#define QXL_PARAM_NUM_SURFACES 1 /* rom->n_surfaces */
-#define QXL_PARAM_MAX_RELOCS 2
-struct drm_qxl_getparam {
- __u64 param;
- __u64 value;
-};
-
-/* these are one bit values */
-struct drm_qxl_clientcap {
- __u32 index;
- __u32 pad;
-};
-
-struct drm_qxl_alloc_surf {
- __u32 format;
- __u32 width;
- __u32 height;
- __s32 stride;
- __u32 handle;
- __u32 pad;
-};
-
-#define DRM_IOCTL_QXL_ALLOC \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC, struct drm_qxl_alloc)
-
-#define DRM_IOCTL_QXL_MAP \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_MAP, struct drm_qxl_map)
-
-#define DRM_IOCTL_QXL_EXECBUFFER \
- DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_EXECBUFFER,\
- struct drm_qxl_execbuffer)
-
-#define DRM_IOCTL_QXL_UPDATE_AREA \
- DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_UPDATE_AREA,\
- struct drm_qxl_update_area)
-
-#define DRM_IOCTL_QXL_GETPARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_GETPARAM,\
- struct drm_qxl_getparam)
-
-#define DRM_IOCTL_QXL_CLIENTCAP \
- DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_CLIENTCAP,\
- struct drm_qxl_clientcap)
-
-#define DRM_IOCTL_QXL_ALLOC_SURF \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC_SURF,\
- struct drm_qxl_alloc_surf)
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/r128_drm.h b/lib/libc/include/generic-musl/drm/r128_drm.h
deleted file mode 100644
index 6bd4ed1676e1c47e8f3968d76a8356eee86aed51..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/r128_drm.h
+++ /dev/null
@@ -1,336 +0,0 @@
-/* r128_drm.h -- Public header for the r128 driver -*- linux-c -*-
- * Created: Wed Apr 5 19:24:19 2000 by kevin@precisioninsight.com
- */
-/*
- * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Gareth Hughes
- * Kevin E. Martin
- */
-
-#ifndef __R128_DRM_H__
-#define __R128_DRM_H__
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* WARNING: If you change any of these defines, make sure to change the
- * defines in the X server file (r128_sarea.h)
- */
-#ifndef __R128_SAREA_DEFINES__
-#define __R128_SAREA_DEFINES__
-
-/* What needs to be changed for the current vertex buffer?
- */
-#define R128_UPLOAD_CONTEXT 0x001
-#define R128_UPLOAD_SETUP 0x002
-#define R128_UPLOAD_TEX0 0x004
-#define R128_UPLOAD_TEX1 0x008
-#define R128_UPLOAD_TEX0IMAGES 0x010
-#define R128_UPLOAD_TEX1IMAGES 0x020
-#define R128_UPLOAD_CORE 0x040
-#define R128_UPLOAD_MASKS 0x080
-#define R128_UPLOAD_WINDOW 0x100
-#define R128_UPLOAD_CLIPRECTS 0x200 /* handled client-side */
-#define R128_REQUIRE_QUIESCENCE 0x400
-#define R128_UPLOAD_ALL 0x7ff
-
-#define R128_FRONT 0x1
-#define R128_BACK 0x2
-#define R128_DEPTH 0x4
-
-/* Primitive types
- */
-#define R128_POINTS 0x1
-#define R128_LINES 0x2
-#define R128_LINE_STRIP 0x3
-#define R128_TRIANGLES 0x4
-#define R128_TRIANGLE_FAN 0x5
-#define R128_TRIANGLE_STRIP 0x6
-
-/* Vertex/indirect buffer size
- */
-#define R128_BUFFER_SIZE 16384
-
-/* Byte offsets for indirect buffer data
- */
-#define R128_INDEX_PRIM_OFFSET 20
-#define R128_HOSTDATA_BLIT_OFFSET 32
-
-/* Keep these small for testing.
- */
-#define R128_NR_SAREA_CLIPRECTS 12
-
-/* There are 2 heaps (local/AGP). Each region within a heap is a
- * minimum of 64k, and there are at most 64 of them per heap.
- */
-#define R128_LOCAL_TEX_HEAP 0
-#define R128_AGP_TEX_HEAP 1
-#define R128_NR_TEX_HEAPS 2
-#define R128_NR_TEX_REGIONS 64
-#define R128_LOG_TEX_GRANULARITY 16
-
-#define R128_NR_CONTEXT_REGS 12
-
-#define R128_MAX_TEXTURE_LEVELS 11
-#define R128_MAX_TEXTURE_UNITS 2
-
-#endif /* __R128_SAREA_DEFINES__ */
-
-typedef struct {
- /* Context state - can be written in one large chunk */
- unsigned int dst_pitch_offset_c;
- unsigned int dp_gui_master_cntl_c;
- unsigned int sc_top_left_c;
- unsigned int sc_bottom_right_c;
- unsigned int z_offset_c;
- unsigned int z_pitch_c;
- unsigned int z_sten_cntl_c;
- unsigned int tex_cntl_c;
- unsigned int misc_3d_state_cntl_reg;
- unsigned int texture_clr_cmp_clr_c;
- unsigned int texture_clr_cmp_msk_c;
- unsigned int fog_color_c;
-
- /* Texture state */
- unsigned int tex_size_pitch_c;
- unsigned int constant_color_c;
-
- /* Setup state */
- unsigned int pm4_vc_fpu_setup;
- unsigned int setup_cntl;
-
- /* Mask state */
- unsigned int dp_write_mask;
- unsigned int sten_ref_mask_c;
- unsigned int plane_3d_mask_c;
-
- /* Window state */
- unsigned int window_xy_offset;
-
- /* Core state */
- unsigned int scale_3d_cntl;
-} drm_r128_context_regs_t;
-
-/* Setup registers for each texture unit
- */
-typedef struct {
- unsigned int tex_cntl;
- unsigned int tex_combine_cntl;
- unsigned int tex_size_pitch;
- unsigned int tex_offset[R128_MAX_TEXTURE_LEVELS];
- unsigned int tex_border_color;
-} drm_r128_texture_regs_t;
-
-typedef struct drm_r128_sarea {
- /* The channel for communication of state information to the kernel
- * on firing a vertex buffer.
- */
- drm_r128_context_regs_t context_state;
- drm_r128_texture_regs_t tex_state[R128_MAX_TEXTURE_UNITS];
- unsigned int dirty;
- unsigned int vertsize;
- unsigned int vc_format;
-
- /* The current cliprects, or a subset thereof.
- */
- struct drm_clip_rect boxes[R128_NR_SAREA_CLIPRECTS];
- unsigned int nbox;
-
- /* Counters for client-side throttling of rendering clients.
- */
- unsigned int last_frame;
- unsigned int last_dispatch;
-
- struct drm_tex_region tex_list[R128_NR_TEX_HEAPS][R128_NR_TEX_REGIONS + 1];
- unsigned int tex_age[R128_NR_TEX_HEAPS];
- int ctx_owner;
- int pfAllowPageFlip; /* number of 3d windows (0,1,2 or more) */
- int pfCurrentPage; /* which buffer is being displayed? */
-} drm_r128_sarea_t;
-
-/* WARNING: If you change any of these defines, make sure to change the
- * defines in the Xserver file (xf86drmR128.h)
- */
-
-/* Rage 128 specific ioctls
- * The device specific ioctl range is 0x40 to 0x79.
- */
-#define DRM_R128_INIT 0x00
-#define DRM_R128_CCE_START 0x01
-#define DRM_R128_CCE_STOP 0x02
-#define DRM_R128_CCE_RESET 0x03
-#define DRM_R128_CCE_IDLE 0x04
-/* 0x05 not used */
-#define DRM_R128_RESET 0x06
-#define DRM_R128_SWAP 0x07
-#define DRM_R128_CLEAR 0x08
-#define DRM_R128_VERTEX 0x09
-#define DRM_R128_INDICES 0x0a
-#define DRM_R128_BLIT 0x0b
-#define DRM_R128_DEPTH 0x0c
-#define DRM_R128_STIPPLE 0x0d
-/* 0x0e not used */
-#define DRM_R128_INDIRECT 0x0f
-#define DRM_R128_FULLSCREEN 0x10
-#define DRM_R128_CLEAR2 0x11
-#define DRM_R128_GETPARAM 0x12
-#define DRM_R128_FLIP 0x13
-
-#define DRM_IOCTL_R128_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_R128_INIT, drm_r128_init_t)
-#define DRM_IOCTL_R128_CCE_START DRM_IO( DRM_COMMAND_BASE + DRM_R128_CCE_START)
-#define DRM_IOCTL_R128_CCE_STOP DRM_IOW( DRM_COMMAND_BASE + DRM_R128_CCE_STOP, drm_r128_cce_stop_t)
-#define DRM_IOCTL_R128_CCE_RESET DRM_IO( DRM_COMMAND_BASE + DRM_R128_CCE_RESET)
-#define DRM_IOCTL_R128_CCE_IDLE DRM_IO( DRM_COMMAND_BASE + DRM_R128_CCE_IDLE)
-/* 0x05 not used */
-#define DRM_IOCTL_R128_RESET DRM_IO( DRM_COMMAND_BASE + DRM_R128_RESET)
-#define DRM_IOCTL_R128_SWAP DRM_IO( DRM_COMMAND_BASE + DRM_R128_SWAP)
-#define DRM_IOCTL_R128_CLEAR DRM_IOW( DRM_COMMAND_BASE + DRM_R128_CLEAR, drm_r128_clear_t)
-#define DRM_IOCTL_R128_VERTEX DRM_IOW( DRM_COMMAND_BASE + DRM_R128_VERTEX, drm_r128_vertex_t)
-#define DRM_IOCTL_R128_INDICES DRM_IOW( DRM_COMMAND_BASE + DRM_R128_INDICES, drm_r128_indices_t)
-#define DRM_IOCTL_R128_BLIT DRM_IOW( DRM_COMMAND_BASE + DRM_R128_BLIT, drm_r128_blit_t)
-#define DRM_IOCTL_R128_DEPTH DRM_IOW( DRM_COMMAND_BASE + DRM_R128_DEPTH, drm_r128_depth_t)
-#define DRM_IOCTL_R128_STIPPLE DRM_IOW( DRM_COMMAND_BASE + DRM_R128_STIPPLE, drm_r128_stipple_t)
-/* 0x0e not used */
-#define DRM_IOCTL_R128_INDIRECT DRM_IOWR(DRM_COMMAND_BASE + DRM_R128_INDIRECT, drm_r128_indirect_t)
-#define DRM_IOCTL_R128_FULLSCREEN DRM_IOW( DRM_COMMAND_BASE + DRM_R128_FULLSCREEN, drm_r128_fullscreen_t)
-#define DRM_IOCTL_R128_CLEAR2 DRM_IOW( DRM_COMMAND_BASE + DRM_R128_CLEAR2, drm_r128_clear2_t)
-#define DRM_IOCTL_R128_GETPARAM DRM_IOWR( DRM_COMMAND_BASE + DRM_R128_GETPARAM, drm_r128_getparam_t)
-#define DRM_IOCTL_R128_FLIP DRM_IO( DRM_COMMAND_BASE + DRM_R128_FLIP)
-
-typedef struct drm_r128_init {
- enum {
- R128_INIT_CCE = 0x01,
- R128_CLEANUP_CCE = 0x02
- } func;
- unsigned long sarea_priv_offset;
- int is_pci;
- int cce_mode;
- int cce_secure;
- int ring_size;
- int usec_timeout;
-
- unsigned int fb_bpp;
- unsigned int front_offset, front_pitch;
- unsigned int back_offset, back_pitch;
- unsigned int depth_bpp;
- unsigned int depth_offset, depth_pitch;
- unsigned int span_offset;
-
- unsigned long fb_offset;
- unsigned long mmio_offset;
- unsigned long ring_offset;
- unsigned long ring_rptr_offset;
- unsigned long buffers_offset;
- unsigned long agp_textures_offset;
-} drm_r128_init_t;
-
-typedef struct drm_r128_cce_stop {
- int flush;
- int idle;
-} drm_r128_cce_stop_t;
-
-typedef struct drm_r128_clear {
- unsigned int flags;
- unsigned int clear_color;
- unsigned int clear_depth;
- unsigned int color_mask;
- unsigned int depth_mask;
-} drm_r128_clear_t;
-
-typedef struct drm_r128_vertex {
- int prim;
- int idx; /* Index of vertex buffer */
- int count; /* Number of vertices in buffer */
- int discard; /* Client finished with buffer? */
-} drm_r128_vertex_t;
-
-typedef struct drm_r128_indices {
- int prim;
- int idx;
- int start;
- int end;
- int discard; /* Client finished with buffer? */
-} drm_r128_indices_t;
-
-typedef struct drm_r128_blit {
- int idx;
- int pitch;
- int offset;
- int format;
- unsigned short x, y;
- unsigned short width, height;
-} drm_r128_blit_t;
-
-typedef struct drm_r128_depth {
- enum {
- R128_WRITE_SPAN = 0x01,
- R128_WRITE_PIXELS = 0x02,
- R128_READ_SPAN = 0x03,
- R128_READ_PIXELS = 0x04
- } func;
- int n;
- int *x;
- int *y;
- unsigned int *buffer;
- unsigned char *mask;
-} drm_r128_depth_t;
-
-typedef struct drm_r128_stipple {
- unsigned int *mask;
-} drm_r128_stipple_t;
-
-typedef struct drm_r128_indirect {
- int idx;
- int start;
- int end;
- int discard;
-} drm_r128_indirect_t;
-
-typedef struct drm_r128_fullscreen {
- enum {
- R128_INIT_FULLSCREEN = 0x01,
- R128_CLEANUP_FULLSCREEN = 0x02
- } func;
-} drm_r128_fullscreen_t;
-
-/* 2.3: An ioctl to get parameters that aren't available to the 3d
- * client any other way.
- */
-#define R128_PARAM_IRQ_NR 1
-
-typedef struct drm_r128_getparam {
- int param;
- void *value;
-} drm_r128_getparam_t;
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/radeon_drm.h b/lib/libc/include/generic-musl/drm/radeon_drm.h
deleted file mode 100644
index c8db8c544074af0e7b017068c967bdf324a3190b..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/radeon_drm.h
+++ /dev/null
@@ -1,1078 +0,0 @@
-/* radeon_drm.h -- Public header for the radeon driver -*- linux-c -*-
- *
- * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
- * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
- * All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Kevin E. Martin
- * Gareth Hughes
- * Keith Whitwell
- */
-
-#ifndef __RADEON_DRM_H__
-#define __RADEON_DRM_H__
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* WARNING: If you change any of these defines, make sure to change the
- * defines in the X server file (radeon_sarea.h)
- */
-#ifndef __RADEON_SAREA_DEFINES__
-#define __RADEON_SAREA_DEFINES__
-
-/* Old style state flags, required for sarea interface (1.1 and 1.2
- * clears) and 1.2 drm_vertex2 ioctl.
- */
-#define RADEON_UPLOAD_CONTEXT 0x00000001
-#define RADEON_UPLOAD_VERTFMT 0x00000002
-#define RADEON_UPLOAD_LINE 0x00000004
-#define RADEON_UPLOAD_BUMPMAP 0x00000008
-#define RADEON_UPLOAD_MASKS 0x00000010
-#define RADEON_UPLOAD_VIEWPORT 0x00000020
-#define RADEON_UPLOAD_SETUP 0x00000040
-#define RADEON_UPLOAD_TCL 0x00000080
-#define RADEON_UPLOAD_MISC 0x00000100
-#define RADEON_UPLOAD_TEX0 0x00000200
-#define RADEON_UPLOAD_TEX1 0x00000400
-#define RADEON_UPLOAD_TEX2 0x00000800
-#define RADEON_UPLOAD_TEX0IMAGES 0x00001000
-#define RADEON_UPLOAD_TEX1IMAGES 0x00002000
-#define RADEON_UPLOAD_TEX2IMAGES 0x00004000
-#define RADEON_UPLOAD_CLIPRECTS 0x00008000 /* handled client-side */
-#define RADEON_REQUIRE_QUIESCENCE 0x00010000
-#define RADEON_UPLOAD_ZBIAS 0x00020000 /* version 1.2 and newer */
-#define RADEON_UPLOAD_ALL 0x003effff
-#define RADEON_UPLOAD_CONTEXT_ALL 0x003e01ff
-
-/* New style per-packet identifiers for use in cmd_buffer ioctl with
- * the RADEON_EMIT_PACKET command. Comments relate new packets to old
- * state bits and the packet size:
- */
-#define RADEON_EMIT_PP_MISC 0 /* context/7 */
-#define RADEON_EMIT_PP_CNTL 1 /* context/3 */
-#define RADEON_EMIT_RB3D_COLORPITCH 2 /* context/1 */
-#define RADEON_EMIT_RE_LINE_PATTERN 3 /* line/2 */
-#define RADEON_EMIT_SE_LINE_WIDTH 4 /* line/1 */
-#define RADEON_EMIT_PP_LUM_MATRIX 5 /* bumpmap/1 */
-#define RADEON_EMIT_PP_ROT_MATRIX_0 6 /* bumpmap/2 */
-#define RADEON_EMIT_RB3D_STENCILREFMASK 7 /* masks/3 */
-#define RADEON_EMIT_SE_VPORT_XSCALE 8 /* viewport/6 */
-#define RADEON_EMIT_SE_CNTL 9 /* setup/2 */
-#define RADEON_EMIT_SE_CNTL_STATUS 10 /* setup/1 */
-#define RADEON_EMIT_RE_MISC 11 /* misc/1 */
-#define RADEON_EMIT_PP_TXFILTER_0 12 /* tex0/6 */
-#define RADEON_EMIT_PP_BORDER_COLOR_0 13 /* tex0/1 */
-#define RADEON_EMIT_PP_TXFILTER_1 14 /* tex1/6 */
-#define RADEON_EMIT_PP_BORDER_COLOR_1 15 /* tex1/1 */
-#define RADEON_EMIT_PP_TXFILTER_2 16 /* tex2/6 */
-#define RADEON_EMIT_PP_BORDER_COLOR_2 17 /* tex2/1 */
-#define RADEON_EMIT_SE_ZBIAS_FACTOR 18 /* zbias/2 */
-#define RADEON_EMIT_SE_TCL_OUTPUT_VTX_FMT 19 /* tcl/11 */
-#define RADEON_EMIT_SE_TCL_MATERIAL_EMMISSIVE_RED 20 /* material/17 */
-#define R200_EMIT_PP_TXCBLEND_0 21 /* tex0/4 */
-#define R200_EMIT_PP_TXCBLEND_1 22 /* tex1/4 */
-#define R200_EMIT_PP_TXCBLEND_2 23 /* tex2/4 */
-#define R200_EMIT_PP_TXCBLEND_3 24 /* tex3/4 */
-#define R200_EMIT_PP_TXCBLEND_4 25 /* tex4/4 */
-#define R200_EMIT_PP_TXCBLEND_5 26 /* tex5/4 */
-#define R200_EMIT_PP_TXCBLEND_6 27 /* /4 */
-#define R200_EMIT_PP_TXCBLEND_7 28 /* /4 */
-#define R200_EMIT_TCL_LIGHT_MODEL_CTL_0 29 /* tcl/7 */
-#define R200_EMIT_TFACTOR_0 30 /* tf/7 */
-#define R200_EMIT_VTX_FMT_0 31 /* vtx/5 */
-#define R200_EMIT_VAP_CTL 32 /* vap/1 */
-#define R200_EMIT_MATRIX_SELECT_0 33 /* msl/5 */
-#define R200_EMIT_TEX_PROC_CTL_2 34 /* tcg/5 */
-#define R200_EMIT_TCL_UCP_VERT_BLEND_CTL 35 /* tcl/1 */
-#define R200_EMIT_PP_TXFILTER_0 36 /* tex0/6 */
-#define R200_EMIT_PP_TXFILTER_1 37 /* tex1/6 */
-#define R200_EMIT_PP_TXFILTER_2 38 /* tex2/6 */
-#define R200_EMIT_PP_TXFILTER_3 39 /* tex3/6 */
-#define R200_EMIT_PP_TXFILTER_4 40 /* tex4/6 */
-#define R200_EMIT_PP_TXFILTER_5 41 /* tex5/6 */
-#define R200_EMIT_PP_TXOFFSET_0 42 /* tex0/1 */
-#define R200_EMIT_PP_TXOFFSET_1 43 /* tex1/1 */
-#define R200_EMIT_PP_TXOFFSET_2 44 /* tex2/1 */
-#define R200_EMIT_PP_TXOFFSET_3 45 /* tex3/1 */
-#define R200_EMIT_PP_TXOFFSET_4 46 /* tex4/1 */
-#define R200_EMIT_PP_TXOFFSET_5 47 /* tex5/1 */
-#define R200_EMIT_VTE_CNTL 48 /* vte/1 */
-#define R200_EMIT_OUTPUT_VTX_COMP_SEL 49 /* vtx/1 */
-#define R200_EMIT_PP_TAM_DEBUG3 50 /* tam/1 */
-#define R200_EMIT_PP_CNTL_X 51 /* cst/1 */
-#define R200_EMIT_RB3D_DEPTHXY_OFFSET 52 /* cst/1 */
-#define R200_EMIT_RE_AUX_SCISSOR_CNTL 53 /* cst/1 */
-#define R200_EMIT_RE_SCISSOR_TL_0 54 /* cst/2 */
-#define R200_EMIT_RE_SCISSOR_TL_1 55 /* cst/2 */
-#define R200_EMIT_RE_SCISSOR_TL_2 56 /* cst/2 */
-#define R200_EMIT_SE_VAP_CNTL_STATUS 57 /* cst/1 */
-#define R200_EMIT_SE_VTX_STATE_CNTL 58 /* cst/1 */
-#define R200_EMIT_RE_POINTSIZE 59 /* cst/1 */
-#define R200_EMIT_TCL_INPUT_VTX_VECTOR_ADDR_0 60 /* cst/4 */
-#define R200_EMIT_PP_CUBIC_FACES_0 61
-#define R200_EMIT_PP_CUBIC_OFFSETS_0 62
-#define R200_EMIT_PP_CUBIC_FACES_1 63
-#define R200_EMIT_PP_CUBIC_OFFSETS_1 64
-#define R200_EMIT_PP_CUBIC_FACES_2 65
-#define R200_EMIT_PP_CUBIC_OFFSETS_2 66
-#define R200_EMIT_PP_CUBIC_FACES_3 67
-#define R200_EMIT_PP_CUBIC_OFFSETS_3 68
-#define R200_EMIT_PP_CUBIC_FACES_4 69
-#define R200_EMIT_PP_CUBIC_OFFSETS_4 70
-#define R200_EMIT_PP_CUBIC_FACES_5 71
-#define R200_EMIT_PP_CUBIC_OFFSETS_5 72
-#define RADEON_EMIT_PP_TEX_SIZE_0 73
-#define RADEON_EMIT_PP_TEX_SIZE_1 74
-#define RADEON_EMIT_PP_TEX_SIZE_2 75
-#define R200_EMIT_RB3D_BLENDCOLOR 76
-#define R200_EMIT_TCL_POINT_SPRITE_CNTL 77
-#define RADEON_EMIT_PP_CUBIC_FACES_0 78
-#define RADEON_EMIT_PP_CUBIC_OFFSETS_T0 79
-#define RADEON_EMIT_PP_CUBIC_FACES_1 80
-#define RADEON_EMIT_PP_CUBIC_OFFSETS_T1 81
-#define RADEON_EMIT_PP_CUBIC_FACES_2 82
-#define RADEON_EMIT_PP_CUBIC_OFFSETS_T2 83
-#define R200_EMIT_PP_TRI_PERF_CNTL 84
-#define R200_EMIT_PP_AFS_0 85
-#define R200_EMIT_PP_AFS_1 86
-#define R200_EMIT_ATF_TFACTOR 87
-#define R200_EMIT_PP_TXCTLALL_0 88
-#define R200_EMIT_PP_TXCTLALL_1 89
-#define R200_EMIT_PP_TXCTLALL_2 90
-#define R200_EMIT_PP_TXCTLALL_3 91
-#define R200_EMIT_PP_TXCTLALL_4 92
-#define R200_EMIT_PP_TXCTLALL_5 93
-#define R200_EMIT_VAP_PVS_CNTL 94
-#define RADEON_MAX_STATE_PACKETS 95
-
-/* Commands understood by cmd_buffer ioctl. More can be added but
- * obviously these can't be removed or changed:
- */
-#define RADEON_CMD_PACKET 1 /* emit one of the register packets above */
-#define RADEON_CMD_SCALARS 2 /* emit scalar data */
-#define RADEON_CMD_VECTORS 3 /* emit vector data */
-#define RADEON_CMD_DMA_DISCARD 4 /* discard current dma buf */
-#define RADEON_CMD_PACKET3 5 /* emit hw packet */
-#define RADEON_CMD_PACKET3_CLIP 6 /* emit hw packet wrapped in cliprects */
-#define RADEON_CMD_SCALARS2 7 /* r200 stopgap */
-#define RADEON_CMD_WAIT 8 /* emit hw wait commands -- note:
- * doesn't make the cpu wait, just
- * the graphics hardware */
-#define RADEON_CMD_VECLINEAR 9 /* another r200 stopgap */
-
-typedef union {
- int i;
- struct {
- unsigned char cmd_type, pad0, pad1, pad2;
- } header;
- struct {
- unsigned char cmd_type, packet_id, pad0, pad1;
- } packet;
- struct {
- unsigned char cmd_type, offset, stride, count;
- } scalars;
- struct {
- unsigned char cmd_type, offset, stride, count;
- } vectors;
- struct {
- unsigned char cmd_type, addr_lo, addr_hi, count;
- } veclinear;
- struct {
- unsigned char cmd_type, buf_idx, pad0, pad1;
- } dma;
- struct {
- unsigned char cmd_type, flags, pad0, pad1;
- } wait;
-} drm_radeon_cmd_header_t;
-
-#define RADEON_WAIT_2D 0x1
-#define RADEON_WAIT_3D 0x2
-
-/* Allowed parameters for R300_CMD_PACKET3
- */
-#define R300_CMD_PACKET3_CLEAR 0
-#define R300_CMD_PACKET3_RAW 1
-
-/* Commands understood by cmd_buffer ioctl for R300.
- * The interface has not been stabilized, so some of these may be removed
- * and eventually reordered before stabilization.
- */
-#define R300_CMD_PACKET0 1
-#define R300_CMD_VPU 2 /* emit vertex program upload */
-#define R300_CMD_PACKET3 3 /* emit a packet3 */
-#define R300_CMD_END3D 4 /* emit sequence ending 3d rendering */
-#define R300_CMD_CP_DELAY 5
-#define R300_CMD_DMA_DISCARD 6
-#define R300_CMD_WAIT 7
-# define R300_WAIT_2D 0x1
-# define R300_WAIT_3D 0x2
-/* these two defines are DOING IT WRONG - however
- * we have userspace which relies on using these.
- * The wait interface is backwards compat new
- * code should use the NEW_WAIT defines below
- * THESE ARE NOT BIT FIELDS
- */
-# define R300_WAIT_2D_CLEAN 0x3
-# define R300_WAIT_3D_CLEAN 0x4
-
-# define R300_NEW_WAIT_2D_3D 0x3
-# define R300_NEW_WAIT_2D_2D_CLEAN 0x4
-# define R300_NEW_WAIT_3D_3D_CLEAN 0x6
-# define R300_NEW_WAIT_2D_2D_CLEAN_3D_3D_CLEAN 0x8
-
-#define R300_CMD_SCRATCH 8
-#define R300_CMD_R500FP 9
-
-typedef union {
- unsigned int u;
- struct {
- unsigned char cmd_type, pad0, pad1, pad2;
- } header;
- struct {
- unsigned char cmd_type, count, reglo, reghi;
- } packet0;
- struct {
- unsigned char cmd_type, count, adrlo, adrhi;
- } vpu;
- struct {
- unsigned char cmd_type, packet, pad0, pad1;
- } packet3;
- struct {
- unsigned char cmd_type, packet;
- unsigned short count; /* amount of packet2 to emit */
- } delay;
- struct {
- unsigned char cmd_type, buf_idx, pad0, pad1;
- } dma;
- struct {
- unsigned char cmd_type, flags, pad0, pad1;
- } wait;
- struct {
- unsigned char cmd_type, reg, n_bufs, flags;
- } scratch;
- struct {
- unsigned char cmd_type, count, adrlo, adrhi_flags;
- } r500fp;
-} drm_r300_cmd_header_t;
-
-#define RADEON_FRONT 0x1
-#define RADEON_BACK 0x2
-#define RADEON_DEPTH 0x4
-#define RADEON_STENCIL 0x8
-#define RADEON_CLEAR_FASTZ 0x80000000
-#define RADEON_USE_HIERZ 0x40000000
-#define RADEON_USE_COMP_ZBUF 0x20000000
-
-#define R500FP_CONSTANT_TYPE (1 << 1)
-#define R500FP_CONSTANT_CLAMP (1 << 2)
-
-/* Primitive types
- */
-#define RADEON_POINTS 0x1
-#define RADEON_LINES 0x2
-#define RADEON_LINE_STRIP 0x3
-#define RADEON_TRIANGLES 0x4
-#define RADEON_TRIANGLE_FAN 0x5
-#define RADEON_TRIANGLE_STRIP 0x6
-
-/* Vertex/indirect buffer size
- */
-#define RADEON_BUFFER_SIZE 65536
-
-/* Byte offsets for indirect buffer data
- */
-#define RADEON_INDEX_PRIM_OFFSET 20
-
-#define RADEON_SCRATCH_REG_OFFSET 32
-
-#define R600_SCRATCH_REG_OFFSET 256
-
-#define RADEON_NR_SAREA_CLIPRECTS 12
-
-/* There are 2 heaps (local/GART). Each region within a heap is a
- * minimum of 64k, and there are at most 64 of them per heap.
- */
-#define RADEON_LOCAL_TEX_HEAP 0
-#define RADEON_GART_TEX_HEAP 1
-#define RADEON_NR_TEX_HEAPS 2
-#define RADEON_NR_TEX_REGIONS 64
-#define RADEON_LOG_TEX_GRANULARITY 16
-
-#define RADEON_MAX_TEXTURE_LEVELS 12
-#define RADEON_MAX_TEXTURE_UNITS 3
-
-#define RADEON_MAX_SURFACES 8
-
-/* Blits have strict offset rules. All blit offset must be aligned on
- * a 1K-byte boundary.
- */
-#define RADEON_OFFSET_SHIFT 10
-#define RADEON_OFFSET_ALIGN (1 << RADEON_OFFSET_SHIFT)
-#define RADEON_OFFSET_MASK (RADEON_OFFSET_ALIGN - 1)
-
-#endif /* __RADEON_SAREA_DEFINES__ */
-
-typedef struct {
- unsigned int red;
- unsigned int green;
- unsigned int blue;
- unsigned int alpha;
-} radeon_color_regs_t;
-
-typedef struct {
- /* Context state */
- unsigned int pp_misc; /* 0x1c14 */
- unsigned int pp_fog_color;
- unsigned int re_solid_color;
- unsigned int rb3d_blendcntl;
- unsigned int rb3d_depthoffset;
- unsigned int rb3d_depthpitch;
- unsigned int rb3d_zstencilcntl;
-
- unsigned int pp_cntl; /* 0x1c38 */
- unsigned int rb3d_cntl;
- unsigned int rb3d_coloroffset;
- unsigned int re_width_height;
- unsigned int rb3d_colorpitch;
- unsigned int se_cntl;
-
- /* Vertex format state */
- unsigned int se_coord_fmt; /* 0x1c50 */
-
- /* Line state */
- unsigned int re_line_pattern; /* 0x1cd0 */
- unsigned int re_line_state;
-
- unsigned int se_line_width; /* 0x1db8 */
-
- /* Bumpmap state */
- unsigned int pp_lum_matrix; /* 0x1d00 */
-
- unsigned int pp_rot_matrix_0; /* 0x1d58 */
- unsigned int pp_rot_matrix_1;
-
- /* Mask state */
- unsigned int rb3d_stencilrefmask; /* 0x1d7c */
- unsigned int rb3d_ropcntl;
- unsigned int rb3d_planemask;
-
- /* Viewport state */
- unsigned int se_vport_xscale; /* 0x1d98 */
- unsigned int se_vport_xoffset;
- unsigned int se_vport_yscale;
- unsigned int se_vport_yoffset;
- unsigned int se_vport_zscale;
- unsigned int se_vport_zoffset;
-
- /* Setup state */
- unsigned int se_cntl_status; /* 0x2140 */
-
- /* Misc state */
- unsigned int re_top_left; /* 0x26c0 */
- unsigned int re_misc;
-} drm_radeon_context_regs_t;
-
-typedef struct {
- /* Zbias state */
- unsigned int se_zbias_factor; /* 0x1dac */
- unsigned int se_zbias_constant;
-} drm_radeon_context2_regs_t;
-
-/* Setup registers for each texture unit
- */
-typedef struct {
- unsigned int pp_txfilter;
- unsigned int pp_txformat;
- unsigned int pp_txoffset;
- unsigned int pp_txcblend;
- unsigned int pp_txablend;
- unsigned int pp_tfactor;
- unsigned int pp_border_color;
-} drm_radeon_texture_regs_t;
-
-typedef struct {
- unsigned int start;
- unsigned int finish;
- unsigned int prim:8;
- unsigned int stateidx:8;
- unsigned int numverts:16; /* overloaded as offset/64 for elt prims */
- unsigned int vc_format; /* vertex format */
-} drm_radeon_prim_t;
-
-typedef struct {
- drm_radeon_context_regs_t context;
- drm_radeon_texture_regs_t tex[RADEON_MAX_TEXTURE_UNITS];
- drm_radeon_context2_regs_t context2;
- unsigned int dirty;
-} drm_radeon_state_t;
-
-typedef struct {
- /* The channel for communication of state information to the
- * kernel on firing a vertex buffer with either of the
- * obsoleted vertex/index ioctls.
- */
- drm_radeon_context_regs_t context_state;
- drm_radeon_texture_regs_t tex_state[RADEON_MAX_TEXTURE_UNITS];
- unsigned int dirty;
- unsigned int vertsize;
- unsigned int vc_format;
-
- /* The current cliprects, or a subset thereof.
- */
- struct drm_clip_rect boxes[RADEON_NR_SAREA_CLIPRECTS];
- unsigned int nbox;
-
- /* Counters for client-side throttling of rendering clients.
- */
- unsigned int last_frame;
- unsigned int last_dispatch;
- unsigned int last_clear;
-
- struct drm_tex_region tex_list[RADEON_NR_TEX_HEAPS][RADEON_NR_TEX_REGIONS +
- 1];
- unsigned int tex_age[RADEON_NR_TEX_HEAPS];
- int ctx_owner;
- int pfState; /* number of 3d windows (0,1,2ormore) */
- int pfCurrentPage; /* which buffer is being displayed? */
- int crtc2_base; /* CRTC2 frame offset */
- int tiling_enabled; /* set by drm, read by 2d + 3d clients */
-} drm_radeon_sarea_t;
-
-/* WARNING: If you change any of these defines, make sure to change the
- * defines in the Xserver file (xf86drmRadeon.h)
- *
- * KW: actually it's illegal to change any of this (backwards compatibility).
- */
-
-/* Radeon specific ioctls
- * The device specific ioctl range is 0x40 to 0x79.
- */
-#define DRM_RADEON_CP_INIT 0x00
-#define DRM_RADEON_CP_START 0x01
-#define DRM_RADEON_CP_STOP 0x02
-#define DRM_RADEON_CP_RESET 0x03
-#define DRM_RADEON_CP_IDLE 0x04
-#define DRM_RADEON_RESET 0x05
-#define DRM_RADEON_FULLSCREEN 0x06
-#define DRM_RADEON_SWAP 0x07
-#define DRM_RADEON_CLEAR 0x08
-#define DRM_RADEON_VERTEX 0x09
-#define DRM_RADEON_INDICES 0x0A
-#define DRM_RADEON_NOT_USED
-#define DRM_RADEON_STIPPLE 0x0C
-#define DRM_RADEON_INDIRECT 0x0D
-#define DRM_RADEON_TEXTURE 0x0E
-#define DRM_RADEON_VERTEX2 0x0F
-#define DRM_RADEON_CMDBUF 0x10
-#define DRM_RADEON_GETPARAM 0x11
-#define DRM_RADEON_FLIP 0x12
-#define DRM_RADEON_ALLOC 0x13
-#define DRM_RADEON_FREE 0x14
-#define DRM_RADEON_INIT_HEAP 0x15
-#define DRM_RADEON_IRQ_EMIT 0x16
-#define DRM_RADEON_IRQ_WAIT 0x17
-#define DRM_RADEON_CP_RESUME 0x18
-#define DRM_RADEON_SETPARAM 0x19
-#define DRM_RADEON_SURF_ALLOC 0x1a
-#define DRM_RADEON_SURF_FREE 0x1b
-/* KMS ioctl */
-#define DRM_RADEON_GEM_INFO 0x1c
-#define DRM_RADEON_GEM_CREATE 0x1d
-#define DRM_RADEON_GEM_MMAP 0x1e
-#define DRM_RADEON_GEM_PREAD 0x21
-#define DRM_RADEON_GEM_PWRITE 0x22
-#define DRM_RADEON_GEM_SET_DOMAIN 0x23
-#define DRM_RADEON_GEM_WAIT_IDLE 0x24
-#define DRM_RADEON_CS 0x26
-#define DRM_RADEON_INFO 0x27
-#define DRM_RADEON_GEM_SET_TILING 0x28
-#define DRM_RADEON_GEM_GET_TILING 0x29
-#define DRM_RADEON_GEM_BUSY 0x2a
-#define DRM_RADEON_GEM_VA 0x2b
-#define DRM_RADEON_GEM_OP 0x2c
-#define DRM_RADEON_GEM_USERPTR 0x2d
-
-#define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t)
-#define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START)
-#define DRM_IOCTL_RADEON_CP_STOP DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_STOP, drm_radeon_cp_stop_t)
-#define DRM_IOCTL_RADEON_CP_RESET DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_RESET)
-#define DRM_IOCTL_RADEON_CP_IDLE DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_IDLE)
-#define DRM_IOCTL_RADEON_RESET DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_RESET)
-#define DRM_IOCTL_RADEON_FULLSCREEN DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_FULLSCREEN, drm_radeon_fullscreen_t)
-#define DRM_IOCTL_RADEON_SWAP DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_SWAP)
-#define DRM_IOCTL_RADEON_CLEAR DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CLEAR, drm_radeon_clear_t)
-#define DRM_IOCTL_RADEON_VERTEX DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_VERTEX, drm_radeon_vertex_t)
-#define DRM_IOCTL_RADEON_INDICES DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_INDICES, drm_radeon_indices_t)
-#define DRM_IOCTL_RADEON_STIPPLE DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_STIPPLE, drm_radeon_stipple_t)
-#define DRM_IOCTL_RADEON_INDIRECT DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INDIRECT, drm_radeon_indirect_t)
-#define DRM_IOCTL_RADEON_TEXTURE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_TEXTURE, drm_radeon_texture_t)
-#define DRM_IOCTL_RADEON_VERTEX2 DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_VERTEX2, drm_radeon_vertex2_t)
-#define DRM_IOCTL_RADEON_CMDBUF DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CMDBUF, drm_radeon_cmd_buffer_t)
-#define DRM_IOCTL_RADEON_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GETPARAM, drm_radeon_getparam_t)
-#define DRM_IOCTL_RADEON_FLIP DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_FLIP)
-#define DRM_IOCTL_RADEON_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_ALLOC, drm_radeon_mem_alloc_t)
-#define DRM_IOCTL_RADEON_FREE DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_FREE, drm_radeon_mem_free_t)
-#define DRM_IOCTL_RADEON_INIT_HEAP DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_INIT_HEAP, drm_radeon_mem_init_heap_t)
-#define DRM_IOCTL_RADEON_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_IRQ_EMIT, drm_radeon_irq_emit_t)
-#define DRM_IOCTL_RADEON_IRQ_WAIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_IRQ_WAIT, drm_radeon_irq_wait_t)
-#define DRM_IOCTL_RADEON_CP_RESUME DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_RESUME)
-#define DRM_IOCTL_RADEON_SETPARAM DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_SETPARAM, drm_radeon_setparam_t)
-#define DRM_IOCTL_RADEON_SURF_ALLOC DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_SURF_ALLOC, drm_radeon_surface_alloc_t)
-#define DRM_IOCTL_RADEON_SURF_FREE DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_SURF_FREE, drm_radeon_surface_free_t)
-/* KMS */
-#define DRM_IOCTL_RADEON_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_INFO, struct drm_radeon_gem_info)
-#define DRM_IOCTL_RADEON_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_CREATE, struct drm_radeon_gem_create)
-#define DRM_IOCTL_RADEON_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_MMAP, struct drm_radeon_gem_mmap)
-#define DRM_IOCTL_RADEON_GEM_PREAD DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PREAD, struct drm_radeon_gem_pread)
-#define DRM_IOCTL_RADEON_GEM_PWRITE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PWRITE, struct drm_radeon_gem_pwrite)
-#define DRM_IOCTL_RADEON_GEM_SET_DOMAIN DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_DOMAIN, struct drm_radeon_gem_set_domain)
-#define DRM_IOCTL_RADEON_GEM_WAIT_IDLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, struct drm_radeon_gem_wait_idle)
-#define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs)
-#define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info)
-#define DRM_IOCTL_RADEON_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling)
-#define DRM_IOCTL_RADEON_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling)
-#define DRM_IOCTL_RADEON_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_BUSY, struct drm_radeon_gem_busy)
-#define DRM_IOCTL_RADEON_GEM_VA DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_VA, struct drm_radeon_gem_va)
-#define DRM_IOCTL_RADEON_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_OP, struct drm_radeon_gem_op)
-#define DRM_IOCTL_RADEON_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_USERPTR, struct drm_radeon_gem_userptr)
-
-typedef struct drm_radeon_init {
- enum {
- RADEON_INIT_CP = 0x01,
- RADEON_CLEANUP_CP = 0x02,
- RADEON_INIT_R200_CP = 0x03,
- RADEON_INIT_R300_CP = 0x04,
- RADEON_INIT_R600_CP = 0x05
- } func;
- unsigned long sarea_priv_offset;
- int is_pci;
- int cp_mode;
- int gart_size;
- int ring_size;
- int usec_timeout;
-
- unsigned int fb_bpp;
- unsigned int front_offset, front_pitch;
- unsigned int back_offset, back_pitch;
- unsigned int depth_bpp;
- unsigned int depth_offset, depth_pitch;
-
- unsigned long fb_offset;
- unsigned long mmio_offset;
- unsigned long ring_offset;
- unsigned long ring_rptr_offset;
- unsigned long buffers_offset;
- unsigned long gart_textures_offset;
-} drm_radeon_init_t;
-
-typedef struct drm_radeon_cp_stop {
- int flush;
- int idle;
-} drm_radeon_cp_stop_t;
-
-typedef struct drm_radeon_fullscreen {
- enum {
- RADEON_INIT_FULLSCREEN = 0x01,
- RADEON_CLEANUP_FULLSCREEN = 0x02
- } func;
-} drm_radeon_fullscreen_t;
-
-#define CLEAR_X1 0
-#define CLEAR_Y1 1
-#define CLEAR_X2 2
-#define CLEAR_Y2 3
-#define CLEAR_DEPTH 4
-
-typedef union drm_radeon_clear_rect {
- float f[5];
- unsigned int ui[5];
-} drm_radeon_clear_rect_t;
-
-typedef struct drm_radeon_clear {
- unsigned int flags;
- unsigned int clear_color;
- unsigned int clear_depth;
- unsigned int color_mask;
- unsigned int depth_mask; /* misnamed field: should be stencil */
- drm_radeon_clear_rect_t *depth_boxes;
-} drm_radeon_clear_t;
-
-typedef struct drm_radeon_vertex {
- int prim;
- int idx; /* Index of vertex buffer */
- int count; /* Number of vertices in buffer */
- int discard; /* Client finished with buffer? */
-} drm_radeon_vertex_t;
-
-typedef struct drm_radeon_indices {
- int prim;
- int idx;
- int start;
- int end;
- int discard; /* Client finished with buffer? */
-} drm_radeon_indices_t;
-
-/* v1.2 - obsoletes drm_radeon_vertex and drm_radeon_indices
- * - allows multiple primitives and state changes in a single ioctl
- * - supports driver change to emit native primitives
- */
-typedef struct drm_radeon_vertex2 {
- int idx; /* Index of vertex buffer */
- int discard; /* Client finished with buffer? */
- int nr_states;
- drm_radeon_state_t *state;
- int nr_prims;
- drm_radeon_prim_t *prim;
-} drm_radeon_vertex2_t;
-
-/* v1.3 - obsoletes drm_radeon_vertex2
- * - allows arbitrarily large cliprect list
- * - allows updating of tcl packet, vector and scalar state
- * - allows memory-efficient description of state updates
- * - allows state to be emitted without a primitive
- * (for clears, ctx switches)
- * - allows more than one dma buffer to be referenced per ioctl
- * - supports tcl driver
- * - may be extended in future versions with new cmd types, packets
- */
-typedef struct drm_radeon_cmd_buffer {
- int bufsz;
- char *buf;
- int nbox;
- struct drm_clip_rect *boxes;
-} drm_radeon_cmd_buffer_t;
-
-typedef struct drm_radeon_tex_image {
- unsigned int x, y; /* Blit coordinates */
- unsigned int width, height;
- const void *data;
-} drm_radeon_tex_image_t;
-
-typedef struct drm_radeon_texture {
- unsigned int offset;
- int pitch;
- int format;
- int width; /* Texture image coordinates */
- int height;
- drm_radeon_tex_image_t *image;
-} drm_radeon_texture_t;
-
-typedef struct drm_radeon_stipple {
- unsigned int *mask;
-} drm_radeon_stipple_t;
-
-typedef struct drm_radeon_indirect {
- int idx;
- int start;
- int end;
- int discard;
-} drm_radeon_indirect_t;
-
-/* enum for card type parameters */
-#define RADEON_CARD_PCI 0
-#define RADEON_CARD_AGP 1
-#define RADEON_CARD_PCIE 2
-
-/* 1.3: An ioctl to get parameters that aren't available to the 3d
- * client any other way.
- */
-#define RADEON_PARAM_GART_BUFFER_OFFSET 1 /* card offset of 1st GART buffer */
-#define RADEON_PARAM_LAST_FRAME 2
-#define RADEON_PARAM_LAST_DISPATCH 3
-#define RADEON_PARAM_LAST_CLEAR 4
-/* Added with DRM version 1.6. */
-#define RADEON_PARAM_IRQ_NR 5
-#define RADEON_PARAM_GART_BASE 6 /* card offset of GART base */
-/* Added with DRM version 1.8. */
-#define RADEON_PARAM_REGISTER_HANDLE 7 /* for drmMap() */
-#define RADEON_PARAM_STATUS_HANDLE 8
-#define RADEON_PARAM_SAREA_HANDLE 9
-#define RADEON_PARAM_GART_TEX_HANDLE 10
-#define RADEON_PARAM_SCRATCH_OFFSET 11
-#define RADEON_PARAM_CARD_TYPE 12
-#define RADEON_PARAM_VBLANK_CRTC 13 /* VBLANK CRTC */
-#define RADEON_PARAM_FB_LOCATION 14 /* FB location */
-#define RADEON_PARAM_NUM_GB_PIPES 15 /* num GB pipes */
-#define RADEON_PARAM_DEVICE_ID 16
-#define RADEON_PARAM_NUM_Z_PIPES 17 /* num Z pipes */
-
-typedef struct drm_radeon_getparam {
- int param;
- void *value;
-} drm_radeon_getparam_t;
-
-/* 1.6: Set up a memory manager for regions of shared memory:
- */
-#define RADEON_MEM_REGION_GART 1
-#define RADEON_MEM_REGION_FB 2
-
-typedef struct drm_radeon_mem_alloc {
- int region;
- int alignment;
- int size;
- int *region_offset; /* offset from start of fb or GART */
-} drm_radeon_mem_alloc_t;
-
-typedef struct drm_radeon_mem_free {
- int region;
- int region_offset;
-} drm_radeon_mem_free_t;
-
-typedef struct drm_radeon_mem_init_heap {
- int region;
- int size;
- int start;
-} drm_radeon_mem_init_heap_t;
-
-/* 1.6: Userspace can request & wait on irq's:
- */
-typedef struct drm_radeon_irq_emit {
- int *irq_seq;
-} drm_radeon_irq_emit_t;
-
-typedef struct drm_radeon_irq_wait {
- int irq_seq;
-} drm_radeon_irq_wait_t;
-
-/* 1.10: Clients tell the DRM where they think the framebuffer is located in
- * the card's address space, via a new generic ioctl to set parameters
- */
-
-typedef struct drm_radeon_setparam {
- unsigned int param;
- __s64 value;
-} drm_radeon_setparam_t;
-
-#define RADEON_SETPARAM_FB_LOCATION 1 /* determined framebuffer location */
-#define RADEON_SETPARAM_SWITCH_TILING 2 /* enable/disable color tiling */
-#define RADEON_SETPARAM_PCIGART_LOCATION 3 /* PCI Gart Location */
-#define RADEON_SETPARAM_NEW_MEMMAP 4 /* Use new memory map */
-#define RADEON_SETPARAM_PCIGART_TABLE_SIZE 5 /* PCI GART Table Size */
-#define RADEON_SETPARAM_VBLANK_CRTC 6 /* VBLANK CRTC */
-/* 1.14: Clients can allocate/free a surface
- */
-typedef struct drm_radeon_surface_alloc {
- unsigned int address;
- unsigned int size;
- unsigned int flags;
-} drm_radeon_surface_alloc_t;
-
-typedef struct drm_radeon_surface_free {
- unsigned int address;
-} drm_radeon_surface_free_t;
-
-#define DRM_RADEON_VBLANK_CRTC1 1
-#define DRM_RADEON_VBLANK_CRTC2 2
-
-/*
- * Kernel modesetting world below.
- */
-#define RADEON_GEM_DOMAIN_CPU 0x1
-#define RADEON_GEM_DOMAIN_GTT 0x2
-#define RADEON_GEM_DOMAIN_VRAM 0x4
-
-struct drm_radeon_gem_info {
- __u64 gart_size;
- __u64 vram_size;
- __u64 vram_visible;
-};
-
-#define RADEON_GEM_NO_BACKING_STORE (1 << 0)
-#define RADEON_GEM_GTT_UC (1 << 1)
-#define RADEON_GEM_GTT_WC (1 << 2)
-/* BO is expected to be accessed by the CPU */
-#define RADEON_GEM_CPU_ACCESS (1 << 3)
-/* CPU access is not expected to work for this BO */
-#define RADEON_GEM_NO_CPU_ACCESS (1 << 4)
-
-struct drm_radeon_gem_create {
- __u64 size;
- __u64 alignment;
- __u32 handle;
- __u32 initial_domain;
- __u32 flags;
-};
-
-/*
- * This is not a reliable API and you should expect it to fail for any
- * number of reasons and have fallback path that do not use userptr to
- * perform any operation.
- */
-#define RADEON_GEM_USERPTR_READONLY (1 << 0)
-#define RADEON_GEM_USERPTR_ANONONLY (1 << 1)
-#define RADEON_GEM_USERPTR_VALIDATE (1 << 2)
-#define RADEON_GEM_USERPTR_REGISTER (1 << 3)
-
-struct drm_radeon_gem_userptr {
- __u64 addr;
- __u64 size;
- __u32 flags;
- __u32 handle;
-};
-
-#define RADEON_TILING_MACRO 0x1
-#define RADEON_TILING_MICRO 0x2
-#define RADEON_TILING_SWAP_16BIT 0x4
-#define RADEON_TILING_SWAP_32BIT 0x8
-/* this object requires a surface when mapped - i.e. front buffer */
-#define RADEON_TILING_SURFACE 0x10
-#define RADEON_TILING_MICRO_SQUARE 0x20
-#define RADEON_TILING_EG_BANKW_SHIFT 8
-#define RADEON_TILING_EG_BANKW_MASK 0xf
-#define RADEON_TILING_EG_BANKH_SHIFT 12
-#define RADEON_TILING_EG_BANKH_MASK 0xf
-#define RADEON_TILING_EG_MACRO_TILE_ASPECT_SHIFT 16
-#define RADEON_TILING_EG_MACRO_TILE_ASPECT_MASK 0xf
-#define RADEON_TILING_EG_TILE_SPLIT_SHIFT 24
-#define RADEON_TILING_EG_TILE_SPLIT_MASK 0xf
-#define RADEON_TILING_EG_STENCIL_TILE_SPLIT_SHIFT 28
-#define RADEON_TILING_EG_STENCIL_TILE_SPLIT_MASK 0xf
-
-struct drm_radeon_gem_set_tiling {
- __u32 handle;
- __u32 tiling_flags;
- __u32 pitch;
-};
-
-struct drm_radeon_gem_get_tiling {
- __u32 handle;
- __u32 tiling_flags;
- __u32 pitch;
-};
-
-struct drm_radeon_gem_mmap {
- __u32 handle;
- __u32 pad;
- __u64 offset;
- __u64 size;
- __u64 addr_ptr;
-};
-
-struct drm_radeon_gem_set_domain {
- __u32 handle;
- __u32 read_domains;
- __u32 write_domain;
-};
-
-struct drm_radeon_gem_wait_idle {
- __u32 handle;
- __u32 pad;
-};
-
-struct drm_radeon_gem_busy {
- __u32 handle;
- __u32 domain;
-};
-
-struct drm_radeon_gem_pread {
- /** Handle for the object being read. */
- __u32 handle;
- __u32 pad;
- /** Offset into the object to read from */
- __u64 offset;
- /** Length of data to read */
- __u64 size;
- /** Pointer to write the data into. */
- /* void *, but pointers are not 32/64 compatible */
- __u64 data_ptr;
-};
-
-struct drm_radeon_gem_pwrite {
- /** Handle for the object being written to. */
- __u32 handle;
- __u32 pad;
- /** Offset into the object to write to */
- __u64 offset;
- /** Length of data to write */
- __u64 size;
- /** Pointer to read the data from. */
- /* void *, but pointers are not 32/64 compatible */
- __u64 data_ptr;
-};
-
-/* Sets or returns a value associated with a buffer. */
-struct drm_radeon_gem_op {
- __u32 handle; /* buffer */
- __u32 op; /* RADEON_GEM_OP_* */
- __u64 value; /* input or return value */
-};
-
-#define RADEON_GEM_OP_GET_INITIAL_DOMAIN 0
-#define RADEON_GEM_OP_SET_INITIAL_DOMAIN 1
-
-#define RADEON_VA_MAP 1
-#define RADEON_VA_UNMAP 2
-
-#define RADEON_VA_RESULT_OK 0
-#define RADEON_VA_RESULT_ERROR 1
-#define RADEON_VA_RESULT_VA_EXIST 2
-
-#define RADEON_VM_PAGE_VALID (1 << 0)
-#define RADEON_VM_PAGE_READABLE (1 << 1)
-#define RADEON_VM_PAGE_WRITEABLE (1 << 2)
-#define RADEON_VM_PAGE_SYSTEM (1 << 3)
-#define RADEON_VM_PAGE_SNOOPED (1 << 4)
-
-struct drm_radeon_gem_va {
- __u32 handle;
- __u32 operation;
- __u32 vm_id;
- __u32 flags;
- __u64 offset;
-};
-
-#define RADEON_CHUNK_ID_RELOCS 0x01
-#define RADEON_CHUNK_ID_IB 0x02
-#define RADEON_CHUNK_ID_FLAGS 0x03
-#define RADEON_CHUNK_ID_CONST_IB 0x04
-
-/* The first dword of RADEON_CHUNK_ID_FLAGS is a uint32 of these flags: */
-#define RADEON_CS_KEEP_TILING_FLAGS 0x01
-#define RADEON_CS_USE_VM 0x02
-#define RADEON_CS_END_OF_FRAME 0x04 /* a hint from userspace which CS is the last one */
-/* The second dword of RADEON_CHUNK_ID_FLAGS is a uint32 that sets the ring type */
-#define RADEON_CS_RING_GFX 0
-#define RADEON_CS_RING_COMPUTE 1
-#define RADEON_CS_RING_DMA 2
-#define RADEON_CS_RING_UVD 3
-#define RADEON_CS_RING_VCE 4
-/* The third dword of RADEON_CHUNK_ID_FLAGS is a sint32 that sets the priority */
-/* 0 = normal, + = higher priority, - = lower priority */
-
-struct drm_radeon_cs_chunk {
- __u32 chunk_id;
- __u32 length_dw;
- __u64 chunk_data;
-};
-
-/* drm_radeon_cs_reloc.flags */
-#define RADEON_RELOC_PRIO_MASK (0xf << 0)
-
-struct drm_radeon_cs_reloc {
- __u32 handle;
- __u32 read_domains;
- __u32 write_domain;
- __u32 flags;
-};
-
-struct drm_radeon_cs {
- __u32 num_chunks;
- __u32 cs_id;
- /* this points to __u64 * which point to cs chunks */
- __u64 chunks;
- /* updates to the limits after this CS ioctl */
- __u64 gart_limit;
- __u64 vram_limit;
-};
-
-#define RADEON_INFO_DEVICE_ID 0x00
-#define RADEON_INFO_NUM_GB_PIPES 0x01
-#define RADEON_INFO_NUM_Z_PIPES 0x02
-#define RADEON_INFO_ACCEL_WORKING 0x03
-#define RADEON_INFO_CRTC_FROM_ID 0x04
-#define RADEON_INFO_ACCEL_WORKING2 0x05
-#define RADEON_INFO_TILING_CONFIG 0x06
-#define RADEON_INFO_WANT_HYPERZ 0x07
-#define RADEON_INFO_WANT_CMASK 0x08 /* get access to CMASK on r300 */
-#define RADEON_INFO_CLOCK_CRYSTAL_FREQ 0x09 /* clock crystal frequency */
-#define RADEON_INFO_NUM_BACKENDS 0x0a /* DB/backends for r600+ - need for OQ */
-#define RADEON_INFO_NUM_TILE_PIPES 0x0b /* tile pipes for r600+ */
-#define RADEON_INFO_FUSION_GART_WORKING 0x0c /* fusion writes to GTT were broken before this */
-#define RADEON_INFO_BACKEND_MAP 0x0d /* pipe to backend map, needed by mesa */
-/* virtual address start, va < start are reserved by the kernel */
-#define RADEON_INFO_VA_START 0x0e
-/* maximum size of ib using the virtual memory cs */
-#define RADEON_INFO_IB_VM_MAX_SIZE 0x0f
-/* max pipes - needed for compute shaders */
-#define RADEON_INFO_MAX_PIPES 0x10
-/* timestamp for GL_ARB_timer_query (OpenGL), returns the current GPU clock */
-#define RADEON_INFO_TIMESTAMP 0x11
-/* max shader engines (SE) - needed for geometry shaders, etc. */
-#define RADEON_INFO_MAX_SE 0x12
-/* max SH per SE */
-#define RADEON_INFO_MAX_SH_PER_SE 0x13
-/* fast fb access is enabled */
-#define RADEON_INFO_FASTFB_WORKING 0x14
-/* query if a RADEON_CS_RING_* submission is supported */
-#define RADEON_INFO_RING_WORKING 0x15
-/* SI tile mode array */
-#define RADEON_INFO_SI_TILE_MODE_ARRAY 0x16
-/* query if CP DMA is supported on the compute ring */
-#define RADEON_INFO_SI_CP_DMA_COMPUTE 0x17
-/* CIK macrotile mode array */
-#define RADEON_INFO_CIK_MACROTILE_MODE_ARRAY 0x18
-/* query the number of render backends */
-#define RADEON_INFO_SI_BACKEND_ENABLED_MASK 0x19
-/* max engine clock - needed for OpenCL */
-#define RADEON_INFO_MAX_SCLK 0x1a
-/* version of VCE firmware */
-#define RADEON_INFO_VCE_FW_VERSION 0x1b
-/* version of VCE feedback */
-#define RADEON_INFO_VCE_FB_VERSION 0x1c
-#define RADEON_INFO_NUM_BYTES_MOVED 0x1d
-#define RADEON_INFO_VRAM_USAGE 0x1e
-#define RADEON_INFO_GTT_USAGE 0x1f
-#define RADEON_INFO_ACTIVE_CU_COUNT 0x20
-#define RADEON_INFO_CURRENT_GPU_TEMP 0x21
-#define RADEON_INFO_CURRENT_GPU_SCLK 0x22
-#define RADEON_INFO_CURRENT_GPU_MCLK 0x23
-#define RADEON_INFO_READ_REG 0x24
-#define RADEON_INFO_VA_UNMAP_WORKING 0x25
-#define RADEON_INFO_GPU_RESET_COUNTER 0x26
-
-struct drm_radeon_info {
- __u32 request;
- __u32 pad;
- __u64 value;
-};
-
-/* Those correspond to the tile index to use, this is to explicitly state
- * the API that is implicitly defined by the tile mode array.
- */
-#define SI_TILE_MODE_COLOR_LINEAR_ALIGNED 8
-#define SI_TILE_MODE_COLOR_1D 13
-#define SI_TILE_MODE_COLOR_1D_SCANOUT 9
-#define SI_TILE_MODE_COLOR_2D_8BPP 14
-#define SI_TILE_MODE_COLOR_2D_16BPP 15
-#define SI_TILE_MODE_COLOR_2D_32BPP 16
-#define SI_TILE_MODE_COLOR_2D_64BPP 17
-#define SI_TILE_MODE_COLOR_2D_SCANOUT_16BPP 11
-#define SI_TILE_MODE_COLOR_2D_SCANOUT_32BPP 12
-#define SI_TILE_MODE_DEPTH_STENCIL_1D 4
-#define SI_TILE_MODE_DEPTH_STENCIL_2D 0
-#define SI_TILE_MODE_DEPTH_STENCIL_2D_2AA 3
-#define SI_TILE_MODE_DEPTH_STENCIL_2D_4AA 3
-#define SI_TILE_MODE_DEPTH_STENCIL_2D_8AA 2
-
-#define CIK_TILE_MODE_DEPTH_STENCIL_1D 5
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/savage_drm.h b/lib/libc/include/generic-musl/drm/savage_drm.h
deleted file mode 100644
index 15c3b679d50815ae25022ea68006ac17adfee053..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/savage_drm.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/* savage_drm.h -- Public header for the savage driver
- *
- * Copyright 2004 Felix Kuehling
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sub license,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT. IN NO EVENT SHALL FELIX KUEHLING BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef __SAVAGE_DRM_H__
-#define __SAVAGE_DRM_H__
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#ifndef __SAVAGE_SAREA_DEFINES__
-#define __SAVAGE_SAREA_DEFINES__
-
-/* 2 heaps (1 for card, 1 for agp), each divided into up to 128
- * regions, subject to a minimum region size of (1<<16) == 64k.
- *
- * Clients may subdivide regions internally, but when sharing between
- * clients, the region size is the minimum granularity.
- */
-
-#define SAVAGE_CARD_HEAP 0
-#define SAVAGE_AGP_HEAP 1
-#define SAVAGE_NR_TEX_HEAPS 2
-#define SAVAGE_NR_TEX_REGIONS 16
-#define SAVAGE_LOG_MIN_TEX_REGION_SIZE 16
-
-#endif /* __SAVAGE_SAREA_DEFINES__ */
-
-typedef struct _drm_savage_sarea {
- /* LRU lists for texture memory in agp space and on the card.
- */
- struct drm_tex_region texList[SAVAGE_NR_TEX_HEAPS][SAVAGE_NR_TEX_REGIONS +
- 1];
- unsigned int texAge[SAVAGE_NR_TEX_HEAPS];
-
- /* Mechanism to validate card state.
- */
- int ctxOwner;
-} drm_savage_sarea_t, *drm_savage_sarea_ptr;
-
-/* Savage-specific ioctls
- */
-#define DRM_SAVAGE_BCI_INIT 0x00
-#define DRM_SAVAGE_BCI_CMDBUF 0x01
-#define DRM_SAVAGE_BCI_EVENT_EMIT 0x02
-#define DRM_SAVAGE_BCI_EVENT_WAIT 0x03
-
-#define DRM_IOCTL_SAVAGE_BCI_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_SAVAGE_BCI_INIT, drm_savage_init_t)
-#define DRM_IOCTL_SAVAGE_BCI_CMDBUF DRM_IOW( DRM_COMMAND_BASE + DRM_SAVAGE_BCI_CMDBUF, drm_savage_cmdbuf_t)
-#define DRM_IOCTL_SAVAGE_BCI_EVENT_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_EMIT, drm_savage_event_emit_t)
-#define DRM_IOCTL_SAVAGE_BCI_EVENT_WAIT DRM_IOW( DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_WAIT, drm_savage_event_wait_t)
-
-#define SAVAGE_DMA_PCI 1
-#define SAVAGE_DMA_AGP 3
-typedef struct drm_savage_init {
- enum {
- SAVAGE_INIT_BCI = 1,
- SAVAGE_CLEANUP_BCI = 2
- } func;
- unsigned int sarea_priv_offset;
-
- /* some parameters */
- unsigned int cob_size;
- unsigned int bci_threshold_lo, bci_threshold_hi;
- unsigned int dma_type;
-
- /* frame buffer layout */
- unsigned int fb_bpp;
- unsigned int front_offset, front_pitch;
- unsigned int back_offset, back_pitch;
- unsigned int depth_bpp;
- unsigned int depth_offset, depth_pitch;
-
- /* local textures */
- unsigned int texture_offset;
- unsigned int texture_size;
-
- /* physical locations of non-permanent maps */
- unsigned long status_offset;
- unsigned long buffers_offset;
- unsigned long agp_textures_offset;
- unsigned long cmd_dma_offset;
-} drm_savage_init_t;
-
-typedef union drm_savage_cmd_header drm_savage_cmd_header_t;
-typedef struct drm_savage_cmdbuf {
- /* command buffer in client's address space */
- drm_savage_cmd_header_t *cmd_addr;
- unsigned int size; /* size of the command buffer in 64bit units */
-
- unsigned int dma_idx; /* DMA buffer index to use */
- int discard; /* discard DMA buffer when done */
- /* vertex buffer in client's address space */
- unsigned int *vb_addr;
- unsigned int vb_size; /* size of client vertex buffer in bytes */
- unsigned int vb_stride; /* stride of vertices in 32bit words */
- /* boxes in client's address space */
- struct drm_clip_rect *box_addr;
- unsigned int nbox; /* number of clipping boxes */
-} drm_savage_cmdbuf_t;
-
-#define SAVAGE_WAIT_2D 0x1 /* wait for 2D idle before updating event tag */
-#define SAVAGE_WAIT_3D 0x2 /* wait for 3D idle before updating event tag */
-#define SAVAGE_WAIT_IRQ 0x4 /* emit or wait for IRQ, not implemented yet */
-typedef struct drm_savage_event {
- unsigned int count;
- unsigned int flags;
-} drm_savage_event_emit_t, drm_savage_event_wait_t;
-
-/* Commands for the cmdbuf ioctl
- */
-#define SAVAGE_CMD_STATE 0 /* a range of state registers */
-#define SAVAGE_CMD_DMA_PRIM 1 /* vertices from DMA buffer */
-#define SAVAGE_CMD_VB_PRIM 2 /* vertices from client vertex buffer */
-#define SAVAGE_CMD_DMA_IDX 3 /* indexed vertices from DMA buffer */
-#define SAVAGE_CMD_VB_IDX 4 /* indexed vertices client vertex buffer */
-#define SAVAGE_CMD_CLEAR 5 /* clear buffers */
-#define SAVAGE_CMD_SWAP 6 /* swap buffers */
-
-/* Primitive types
-*/
-#define SAVAGE_PRIM_TRILIST 0 /* triangle list */
-#define SAVAGE_PRIM_TRISTRIP 1 /* triangle strip */
-#define SAVAGE_PRIM_TRIFAN 2 /* triangle fan */
-#define SAVAGE_PRIM_TRILIST_201 3 /* reorder verts for correct flat
- * shading on s3d */
-
-/* Skip flags (vertex format)
- */
-#define SAVAGE_SKIP_Z 0x01
-#define SAVAGE_SKIP_W 0x02
-#define SAVAGE_SKIP_C0 0x04
-#define SAVAGE_SKIP_C1 0x08
-#define SAVAGE_SKIP_S0 0x10
-#define SAVAGE_SKIP_T0 0x20
-#define SAVAGE_SKIP_ST0 0x30
-#define SAVAGE_SKIP_S1 0x40
-#define SAVAGE_SKIP_T1 0x80
-#define SAVAGE_SKIP_ST1 0xc0
-#define SAVAGE_SKIP_ALL_S3D 0x3f
-#define SAVAGE_SKIP_ALL_S4 0xff
-
-/* Buffer names for clear command
- */
-#define SAVAGE_FRONT 0x1
-#define SAVAGE_BACK 0x2
-#define SAVAGE_DEPTH 0x4
-
-/* 64-bit command header
- */
-union drm_savage_cmd_header {
- struct {
- unsigned char cmd; /* command */
- unsigned char pad0;
- unsigned short pad1;
- unsigned short pad2;
- unsigned short pad3;
- } cmd; /* generic */
- struct {
- unsigned char cmd;
- unsigned char global; /* need idle engine? */
- unsigned short count; /* number of consecutive registers */
- unsigned short start; /* first register */
- unsigned short pad3;
- } state; /* SAVAGE_CMD_STATE */
- struct {
- unsigned char cmd;
- unsigned char prim; /* primitive type */
- unsigned short skip; /* vertex format (skip flags) */
- unsigned short count; /* number of vertices */
- unsigned short start; /* first vertex in DMA/vertex buffer */
- } prim; /* SAVAGE_CMD_DMA_PRIM, SAVAGE_CMD_VB_PRIM */
- struct {
- unsigned char cmd;
- unsigned char prim;
- unsigned short skip;
- unsigned short count; /* number of indices that follow */
- unsigned short pad3;
- } idx; /* SAVAGE_CMD_DMA_IDX, SAVAGE_CMD_VB_IDX */
- struct {
- unsigned char cmd;
- unsigned char pad0;
- unsigned short pad1;
- unsigned int flags;
- } clear0; /* SAVAGE_CMD_CLEAR */
- struct {
- unsigned int mask;
- unsigned int value;
- } clear1; /* SAVAGE_CMD_CLEAR data */
-};
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/sis_drm.h b/lib/libc/include/generic-musl/drm/sis_drm.h
deleted file mode 100644
index 7c62b0672dee717beb4a070978d183b1cd40c346..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/sis_drm.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* sis_drv.h -- Private header for sis driver -*- linux-c -*- */
-/*
- * Copyright 2005 Eric Anholt
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-#ifndef __SIS_DRM_H__
-#define __SIS_DRM_H__
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* SiS specific ioctls */
-#define NOT_USED_0_3
-#define DRM_SIS_FB_ALLOC 0x04
-#define DRM_SIS_FB_FREE 0x05
-#define NOT_USED_6_12
-#define DRM_SIS_AGP_INIT 0x13
-#define DRM_SIS_AGP_ALLOC 0x14
-#define DRM_SIS_AGP_FREE 0x15
-#define DRM_SIS_FB_INIT 0x16
-
-#define DRM_IOCTL_SIS_FB_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_FB_ALLOC, drm_sis_mem_t)
-#define DRM_IOCTL_SIS_FB_FREE DRM_IOW( DRM_COMMAND_BASE + DRM_SIS_FB_FREE, drm_sis_mem_t)
-#define DRM_IOCTL_SIS_AGP_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_AGP_INIT, drm_sis_agp_t)
-#define DRM_IOCTL_SIS_AGP_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_AGP_ALLOC, drm_sis_mem_t)
-#define DRM_IOCTL_SIS_AGP_FREE DRM_IOW( DRM_COMMAND_BASE + DRM_SIS_AGP_FREE, drm_sis_mem_t)
-#define DRM_IOCTL_SIS_FB_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_SIS_FB_INIT, drm_sis_fb_t)
-/*
-#define DRM_IOCTL_SIS_FLIP DRM_IOW( 0x48, drm_sis_flip_t)
-#define DRM_IOCTL_SIS_FLIP_INIT DRM_IO( 0x49)
-#define DRM_IOCTL_SIS_FLIP_FINAL DRM_IO( 0x50)
-*/
-
-typedef struct {
- int context;
- unsigned long offset;
- unsigned long size;
- unsigned long free;
-} drm_sis_mem_t;
-
-typedef struct {
- unsigned long offset, size;
-} drm_sis_agp_t;
-
-typedef struct {
- unsigned long offset, size;
-} drm_sis_fb_t;
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* __SIS_DRM_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/tegra_drm.h b/lib/libc/include/generic-musl/drm/tegra_drm.h
deleted file mode 100644
index a89eef948b3d618bc8e9c55641fb0931002a0d65..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/tegra_drm.h
+++ /dev/null
@@ -1,681 +0,0 @@
-/*
- * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _TEGRA_DRM_H_
-#define _TEGRA_DRM_H_
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#define DRM_TEGRA_GEM_CREATE_TILED (1 << 0)
-#define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1)
-
-/**
- * struct drm_tegra_gem_create - parameters for the GEM object creation IOCTL
- */
-struct drm_tegra_gem_create {
- /**
- * @size:
- *
- * The size, in bytes, of the buffer object to be created.
- */
- __u64 size;
-
- /**
- * @flags:
- *
- * A bitmask of flags that influence the creation of GEM objects:
- *
- * DRM_TEGRA_GEM_CREATE_TILED
- * Use the 16x16 tiling format for this buffer.
- *
- * DRM_TEGRA_GEM_CREATE_BOTTOM_UP
- * The buffer has a bottom-up layout.
- */
- __u32 flags;
-
- /**
- * @handle:
- *
- * The handle of the created GEM object. Set by the kernel upon
- * successful completion of the IOCTL.
- */
- __u32 handle;
-};
-
-/**
- * struct drm_tegra_gem_mmap - parameters for the GEM mmap IOCTL
- */
-struct drm_tegra_gem_mmap {
- /**
- * @handle:
- *
- * Handle of the GEM object to obtain an mmap offset for.
- */
- __u32 handle;
-
- /**
- * @pad:
- *
- * Structure padding that may be used in the future. Must be 0.
- */
- __u32 pad;
-
- /**
- * @offset:
- *
- * The mmap offset for the given GEM object. Set by the kernel upon
- * successful completion of the IOCTL.
- */
- __u64 offset;
-};
-
-/**
- * struct drm_tegra_syncpt_read - parameters for the read syncpoint IOCTL
- */
-struct drm_tegra_syncpt_read {
- /**
- * @id:
- *
- * ID of the syncpoint to read the current value from.
- */
- __u32 id;
-
- /**
- * @value:
- *
- * The current syncpoint value. Set by the kernel upon successful
- * completion of the IOCTL.
- */
- __u32 value;
-};
-
-/**
- * struct drm_tegra_syncpt_incr - parameters for the increment syncpoint IOCTL
- */
-struct drm_tegra_syncpt_incr {
- /**
- * @id:
- *
- * ID of the syncpoint to increment.
- */
- __u32 id;
-
- /**
- * @pad:
- *
- * Structure padding that may be used in the future. Must be 0.
- */
- __u32 pad;
-};
-
-/**
- * struct drm_tegra_syncpt_wait - parameters for the wait syncpoint IOCTL
- */
-struct drm_tegra_syncpt_wait {
- /**
- * @id:
- *
- * ID of the syncpoint to wait on.
- */
- __u32 id;
-
- /**
- * @thresh:
- *
- * Threshold value for which to wait.
- */
- __u32 thresh;
-
- /**
- * @timeout:
- *
- * Timeout, in milliseconds, to wait.
- */
- __u32 timeout;
-
- /**
- * @value:
- *
- * The new syncpoint value after the wait. Set by the kernel upon
- * successful completion of the IOCTL.
- */
- __u32 value;
-};
-
-#define DRM_TEGRA_NO_TIMEOUT (0xffffffff)
-
-/**
- * struct drm_tegra_open_channel - parameters for the open channel IOCTL
- */
-struct drm_tegra_open_channel {
- /**
- * @client:
- *
- * The client ID for this channel.
- */
- __u32 client;
-
- /**
- * @pad:
- *
- * Structure padding that may be used in the future. Must be 0.
- */
- __u32 pad;
-
- /**
- * @context:
- *
- * The application context of this channel. Set by the kernel upon
- * successful completion of the IOCTL. This context needs to be passed
- * to the DRM_TEGRA_CHANNEL_CLOSE or the DRM_TEGRA_SUBMIT IOCTLs.
- */
- __u64 context;
-};
-
-/**
- * struct drm_tegra_close_channel - parameters for the close channel IOCTL
- */
-struct drm_tegra_close_channel {
- /**
- * @context:
- *
- * The application context of this channel. This is obtained from the
- * DRM_TEGRA_OPEN_CHANNEL IOCTL.
- */
- __u64 context;
-};
-
-/**
- * struct drm_tegra_get_syncpt - parameters for the get syncpoint IOCTL
- */
-struct drm_tegra_get_syncpt {
- /**
- * @context:
- *
- * The application context identifying the channel for which to obtain
- * the syncpoint ID.
- */
- __u64 context;
-
- /**
- * @index:
- *
- * Index of the client syncpoint for which to obtain the ID.
- */
- __u32 index;
-
- /**
- * @id:
- *
- * The ID of the given syncpoint. Set by the kernel upon successful
- * completion of the IOCTL.
- */
- __u32 id;
-};
-
-/**
- * struct drm_tegra_get_syncpt_base - parameters for the get wait base IOCTL
- */
-struct drm_tegra_get_syncpt_base {
- /**
- * @context:
- *
- * The application context identifying for which channel to obtain the
- * wait base.
- */
- __u64 context;
-
- /**
- * @syncpt:
- *
- * ID of the syncpoint for which to obtain the wait base.
- */
- __u32 syncpt;
-
- /**
- * @id:
- *
- * The ID of the wait base corresponding to the client syncpoint. Set
- * by the kernel upon successful completion of the IOCTL.
- */
- __u32 id;
-};
-
-/**
- * struct drm_tegra_syncpt - syncpoint increment operation
- */
-struct drm_tegra_syncpt {
- /**
- * @id:
- *
- * ID of the syncpoint to operate on.
- */
- __u32 id;
-
- /**
- * @incrs:
- *
- * Number of increments to perform for the syncpoint.
- */
- __u32 incrs;
-};
-
-/**
- * struct drm_tegra_cmdbuf - structure describing a command buffer
- */
-struct drm_tegra_cmdbuf {
- /**
- * @handle:
- *
- * Handle to a GEM object containing the command buffer.
- */
- __u32 handle;
-
- /**
- * @offset:
- *
- * Offset, in bytes, into the GEM object identified by @handle at
- * which the command buffer starts.
- */
- __u32 offset;
-
- /**
- * @words:
- *
- * Number of 32-bit words in this command buffer.
- */
- __u32 words;
-
- /**
- * @pad:
- *
- * Structure padding that may be used in the future. Must be 0.
- */
- __u32 pad;
-};
-
-/**
- * struct drm_tegra_reloc - GEM object relocation structure
- */
-struct drm_tegra_reloc {
- struct {
- /**
- * @cmdbuf.handle:
- *
- * Handle to the GEM object containing the command buffer for
- * which to perform this GEM object relocation.
- */
- __u32 handle;
-
- /**
- * @cmdbuf.offset:
- *
- * Offset, in bytes, into the command buffer at which to
- * insert the relocated address.
- */
- __u32 offset;
- } cmdbuf;
- struct {
- /**
- * @target.handle:
- *
- * Handle to the GEM object to be relocated.
- */
- __u32 handle;
-
- /**
- * @target.offset:
- *
- * Offset, in bytes, into the target GEM object at which the
- * relocated data starts.
- */
- __u32 offset;
- } target;
-
- /**
- * @shift:
- *
- * The number of bits by which to shift relocated addresses.
- */
- __u32 shift;
-
- /**
- * @pad:
- *
- * Structure padding that may be used in the future. Must be 0.
- */
- __u32 pad;
-};
-
-/**
- * struct drm_tegra_waitchk - wait check structure
- */
-struct drm_tegra_waitchk {
- /**
- * @handle:
- *
- * Handle to the GEM object containing a command stream on which to
- * perform the wait check.
- */
- __u32 handle;
-
- /**
- * @offset:
- *
- * Offset, in bytes, of the location in the command stream to perform
- * the wait check on.
- */
- __u32 offset;
-
- /**
- * @syncpt:
- *
- * ID of the syncpoint to wait check.
- */
- __u32 syncpt;
-
- /**
- * @thresh:
- *
- * Threshold value for which to check.
- */
- __u32 thresh;
-};
-
-/**
- * struct drm_tegra_submit - job submission structure
- */
-struct drm_tegra_submit {
- /**
- * @context:
- *
- * The application context identifying the channel to use for the
- * execution of this job.
- */
- __u64 context;
-
- /**
- * @num_syncpts:
- *
- * The number of syncpoints operated on by this job. This defines the
- * length of the array pointed to by @syncpts.
- */
- __u32 num_syncpts;
-
- /**
- * @num_cmdbufs:
- *
- * The number of command buffers to execute as part of this job. This
- * defines the length of the array pointed to by @cmdbufs.
- */
- __u32 num_cmdbufs;
-
- /**
- * @num_relocs:
- *
- * The number of relocations to perform before executing this job.
- * This defines the length of the array pointed to by @relocs.
- */
- __u32 num_relocs;
-
- /**
- * @num_waitchks:
- *
- * The number of wait checks to perform as part of this job. This
- * defines the length of the array pointed to by @waitchks.
- */
- __u32 num_waitchks;
-
- /**
- * @waitchk_mask:
- *
- * Bitmask of valid wait checks.
- */
- __u32 waitchk_mask;
-
- /**
- * @timeout:
- *
- * Timeout, in milliseconds, before this job is cancelled.
- */
- __u32 timeout;
-
- /**
- * @syncpts:
- *
- * A pointer to an array of &struct drm_tegra_syncpt structures that
- * specify the syncpoint operations performed as part of this job.
- * The number of elements in the array must be equal to the value
- * given by @num_syncpts.
- */
- __u64 syncpts;
-
- /**
- * @cmdbufs:
- *
- * A pointer to an array of &struct drm_tegra_cmdbuf structures that
- * define the command buffers to execute as part of this job. The
- * number of elements in the array must be equal to the value given
- * by @num_syncpts.
- */
- __u64 cmdbufs;
-
- /**
- * @relocs:
- *
- * A pointer to an array of &struct drm_tegra_reloc structures that
- * specify the relocations that need to be performed before executing
- * this job. The number of elements in the array must be equal to the
- * value given by @num_relocs.
- */
- __u64 relocs;
-
- /**
- * @waitchks:
- *
- * A pointer to an array of &struct drm_tegra_waitchk structures that
- * specify the wait checks to be performed while executing this job.
- * The number of elements in the array must be equal to the value
- * given by @num_waitchks.
- */
- __u64 waitchks;
-
- /**
- * @fence:
- *
- * The threshold of the syncpoint associated with this job after it
- * has been completed. Set by the kernel upon successful completion of
- * the IOCTL. This can be used with the DRM_TEGRA_SYNCPT_WAIT IOCTL to
- * wait for this job to be finished.
- */
- __u32 fence;
-
- /**
- * @reserved:
- *
- * This field is reserved for future use. Must be 0.
- */
- __u32 reserved[5];
-};
-
-#define DRM_TEGRA_GEM_TILING_MODE_PITCH 0
-#define DRM_TEGRA_GEM_TILING_MODE_TILED 1
-#define DRM_TEGRA_GEM_TILING_MODE_BLOCK 2
-
-/**
- * struct drm_tegra_gem_set_tiling - parameters for the set tiling IOCTL
- */
-struct drm_tegra_gem_set_tiling {
- /**
- * @handle:
- *
- * Handle to the GEM object for which to set the tiling parameters.
- */
- __u32 handle;
-
- /**
- * @mode:
- *
- * The tiling mode to set. Must be one of:
- *
- * DRM_TEGRA_GEM_TILING_MODE_PITCH
- * pitch linear format
- *
- * DRM_TEGRA_GEM_TILING_MODE_TILED
- * 16x16 tiling format
- *
- * DRM_TEGRA_GEM_TILING_MODE_BLOCK
- * 16Bx2 tiling format
- */
- __u32 mode;
-
- /**
- * @value:
- *
- * The value to set for the tiling mode parameter.
- */
- __u32 value;
-
- /**
- * @pad:
- *
- * Structure padding that may be used in the future. Must be 0.
- */
- __u32 pad;
-};
-
-/**
- * struct drm_tegra_gem_get_tiling - parameters for the get tiling IOCTL
- */
-struct drm_tegra_gem_get_tiling {
- /**
- * @handle:
- *
- * Handle to the GEM object for which to query the tiling parameters.
- */
- __u32 handle;
-
- /**
- * @mode:
- *
- * The tiling mode currently associated with the GEM object. Set by
- * the kernel upon successful completion of the IOCTL.
- */
- __u32 mode;
-
- /**
- * @value:
- *
- * The tiling mode parameter currently associated with the GEM object.
- * Set by the kernel upon successful completion of the IOCTL.
- */
- __u32 value;
-
- /**
- * @pad:
- *
- * Structure padding that may be used in the future. Must be 0.
- */
- __u32 pad;
-};
-
-#define DRM_TEGRA_GEM_BOTTOM_UP (1 << 0)
-#define DRM_TEGRA_GEM_FLAGS (DRM_TEGRA_GEM_BOTTOM_UP)
-
-/**
- * struct drm_tegra_gem_set_flags - parameters for the set flags IOCTL
- */
-struct drm_tegra_gem_set_flags {
- /**
- * @handle:
- *
- * Handle to the GEM object for which to set the flags.
- */
- __u32 handle;
-
- /**
- * @flags:
- *
- * The flags to set for the GEM object.
- */
- __u32 flags;
-};
-
-/**
- * struct drm_tegra_gem_get_flags - parameters for the get flags IOCTL
- */
-struct drm_tegra_gem_get_flags {
- /**
- * @handle:
- *
- * Handle to the GEM object for which to query the flags.
- */
- __u32 handle;
-
- /**
- * @flags:
- *
- * The flags currently associated with the GEM object. Set by the
- * kernel upon successful completion of the IOCTL.
- */
- __u32 flags;
-};
-
-#define DRM_TEGRA_GEM_CREATE 0x00
-#define DRM_TEGRA_GEM_MMAP 0x01
-#define DRM_TEGRA_SYNCPT_READ 0x02
-#define DRM_TEGRA_SYNCPT_INCR 0x03
-#define DRM_TEGRA_SYNCPT_WAIT 0x04
-#define DRM_TEGRA_OPEN_CHANNEL 0x05
-#define DRM_TEGRA_CLOSE_CHANNEL 0x06
-#define DRM_TEGRA_GET_SYNCPT 0x07
-#define DRM_TEGRA_SUBMIT 0x08
-#define DRM_TEGRA_GET_SYNCPT_BASE 0x09
-#define DRM_TEGRA_GEM_SET_TILING 0x0a
-#define DRM_TEGRA_GEM_GET_TILING 0x0b
-#define DRM_TEGRA_GEM_SET_FLAGS 0x0c
-#define DRM_TEGRA_GEM_GET_FLAGS 0x0d
-
-#define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create)
-#define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap)
-#define DRM_IOCTL_TEGRA_SYNCPT_READ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_READ, struct drm_tegra_syncpt_read)
-#define DRM_IOCTL_TEGRA_SYNCPT_INCR DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_INCR, struct drm_tegra_syncpt_incr)
-#define DRM_IOCTL_TEGRA_SYNCPT_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_WAIT, struct drm_tegra_syncpt_wait)
-#define DRM_IOCTL_TEGRA_OPEN_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_OPEN_CHANNEL, struct drm_tegra_open_channel)
-#define DRM_IOCTL_TEGRA_CLOSE_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_CLOSE_CHANNEL, struct drm_tegra_close_channel)
-#define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt)
-#define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit)
-#define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base)
-#define DRM_IOCTL_TEGRA_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_TILING, struct drm_tegra_gem_set_tiling)
-#define DRM_IOCTL_TEGRA_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_TILING, struct drm_tegra_gem_get_tiling)
-#define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags)
-#define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags)
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/v3d_drm.h b/lib/libc/include/generic-musl/drm/v3d_drm.h
deleted file mode 100644
index f222ddc346d2c60b9da91dcc33a50b5b67e6655c..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/v3d_drm.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright © 2014-2018 Broadcom
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef _V3D_DRM_H_
-#define _V3D_DRM_H_
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#define DRM_V3D_SUBMIT_CL 0x00
-#define DRM_V3D_WAIT_BO 0x01
-#define DRM_V3D_CREATE_BO 0x02
-#define DRM_V3D_MMAP_BO 0x03
-#define DRM_V3D_GET_PARAM 0x04
-#define DRM_V3D_GET_BO_OFFSET 0x05
-
-#define DRM_IOCTL_V3D_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CL, struct drm_v3d_submit_cl)
-#define DRM_IOCTL_V3D_WAIT_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_WAIT_BO, struct drm_v3d_wait_bo)
-#define DRM_IOCTL_V3D_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_CREATE_BO, struct drm_v3d_create_bo)
-#define DRM_IOCTL_V3D_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_MMAP_BO, struct drm_v3d_mmap_bo)
-#define DRM_IOCTL_V3D_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_PARAM, struct drm_v3d_get_param)
-#define DRM_IOCTL_V3D_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_BO_OFFSET, struct drm_v3d_get_bo_offset)
-
-/**
- * struct drm_v3d_submit_cl - ioctl argument for submitting commands to the 3D
- * engine.
- *
- * This asks the kernel to have the GPU execute an optional binner
- * command list, and a render command list.
- */
-struct drm_v3d_submit_cl {
- /* Pointer to the binner command list.
- *
- * This is the first set of commands executed, which runs the
- * coordinate shader to determine where primitives land on the screen,
- * then writes out the state updates and draw calls necessary per tile
- * to the tile allocation BO.
- */
- __u32 bcl_start;
-
- /** End address of the BCL (first byte after the BCL) */
- __u32 bcl_end;
-
- /* Offset of the render command list.
- *
- * This is the second set of commands executed, which will either
- * execute the tiles that have been set up by the BCL, or a fixed set
- * of tiles (in the case of RCL-only blits).
- */
- __u32 rcl_start;
-
- /** End address of the RCL (first byte after the RCL) */
- __u32 rcl_end;
-
- /** An optional sync object to wait on before starting the BCL. */
- __u32 in_sync_bcl;
- /** An optional sync object to wait on before starting the RCL. */
- __u32 in_sync_rcl;
- /** An optional sync object to place the completion fence in. */
- __u32 out_sync;
-
- /* Offset of the tile alloc memory
- *
- * This is optional on V3D 3.3 (where the CL can set the value) but
- * required on V3D 4.1.
- */
- __u32 qma;
-
- /** Size of the tile alloc memory. */
- __u32 qms;
-
- /** Offset of the tile state data array. */
- __u32 qts;
-
- /* Pointer to a u32 array of the BOs that are referenced by the job.
- */
- __u64 bo_handles;
-
- /* Number of BO handles passed in (size is that times 4). */
- __u32 bo_handle_count;
-
- /* Pad, must be zero-filled. */
- __u32 pad;
-};
-
-/**
- * struct drm_v3d_wait_bo - ioctl argument for waiting for
- * completion of the last DRM_V3D_SUBMIT_CL on a BO.
- *
- * This is useful for cases where multiple processes might be
- * rendering to a BO and you want to wait for all rendering to be
- * completed.
- */
-struct drm_v3d_wait_bo {
- __u32 handle;
- __u32 pad;
- __u64 timeout_ns;
-};
-
-/**
- * struct drm_v3d_create_bo - ioctl argument for creating V3D BOs.
- *
- * There are currently no values for the flags argument, but it may be
- * used in a future extension.
- */
-struct drm_v3d_create_bo {
- __u32 size;
- __u32 flags;
- /** Returned GEM handle for the BO. */
- __u32 handle;
- /**
- * Returned offset for the BO in the V3D address space. This offset
- * is private to the DRM fd and is valid for the lifetime of the GEM
- * handle.
- *
- * This offset value will always be nonzero, since various HW
- * units treat 0 specially.
- */
- __u32 offset;
-};
-
-/**
- * struct drm_v3d_mmap_bo - ioctl argument for mapping V3D BOs.
- *
- * This doesn't actually perform an mmap. Instead, it returns the
- * offset you need to use in an mmap on the DRM device node. This
- * means that tools like valgrind end up knowing about the mapped
- * memory.
- *
- * There are currently no values for the flags argument, but it may be
- * used in a future extension.
- */
-struct drm_v3d_mmap_bo {
- /** Handle for the object being mapped. */
- __u32 handle;
- __u32 flags;
- /** offset into the drm node to use for subsequent mmap call. */
- __u64 offset;
-};
-
-enum drm_v3d_param {
- DRM_V3D_PARAM_V3D_UIFCFG,
- DRM_V3D_PARAM_V3D_HUB_IDENT1,
- DRM_V3D_PARAM_V3D_HUB_IDENT2,
- DRM_V3D_PARAM_V3D_HUB_IDENT3,
- DRM_V3D_PARAM_V3D_CORE0_IDENT0,
- DRM_V3D_PARAM_V3D_CORE0_IDENT1,
- DRM_V3D_PARAM_V3D_CORE0_IDENT2,
-};
-
-struct drm_v3d_get_param {
- __u32 param;
- __u32 pad;
- __u64 value;
-};
-
-/**
- * Returns the offset for the BO in the V3D address space for this DRM fd.
- * This is the same value returned by drm_v3d_create_bo, if that was called
- * from this DRM fd.
- */
-struct drm_v3d_get_bo_offset {
- __u32 handle;
- __u32 offset;
-};
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* _V3D_DRM_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/vc4_drm.h b/lib/libc/include/generic-musl/drm/vc4_drm.h
deleted file mode 100644
index 8db36b7c55bf9492264ae91d9fc443d683717b55..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/vc4_drm.h
+++ /dev/null
@@ -1,442 +0,0 @@
-/*
- * Copyright © 2014-2015 Broadcom
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef _VC4_DRM_H_
-#define _VC4_DRM_H_
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#define DRM_VC4_SUBMIT_CL 0x00
-#define DRM_VC4_WAIT_SEQNO 0x01
-#define DRM_VC4_WAIT_BO 0x02
-#define DRM_VC4_CREATE_BO 0x03
-#define DRM_VC4_MMAP_BO 0x04
-#define DRM_VC4_CREATE_SHADER_BO 0x05
-#define DRM_VC4_GET_HANG_STATE 0x06
-#define DRM_VC4_GET_PARAM 0x07
-#define DRM_VC4_SET_TILING 0x08
-#define DRM_VC4_GET_TILING 0x09
-#define DRM_VC4_LABEL_BO 0x0a
-#define DRM_VC4_GEM_MADVISE 0x0b
-#define DRM_VC4_PERFMON_CREATE 0x0c
-#define DRM_VC4_PERFMON_DESTROY 0x0d
-#define DRM_VC4_PERFMON_GET_VALUES 0x0e
-
-#define DRM_IOCTL_VC4_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_SUBMIT_CL, struct drm_vc4_submit_cl)
-#define DRM_IOCTL_VC4_WAIT_SEQNO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_WAIT_SEQNO, struct drm_vc4_wait_seqno)
-#define DRM_IOCTL_VC4_WAIT_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_WAIT_BO, struct drm_vc4_wait_bo)
-#define DRM_IOCTL_VC4_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_CREATE_BO, struct drm_vc4_create_bo)
-#define DRM_IOCTL_VC4_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_MMAP_BO, struct drm_vc4_mmap_bo)
-#define DRM_IOCTL_VC4_CREATE_SHADER_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_CREATE_SHADER_BO, struct drm_vc4_create_shader_bo)
-#define DRM_IOCTL_VC4_GET_HANG_STATE DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_HANG_STATE, struct drm_vc4_get_hang_state)
-#define DRM_IOCTL_VC4_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_PARAM, struct drm_vc4_get_param)
-#define DRM_IOCTL_VC4_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_SET_TILING, struct drm_vc4_set_tiling)
-#define DRM_IOCTL_VC4_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_TILING, struct drm_vc4_get_tiling)
-#define DRM_IOCTL_VC4_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_LABEL_BO, struct drm_vc4_label_bo)
-#define DRM_IOCTL_VC4_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GEM_MADVISE, struct drm_vc4_gem_madvise)
-#define DRM_IOCTL_VC4_PERFMON_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_PERFMON_CREATE, struct drm_vc4_perfmon_create)
-#define DRM_IOCTL_VC4_PERFMON_DESTROY DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_PERFMON_DESTROY, struct drm_vc4_perfmon_destroy)
-#define DRM_IOCTL_VC4_PERFMON_GET_VALUES DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_PERFMON_GET_VALUES, struct drm_vc4_perfmon_get_values)
-
-struct drm_vc4_submit_rcl_surface {
- __u32 hindex; /* Handle index, or ~0 if not present. */
- __u32 offset; /* Offset to start of buffer. */
- /*
- * Bits for either render config (color_write) or load/store packet.
- * Bits should all be 0 for MSAA load/stores.
- */
- __u16 bits;
-
-#define VC4_SUBMIT_RCL_SURFACE_READ_IS_FULL_RES (1 << 0)
- __u16 flags;
-};
-
-/**
- * struct drm_vc4_submit_cl - ioctl argument for submitting commands to the 3D
- * engine.
- *
- * Drivers typically use GPU BOs to store batchbuffers / command lists and
- * their associated state. However, because the VC4 lacks an MMU, we have to
- * do validation of memory accesses by the GPU commands. If we were to store
- * our commands in BOs, we'd need to do uncached readback from them to do the
- * validation process, which is too expensive. Instead, userspace accumulates
- * commands and associated state in plain memory, then the kernel copies the
- * data to its own address space, and then validates and stores it in a GPU
- * BO.
- */
-struct drm_vc4_submit_cl {
- /* Pointer to the binner command list.
- *
- * This is the first set of commands executed, which runs the
- * coordinate shader to determine where primitives land on the screen,
- * then writes out the state updates and draw calls necessary per tile
- * to the tile allocation BO.
- */
- __u64 bin_cl;
-
- /* Pointer to the shader records.
- *
- * Shader records are the structures read by the hardware that contain
- * pointers to uniforms, shaders, and vertex attributes. The
- * reference to the shader record has enough information to determine
- * how many pointers are necessary (fixed number for shaders/uniforms,
- * and an attribute count), so those BO indices into bo_handles are
- * just stored as __u32s before each shader record passed in.
- */
- __u64 shader_rec;
-
- /* Pointer to uniform data and texture handles for the textures
- * referenced by the shader.
- *
- * For each shader state record, there is a set of uniform data in the
- * order referenced by the record (FS, VS, then CS). Each set of
- * uniform data has a __u32 index into bo_handles per texture
- * sample operation, in the order the QPU_W_TMUn_S writes appear in
- * the program. Following the texture BO handle indices is the actual
- * uniform data.
- *
- * The individual uniform state blocks don't have sizes passed in,
- * because the kernel has to determine the sizes anyway during shader
- * code validation.
- */
- __u64 uniforms;
- __u64 bo_handles;
-
- /* Size in bytes of the binner command list. */
- __u32 bin_cl_size;
- /* Size in bytes of the set of shader records. */
- __u32 shader_rec_size;
- /* Number of shader records.
- *
- * This could just be computed from the contents of shader_records and
- * the address bits of references to them from the bin CL, but it
- * keeps the kernel from having to resize some allocations it makes.
- */
- __u32 shader_rec_count;
- /* Size in bytes of the uniform state. */
- __u32 uniforms_size;
-
- /* Number of BO handles passed in (size is that times 4). */
- __u32 bo_handle_count;
-
- /* RCL setup: */
- __u16 width;
- __u16 height;
- __u8 min_x_tile;
- __u8 min_y_tile;
- __u8 max_x_tile;
- __u8 max_y_tile;
- struct drm_vc4_submit_rcl_surface color_read;
- struct drm_vc4_submit_rcl_surface color_write;
- struct drm_vc4_submit_rcl_surface zs_read;
- struct drm_vc4_submit_rcl_surface zs_write;
- struct drm_vc4_submit_rcl_surface msaa_color_write;
- struct drm_vc4_submit_rcl_surface msaa_zs_write;
- __u32 clear_color[2];
- __u32 clear_z;
- __u8 clear_s;
-
- __u32 pad:24;
-
-#define VC4_SUBMIT_CL_USE_CLEAR_COLOR (1 << 0)
-/* By default, the kernel gets to choose the order that the tiles are
- * rendered in. If this is set, then the tiles will be rendered in a
- * raster order, with the right-to-left vs left-to-right and
- * top-to-bottom vs bottom-to-top dictated by
- * VC4_SUBMIT_CL_RCL_ORDER_INCREASING_*. This allows overlapping
- * blits to be implemented using the 3D engine.
- */
-#define VC4_SUBMIT_CL_FIXED_RCL_ORDER (1 << 1)
-#define VC4_SUBMIT_CL_RCL_ORDER_INCREASING_X (1 << 2)
-#define VC4_SUBMIT_CL_RCL_ORDER_INCREASING_Y (1 << 3)
- __u32 flags;
-
- /* Returned value of the seqno of this render job (for the
- * wait ioctl).
- */
- __u64 seqno;
-
- /* ID of the perfmon to attach to this job. 0 means no perfmon. */
- __u32 perfmonid;
-
- /* Syncobj handle to wait on. If set, processing of this render job
- * will not start until the syncobj is signaled. 0 means ignore.
- */
- __u32 in_sync;
-
- /* Syncobj handle to export fence to. If set, the fence in the syncobj
- * will be replaced with a fence that signals upon completion of this
- * render job. 0 means ignore.
- */
- __u32 out_sync;
-
- __u32 pad2;
-};
-
-/**
- * struct drm_vc4_wait_seqno - ioctl argument for waiting for
- * DRM_VC4_SUBMIT_CL completion using its returned seqno.
- *
- * timeout_ns is the timeout in nanoseconds, where "0" means "don't
- * block, just return the status."
- */
-struct drm_vc4_wait_seqno {
- __u64 seqno;
- __u64 timeout_ns;
-};
-
-/**
- * struct drm_vc4_wait_bo - ioctl argument for waiting for
- * completion of the last DRM_VC4_SUBMIT_CL on a BO.
- *
- * This is useful for cases where multiple processes might be
- * rendering to a BO and you want to wait for all rendering to be
- * completed.
- */
-struct drm_vc4_wait_bo {
- __u32 handle;
- __u32 pad;
- __u64 timeout_ns;
-};
-
-/**
- * struct drm_vc4_create_bo - ioctl argument for creating VC4 BOs.
- *
- * There are currently no values for the flags argument, but it may be
- * used in a future extension.
- */
-struct drm_vc4_create_bo {
- __u32 size;
- __u32 flags;
- /** Returned GEM handle for the BO. */
- __u32 handle;
- __u32 pad;
-};
-
-/**
- * struct drm_vc4_mmap_bo - ioctl argument for mapping VC4 BOs.
- *
- * This doesn't actually perform an mmap. Instead, it returns the
- * offset you need to use in an mmap on the DRM device node. This
- * means that tools like valgrind end up knowing about the mapped
- * memory.
- *
- * There are currently no values for the flags argument, but it may be
- * used in a future extension.
- */
-struct drm_vc4_mmap_bo {
- /** Handle for the object being mapped. */
- __u32 handle;
- __u32 flags;
- /** offset into the drm node to use for subsequent mmap call. */
- __u64 offset;
-};
-
-/**
- * struct drm_vc4_create_shader_bo - ioctl argument for creating VC4
- * shader BOs.
- *
- * Since allowing a shader to be overwritten while it's also being
- * executed from would allow privlege escalation, shaders must be
- * created using this ioctl, and they can't be mmapped later.
- */
-struct drm_vc4_create_shader_bo {
- /* Size of the data argument. */
- __u32 size;
- /* Flags, currently must be 0. */
- __u32 flags;
-
- /* Pointer to the data. */
- __u64 data;
-
- /** Returned GEM handle for the BO. */
- __u32 handle;
- /* Pad, must be 0. */
- __u32 pad;
-};
-
-struct drm_vc4_get_hang_state_bo {
- __u32 handle;
- __u32 paddr;
- __u32 size;
- __u32 pad;
-};
-
-/**
- * struct drm_vc4_hang_state - ioctl argument for collecting state
- * from a GPU hang for analysis.
-*/
-struct drm_vc4_get_hang_state {
- /** Pointer to array of struct drm_vc4_get_hang_state_bo. */
- __u64 bo;
- /**
- * On input, the size of the bo array. Output is the number
- * of bos to be returned.
- */
- __u32 bo_count;
-
- __u32 start_bin, start_render;
-
- __u32 ct0ca, ct0ea;
- __u32 ct1ca, ct1ea;
- __u32 ct0cs, ct1cs;
- __u32 ct0ra0, ct1ra0;
-
- __u32 bpca, bpcs;
- __u32 bpoa, bpos;
-
- __u32 vpmbase;
-
- __u32 dbge;
- __u32 fdbgo;
- __u32 fdbgb;
- __u32 fdbgr;
- __u32 fdbgs;
- __u32 errstat;
-
- /* Pad that we may save more registers into in the future. */
- __u32 pad[16];
-};
-
-#define DRM_VC4_PARAM_V3D_IDENT0 0
-#define DRM_VC4_PARAM_V3D_IDENT1 1
-#define DRM_VC4_PARAM_V3D_IDENT2 2
-#define DRM_VC4_PARAM_SUPPORTS_BRANCHES 3
-#define DRM_VC4_PARAM_SUPPORTS_ETC1 4
-#define DRM_VC4_PARAM_SUPPORTS_THREADED_FS 5
-#define DRM_VC4_PARAM_SUPPORTS_FIXED_RCL_ORDER 6
-#define DRM_VC4_PARAM_SUPPORTS_MADVISE 7
-#define DRM_VC4_PARAM_SUPPORTS_PERFMON 8
-
-struct drm_vc4_get_param {
- __u32 param;
- __u32 pad;
- __u64 value;
-};
-
-struct drm_vc4_get_tiling {
- __u32 handle;
- __u32 flags;
- __u64 modifier;
-};
-
-struct drm_vc4_set_tiling {
- __u32 handle;
- __u32 flags;
- __u64 modifier;
-};
-
-/**
- * struct drm_vc4_label_bo - Attach a name to a BO for debug purposes.
- */
-struct drm_vc4_label_bo {
- __u32 handle;
- __u32 len;
- __u64 name;
-};
-
-/*
- * States prefixed with '__' are internal states and cannot be passed to the
- * DRM_IOCTL_VC4_GEM_MADVISE ioctl.
- */
-#define VC4_MADV_WILLNEED 0
-#define VC4_MADV_DONTNEED 1
-#define __VC4_MADV_PURGED 2
-#define __VC4_MADV_NOTSUPP 3
-
-struct drm_vc4_gem_madvise {
- __u32 handle;
- __u32 madv;
- __u32 retained;
- __u32 pad;
-};
-
-enum {
- VC4_PERFCNT_FEP_VALID_PRIMS_NO_RENDER,
- VC4_PERFCNT_FEP_VALID_PRIMS_RENDER,
- VC4_PERFCNT_FEP_CLIPPED_QUADS,
- VC4_PERFCNT_FEP_VALID_QUADS,
- VC4_PERFCNT_TLB_QUADS_NOT_PASSING_STENCIL,
- VC4_PERFCNT_TLB_QUADS_NOT_PASSING_Z_AND_STENCIL,
- VC4_PERFCNT_TLB_QUADS_PASSING_Z_AND_STENCIL,
- VC4_PERFCNT_TLB_QUADS_ZERO_COVERAGE,
- VC4_PERFCNT_TLB_QUADS_NON_ZERO_COVERAGE,
- VC4_PERFCNT_TLB_QUADS_WRITTEN_TO_COLOR_BUF,
- VC4_PERFCNT_PLB_PRIMS_OUTSIDE_VIEWPORT,
- VC4_PERFCNT_PLB_PRIMS_NEED_CLIPPING,
- VC4_PERFCNT_PSE_PRIMS_REVERSED,
- VC4_PERFCNT_QPU_TOTAL_IDLE_CYCLES,
- VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_VERTEX_COORD_SHADING,
- VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_FRAGMENT_SHADING,
- VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_EXEC_VALID_INST,
- VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_WAITING_TMUS,
- VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_WAITING_SCOREBOARD,
- VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_WAITING_VARYINGS,
- VC4_PERFCNT_QPU_TOTAL_INST_CACHE_HIT,
- VC4_PERFCNT_QPU_TOTAL_INST_CACHE_MISS,
- VC4_PERFCNT_QPU_TOTAL_UNIFORM_CACHE_HIT,
- VC4_PERFCNT_QPU_TOTAL_UNIFORM_CACHE_MISS,
- VC4_PERFCNT_TMU_TOTAL_TEXT_QUADS_PROCESSED,
- VC4_PERFCNT_TMU_TOTAL_TEXT_CACHE_MISS,
- VC4_PERFCNT_VPM_TOTAL_CLK_CYCLES_VDW_STALLED,
- VC4_PERFCNT_VPM_TOTAL_CLK_CYCLES_VCD_STALLED,
- VC4_PERFCNT_L2C_TOTAL_L2_CACHE_HIT,
- VC4_PERFCNT_L2C_TOTAL_L2_CACHE_MISS,
- VC4_PERFCNT_NUM_EVENTS,
-};
-
-#define DRM_VC4_MAX_PERF_COUNTERS 16
-
-struct drm_vc4_perfmon_create {
- __u32 id;
- __u32 ncounters;
- __u8 events[DRM_VC4_MAX_PERF_COUNTERS];
-};
-
-struct drm_vc4_perfmon_destroy {
- __u32 id;
-};
-
-/*
- * Returns the values of the performance counters tracked by this
- * perfmon (as an array of ncounters u64 values).
- *
- * No implicit synchronization is performed, so the user has to
- * guarantee that any jobs using this perfmon have already been
- * completed (probably by blocking on the seqno returned by the
- * last exec that used the perfmon).
- */
-struct drm_vc4_perfmon_get_values {
- __u32 id;
- __u64 values_ptr;
-};
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* _VC4_DRM_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/vgem_drm.h b/lib/libc/include/generic-musl/drm/vgem_drm.h
deleted file mode 100644
index f874b1b4eb5fe67ed99a9bf4f87d0039f52f84be..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/vgem_drm.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2016 Intel Corporation
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#ifndef _VGEM_DRM_H_
-#define _VGEM_DRM_H_
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* Please note that modifications to all structs defined here are
- * subject to backwards-compatibility constraints.
- */
-#define DRM_VGEM_FENCE_ATTACH 0x1
-#define DRM_VGEM_FENCE_SIGNAL 0x2
-
-#define DRM_IOCTL_VGEM_FENCE_ATTACH DRM_IOWR( DRM_COMMAND_BASE + DRM_VGEM_FENCE_ATTACH, struct drm_vgem_fence_attach)
-#define DRM_IOCTL_VGEM_FENCE_SIGNAL DRM_IOW( DRM_COMMAND_BASE + DRM_VGEM_FENCE_SIGNAL, struct drm_vgem_fence_signal)
-
-struct drm_vgem_fence_attach {
- __u32 handle;
- __u32 flags;
-#define VGEM_FENCE_WRITE 0x1
- __u32 out_fence;
- __u32 pad;
-};
-
-struct drm_vgem_fence_signal {
- __u32 fence;
- __u32 flags;
-};
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* _VGEM_DRM_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/via_drm.h b/lib/libc/include/generic-musl/drm/via_drm.h
deleted file mode 100644
index 8cfda08dd8dc30439d93469f88cb21e9eee6a11f..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/via_drm.h
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
- * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sub license,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-#ifndef _VIA_DRM_H_
-#define _VIA_DRM_H_
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* WARNING: These defines must be the same as what the Xserver uses.
- * if you change them, you must change the defines in the Xserver.
- */
-
-#ifndef _VIA_DEFINES_
-#define _VIA_DEFINES_
-
-
-#define VIA_NR_SAREA_CLIPRECTS 8
-#define VIA_NR_XVMC_PORTS 10
-#define VIA_NR_XVMC_LOCKS 5
-#define VIA_MAX_CACHELINE_SIZE 64
-#define XVMCLOCKPTR(saPriv,lockNo) \
- ((__volatile__ struct drm_hw_lock *)(((((unsigned long) (saPriv)->XvMCLockArea) + \
- (VIA_MAX_CACHELINE_SIZE - 1)) & \
- ~(VIA_MAX_CACHELINE_SIZE - 1)) + \
- VIA_MAX_CACHELINE_SIZE*(lockNo)))
-
-/* Each region is a minimum of 64k, and there are at most 64 of them.
- */
-#define VIA_NR_TEX_REGIONS 64
-#define VIA_LOG_MIN_TEX_REGION_SIZE 16
-#endif
-
-#define VIA_UPLOAD_TEX0IMAGE 0x1 /* handled clientside */
-#define VIA_UPLOAD_TEX1IMAGE 0x2 /* handled clientside */
-#define VIA_UPLOAD_CTX 0x4
-#define VIA_UPLOAD_BUFFERS 0x8
-#define VIA_UPLOAD_TEX0 0x10
-#define VIA_UPLOAD_TEX1 0x20
-#define VIA_UPLOAD_CLIPRECTS 0x40
-#define VIA_UPLOAD_ALL 0xff
-
-/* VIA specific ioctls */
-#define DRM_VIA_ALLOCMEM 0x00
-#define DRM_VIA_FREEMEM 0x01
-#define DRM_VIA_AGP_INIT 0x02
-#define DRM_VIA_FB_INIT 0x03
-#define DRM_VIA_MAP_INIT 0x04
-#define DRM_VIA_DEC_FUTEX 0x05
-#define NOT_USED
-#define DRM_VIA_DMA_INIT 0x07
-#define DRM_VIA_CMDBUFFER 0x08
-#define DRM_VIA_FLUSH 0x09
-#define DRM_VIA_PCICMD 0x0a
-#define DRM_VIA_CMDBUF_SIZE 0x0b
-#define NOT_USED
-#define DRM_VIA_WAIT_IRQ 0x0d
-#define DRM_VIA_DMA_BLIT 0x0e
-#define DRM_VIA_BLIT_SYNC 0x0f
-
-#define DRM_IOCTL_VIA_ALLOCMEM DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_ALLOCMEM, drm_via_mem_t)
-#define DRM_IOCTL_VIA_FREEMEM DRM_IOW( DRM_COMMAND_BASE + DRM_VIA_FREEMEM, drm_via_mem_t)
-#define DRM_IOCTL_VIA_AGP_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_AGP_INIT, drm_via_agp_t)
-#define DRM_IOCTL_VIA_FB_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_FB_INIT, drm_via_fb_t)
-#define DRM_IOCTL_VIA_MAP_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_MAP_INIT, drm_via_init_t)
-#define DRM_IOCTL_VIA_DEC_FUTEX DRM_IOW( DRM_COMMAND_BASE + DRM_VIA_DEC_FUTEX, drm_via_futex_t)
-#define DRM_IOCTL_VIA_DMA_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_DMA_INIT, drm_via_dma_init_t)
-#define DRM_IOCTL_VIA_CMDBUFFER DRM_IOW( DRM_COMMAND_BASE + DRM_VIA_CMDBUFFER, drm_via_cmdbuffer_t)
-#define DRM_IOCTL_VIA_FLUSH DRM_IO( DRM_COMMAND_BASE + DRM_VIA_FLUSH)
-#define DRM_IOCTL_VIA_PCICMD DRM_IOW( DRM_COMMAND_BASE + DRM_VIA_PCICMD, drm_via_cmdbuffer_t)
-#define DRM_IOCTL_VIA_CMDBUF_SIZE DRM_IOWR( DRM_COMMAND_BASE + DRM_VIA_CMDBUF_SIZE, \
- drm_via_cmdbuf_size_t)
-#define DRM_IOCTL_VIA_WAIT_IRQ DRM_IOWR( DRM_COMMAND_BASE + DRM_VIA_WAIT_IRQ, drm_via_irqwait_t)
-#define DRM_IOCTL_VIA_DMA_BLIT DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_DMA_BLIT, drm_via_dmablit_t)
-#define DRM_IOCTL_VIA_BLIT_SYNC DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_BLIT_SYNC, drm_via_blitsync_t)
-
-/* Indices into buf.Setup where various bits of state are mirrored per
- * context and per buffer. These can be fired at the card as a unit,
- * or in a piecewise fashion as required.
- */
-
-#define VIA_TEX_SETUP_SIZE 8
-
-/* Flags for clear ioctl
- */
-#define VIA_FRONT 0x1
-#define VIA_BACK 0x2
-#define VIA_DEPTH 0x4
-#define VIA_STENCIL 0x8
-#define VIA_MEM_VIDEO 0 /* matches drm constant */
-#define VIA_MEM_AGP 1 /* matches drm constant */
-#define VIA_MEM_SYSTEM 2
-#define VIA_MEM_MIXED 3
-#define VIA_MEM_UNKNOWN 4
-
-typedef struct {
- __u32 offset;
- __u32 size;
-} drm_via_agp_t;
-
-typedef struct {
- __u32 offset;
- __u32 size;
-} drm_via_fb_t;
-
-typedef struct {
- __u32 context;
- __u32 type;
- __u32 size;
- unsigned long index;
- unsigned long offset;
-} drm_via_mem_t;
-
-typedef struct _drm_via_init {
- enum {
- VIA_INIT_MAP = 0x01,
- VIA_CLEANUP_MAP = 0x02
- } func;
-
- unsigned long sarea_priv_offset;
- unsigned long fb_offset;
- unsigned long mmio_offset;
- unsigned long agpAddr;
-} drm_via_init_t;
-
-typedef struct _drm_via_futex {
- enum {
- VIA_FUTEX_WAIT = 0x00,
- VIA_FUTEX_WAKE = 0X01
- } func;
- __u32 ms;
- __u32 lock;
- __u32 val;
-} drm_via_futex_t;
-
-typedef struct _drm_via_dma_init {
- enum {
- VIA_INIT_DMA = 0x01,
- VIA_CLEANUP_DMA = 0x02,
- VIA_DMA_INITIALIZED = 0x03
- } func;
-
- unsigned long offset;
- unsigned long size;
- unsigned long reg_pause_addr;
-} drm_via_dma_init_t;
-
-typedef struct _drm_via_cmdbuffer {
- char *buf;
- unsigned long size;
-} drm_via_cmdbuffer_t;
-
-/* Warning: If you change the SAREA structure you must change the Xserver
- * structure as well */
-
-typedef struct _drm_via_tex_region {
- unsigned char next, prev; /* indices to form a circular LRU */
- unsigned char inUse; /* owned by a client, or free? */
- int age; /* tracked by clients to update local LRU's */
-} drm_via_tex_region_t;
-
-typedef struct _drm_via_sarea {
- unsigned int dirty;
- unsigned int nbox;
- struct drm_clip_rect boxes[VIA_NR_SAREA_CLIPRECTS];
- drm_via_tex_region_t texList[VIA_NR_TEX_REGIONS + 1];
- int texAge; /* last time texture was uploaded */
- int ctxOwner; /* last context to upload state */
- int vertexPrim;
-
- /*
- * Below is for XvMC.
- * We want the lock integers alone on, and aligned to, a cache line.
- * Therefore this somewhat strange construct.
- */
-
- char XvMCLockArea[VIA_MAX_CACHELINE_SIZE * (VIA_NR_XVMC_LOCKS + 1)];
-
- unsigned int XvMCDisplaying[VIA_NR_XVMC_PORTS];
- unsigned int XvMCSubPicOn[VIA_NR_XVMC_PORTS];
- unsigned int XvMCCtxNoGrabbed; /* Last context to hold decoder */
-
- /* Used by the 3d driver only at this point, for pageflipping:
- */
- unsigned int pfCurrentOffset;
-} drm_via_sarea_t;
-
-typedef struct _drm_via_cmdbuf_size {
- enum {
- VIA_CMDBUF_SPACE = 0x01,
- VIA_CMDBUF_LAG = 0x02
- } func;
- int wait;
- __u32 size;
-} drm_via_cmdbuf_size_t;
-
-typedef enum {
- VIA_IRQ_ABSOLUTE = 0x0,
- VIA_IRQ_RELATIVE = 0x1,
- VIA_IRQ_SIGNAL = 0x10000000,
- VIA_IRQ_FORCE_SEQUENCE = 0x20000000
-} via_irq_seq_type_t;
-
-#define VIA_IRQ_FLAGS_MASK 0xF0000000
-
-enum drm_via_irqs {
- drm_via_irq_hqv0 = 0,
- drm_via_irq_hqv1,
- drm_via_irq_dma0_dd,
- drm_via_irq_dma0_td,
- drm_via_irq_dma1_dd,
- drm_via_irq_dma1_td,
- drm_via_irq_num
-};
-
-struct drm_via_wait_irq_request {
- unsigned irq;
- via_irq_seq_type_t type;
- __u32 sequence;
- __u32 signal;
-};
-
-typedef union drm_via_irqwait {
- struct drm_via_wait_irq_request request;
- struct drm_wait_vblank_reply reply;
-} drm_via_irqwait_t;
-
-typedef struct drm_via_blitsync {
- __u32 sync_handle;
- unsigned engine;
-} drm_via_blitsync_t;
-
-/* - * Below,"flags" is currently unused but will be used for possible future
- * extensions like kernel space bounce buffers for bad alignments and
- * blit engine busy-wait polling for better latency in the absence of
- * interrupts.
- */
-
-typedef struct drm_via_dmablit {
- __u32 num_lines;
- __u32 line_length;
-
- __u32 fb_addr;
- __u32 fb_stride;
-
- unsigned char *mem_addr;
- __u32 mem_stride;
-
- __u32 flags;
- int to_fb;
-
- drm_via_blitsync_t sync;
-} drm_via_dmablit_t;
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* _VIA_DRM_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/virtgpu_drm.h b/lib/libc/include/generic-musl/drm/virtgpu_drm.h
deleted file mode 100644
index 0c2073bca9e61853b68e8ff3ccca125ec1604000..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/virtgpu_drm.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright 2013 Red Hat
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-#ifndef VIRTGPU_DRM_H
-#define VIRTGPU_DRM_H
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* Please note that modifications to all structs defined here are
- * subject to backwards-compatibility constraints.
- *
- * Do not use pointers, use __u64 instead for 32 bit / 64 bit user/kernel
- * compatibility Keep fields aligned to their size
- */
-
-#define DRM_VIRTGPU_MAP 0x01
-#define DRM_VIRTGPU_EXECBUFFER 0x02
-#define DRM_VIRTGPU_GETPARAM 0x03
-#define DRM_VIRTGPU_RESOURCE_CREATE 0x04
-#define DRM_VIRTGPU_RESOURCE_INFO 0x05
-#define DRM_VIRTGPU_TRANSFER_FROM_HOST 0x06
-#define DRM_VIRTGPU_TRANSFER_TO_HOST 0x07
-#define DRM_VIRTGPU_WAIT 0x08
-#define DRM_VIRTGPU_GET_CAPS 0x09
-
-struct drm_virtgpu_map {
- __u64 offset; /* use for mmap system call */
- __u32 handle;
- __u32 pad;
-};
-
-struct drm_virtgpu_execbuffer {
- __u32 flags; /* for future use */
- __u32 size;
- __u64 command; /* void* */
- __u64 bo_handles;
- __u32 num_bo_handles;
- __u32 pad;
-};
-
-#define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the hw */
-#define VIRTGPU_PARAM_CAPSET_QUERY_FIX 2 /* do we have the capset fix */
-
-struct drm_virtgpu_getparam {
- __u64 param;
- __u64 value;
-};
-
-/* NO_BO flags? NO resource flag? */
-/* resource flag for y_0_top */
-struct drm_virtgpu_resource_create {
- __u32 target;
- __u32 format;
- __u32 bind;
- __u32 width;
- __u32 height;
- __u32 depth;
- __u32 array_size;
- __u32 last_level;
- __u32 nr_samples;
- __u32 flags;
- __u32 bo_handle; /* if this is set - recreate a new resource attached to this bo ? */
- __u32 res_handle; /* returned by kernel */
- __u32 size; /* validate transfer in the host */
- __u32 stride; /* validate transfer in the host */
-};
-
-struct drm_virtgpu_resource_info {
- __u32 bo_handle;
- __u32 res_handle;
- __u32 size;
- __u32 stride;
-};
-
-struct drm_virtgpu_3d_box {
- __u32 x;
- __u32 y;
- __u32 z;
- __u32 w;
- __u32 h;
- __u32 d;
-};
-
-struct drm_virtgpu_3d_transfer_to_host {
- __u32 bo_handle;
- struct drm_virtgpu_3d_box box;
- __u32 level;
- __u32 offset;
-};
-
-struct drm_virtgpu_3d_transfer_from_host {
- __u32 bo_handle;
- struct drm_virtgpu_3d_box box;
- __u32 level;
- __u32 offset;
-};
-
-#define VIRTGPU_WAIT_NOWAIT 1 /* like it */
-struct drm_virtgpu_3d_wait {
- __u32 handle; /* 0 is an invalid handle */
- __u32 flags;
-};
-
-struct drm_virtgpu_get_caps {
- __u32 cap_set_id;
- __u32 cap_set_ver;
- __u64 addr;
- __u32 size;
- __u32 pad;
-};
-
-#define DRM_IOCTL_VIRTGPU_MAP \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_MAP, struct drm_virtgpu_map)
-
-#define DRM_IOCTL_VIRTGPU_EXECBUFFER \
- DRM_IOW(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER,\
- struct drm_virtgpu_execbuffer)
-
-#define DRM_IOCTL_VIRTGPU_GETPARAM \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_GETPARAM,\
- struct drm_virtgpu_getparam)
-
-#define DRM_IOCTL_VIRTGPU_RESOURCE_CREATE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_CREATE, \
- struct drm_virtgpu_resource_create)
-
-#define DRM_IOCTL_VIRTGPU_RESOURCE_INFO \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_INFO, \
- struct drm_virtgpu_resource_info)
-
-#define DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_TRANSFER_FROM_HOST, \
- struct drm_virtgpu_3d_transfer_from_host)
-
-#define DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_TRANSFER_TO_HOST, \
- struct drm_virtgpu_3d_transfer_to_host)
-
-#define DRM_IOCTL_VIRTGPU_WAIT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_WAIT, \
- struct drm_virtgpu_3d_wait)
-
-#define DRM_IOCTL_VIRTGPU_GET_CAPS \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_GET_CAPS, \
- struct drm_virtgpu_get_caps)
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/drm/vmwgfx_drm.h b/lib/libc/include/generic-musl/drm/vmwgfx_drm.h
deleted file mode 100644
index 92eea6af39058dc4f186e271f0a619c654f5e847..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/drm/vmwgfx_drm.h
+++ /dev/null
@@ -1,1218 +0,0 @@
-/**************************************************************************
- *
- * Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- **************************************************************************/
-
-#ifndef __VMWGFX_DRM_H__
-#define __VMWGFX_DRM_H__
-
-#include "drm.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#define DRM_VMW_MAX_SURFACE_FACES 6
-#define DRM_VMW_MAX_MIP_LEVELS 24
-
-
-#define DRM_VMW_GET_PARAM 0
-#define DRM_VMW_ALLOC_DMABUF 1
-#define DRM_VMW_ALLOC_BO 1
-#define DRM_VMW_UNREF_DMABUF 2
-#define DRM_VMW_HANDLE_CLOSE 2
-#define DRM_VMW_CURSOR_BYPASS 3
-/* guarded by DRM_VMW_PARAM_NUM_STREAMS != 0*/
-#define DRM_VMW_CONTROL_STREAM 4
-#define DRM_VMW_CLAIM_STREAM 5
-#define DRM_VMW_UNREF_STREAM 6
-/* guarded by DRM_VMW_PARAM_3D == 1 */
-#define DRM_VMW_CREATE_CONTEXT 7
-#define DRM_VMW_UNREF_CONTEXT 8
-#define DRM_VMW_CREATE_SURFACE 9
-#define DRM_VMW_UNREF_SURFACE 10
-#define DRM_VMW_REF_SURFACE 11
-#define DRM_VMW_EXECBUF 12
-#define DRM_VMW_GET_3D_CAP 13
-#define DRM_VMW_FENCE_WAIT 14
-#define DRM_VMW_FENCE_SIGNALED 15
-#define DRM_VMW_FENCE_UNREF 16
-#define DRM_VMW_FENCE_EVENT 17
-#define DRM_VMW_PRESENT 18
-#define DRM_VMW_PRESENT_READBACK 19
-#define DRM_VMW_UPDATE_LAYOUT 20
-#define DRM_VMW_CREATE_SHADER 21
-#define DRM_VMW_UNREF_SHADER 22
-#define DRM_VMW_GB_SURFACE_CREATE 23
-#define DRM_VMW_GB_SURFACE_REF 24
-#define DRM_VMW_SYNCCPU 25
-#define DRM_VMW_CREATE_EXTENDED_CONTEXT 26
-#define DRM_VMW_GB_SURFACE_CREATE_EXT 27
-#define DRM_VMW_GB_SURFACE_REF_EXT 28
-
-/*************************************************************************/
-/**
- * DRM_VMW_GET_PARAM - get device information.
- *
- * DRM_VMW_PARAM_FIFO_OFFSET:
- * Offset to use to map the first page of the FIFO read-only.
- * The fifo is mapped using the mmap() system call on the drm device.
- *
- * DRM_VMW_PARAM_OVERLAY_IOCTL:
- * Does the driver support the overlay ioctl.
- *
- * DRM_VMW_PARAM_SM4_1
- * SM4_1 support is enabled.
- */
-
-#define DRM_VMW_PARAM_NUM_STREAMS 0
-#define DRM_VMW_PARAM_NUM_FREE_STREAMS 1
-#define DRM_VMW_PARAM_3D 2
-#define DRM_VMW_PARAM_HW_CAPS 3
-#define DRM_VMW_PARAM_FIFO_CAPS 4
-#define DRM_VMW_PARAM_MAX_FB_SIZE 5
-#define DRM_VMW_PARAM_FIFO_HW_VERSION 6
-#define DRM_VMW_PARAM_MAX_SURF_MEMORY 7
-#define DRM_VMW_PARAM_3D_CAPS_SIZE 8
-#define DRM_VMW_PARAM_MAX_MOB_MEMORY 9
-#define DRM_VMW_PARAM_MAX_MOB_SIZE 10
-#define DRM_VMW_PARAM_SCREEN_TARGET 11
-#define DRM_VMW_PARAM_DX 12
-#define DRM_VMW_PARAM_HW_CAPS2 13
-#define DRM_VMW_PARAM_SM4_1 14
-
-/**
- * enum drm_vmw_handle_type - handle type for ref ioctls
- *
- */
-enum drm_vmw_handle_type {
- DRM_VMW_HANDLE_LEGACY = 0,
- DRM_VMW_HANDLE_PRIME = 1
-};
-
-/**
- * struct drm_vmw_getparam_arg
- *
- * @value: Returned value. //Out
- * @param: Parameter to query. //In.
- *
- * Argument to the DRM_VMW_GET_PARAM Ioctl.
- */
-
-struct drm_vmw_getparam_arg {
- __u64 value;
- __u32 param;
- __u32 pad64;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_CREATE_CONTEXT - Create a host context.
- *
- * Allocates a device unique context id, and queues a create context command
- * for the host. Does not wait for host completion.
- */
-
-/**
- * struct drm_vmw_context_arg
- *
- * @cid: Device unique context ID.
- *
- * Output argument to the DRM_VMW_CREATE_CONTEXT Ioctl.
- * Input argument to the DRM_VMW_UNREF_CONTEXT Ioctl.
- */
-
-struct drm_vmw_context_arg {
- __s32 cid;
- __u32 pad64;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_UNREF_CONTEXT - Create a host context.
- *
- * Frees a global context id, and queues a destroy host command for the host.
- * Does not wait for host completion. The context ID can be used directly
- * in the command stream and shows up as the same context ID on the host.
- */
-
-/*************************************************************************/
-/**
- * DRM_VMW_CREATE_SURFACE - Create a host suface.
- *
- * Allocates a device unique surface id, and queues a create surface command
- * for the host. Does not wait for host completion. The surface ID can be
- * used directly in the command stream and shows up as the same surface
- * ID on the host.
- */
-
-/**
- * struct drm_wmv_surface_create_req
- *
- * @flags: Surface flags as understood by the host.
- * @format: Surface format as understood by the host.
- * @mip_levels: Number of mip levels for each face.
- * An unused face should have 0 encoded.
- * @size_addr: Address of a user-space array of sruct drm_vmw_size
- * cast to an __u64 for 32-64 bit compatibility.
- * The size of the array should equal the total number of mipmap levels.
- * @shareable: Boolean whether other clients (as identified by file descriptors)
- * may reference this surface.
- * @scanout: Boolean whether the surface is intended to be used as a
- * scanout.
- *
- * Input data to the DRM_VMW_CREATE_SURFACE Ioctl.
- * Output data from the DRM_VMW_REF_SURFACE Ioctl.
- */
-
-struct drm_vmw_surface_create_req {
- __u32 flags;
- __u32 format;
- __u32 mip_levels[DRM_VMW_MAX_SURFACE_FACES];
- __u64 size_addr;
- __s32 shareable;
- __s32 scanout;
-};
-
-/**
- * struct drm_wmv_surface_arg
- *
- * @sid: Surface id of created surface or surface to destroy or reference.
- * @handle_type: Handle type for DRM_VMW_REF_SURFACE Ioctl.
- *
- * Output data from the DRM_VMW_CREATE_SURFACE Ioctl.
- * Input argument to the DRM_VMW_UNREF_SURFACE Ioctl.
- * Input argument to the DRM_VMW_REF_SURFACE Ioctl.
- */
-
-struct drm_vmw_surface_arg {
- __s32 sid;
- enum drm_vmw_handle_type handle_type;
-};
-
-/**
- * struct drm_vmw_size ioctl.
- *
- * @width - mip level width
- * @height - mip level height
- * @depth - mip level depth
- *
- * Description of a mip level.
- * Input data to the DRM_WMW_CREATE_SURFACE Ioctl.
- */
-
-struct drm_vmw_size {
- __u32 width;
- __u32 height;
- __u32 depth;
- __u32 pad64;
-};
-
-/**
- * union drm_vmw_surface_create_arg
- *
- * @rep: Output data as described above.
- * @req: Input data as described above.
- *
- * Argument to the DRM_VMW_CREATE_SURFACE Ioctl.
- */
-
-union drm_vmw_surface_create_arg {
- struct drm_vmw_surface_arg rep;
- struct drm_vmw_surface_create_req req;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_REF_SURFACE - Reference a host surface.
- *
- * Puts a reference on a host surface with a give sid, as previously
- * returned by the DRM_VMW_CREATE_SURFACE ioctl.
- * A reference will make sure the surface isn't destroyed while we hold
- * it and will allow the calling client to use the surface ID in the command
- * stream.
- *
- * On successful return, the Ioctl returns the surface information given
- * in the DRM_VMW_CREATE_SURFACE ioctl.
- */
-
-/**
- * union drm_vmw_surface_reference_arg
- *
- * @rep: Output data as described above.
- * @req: Input data as described above.
- *
- * Argument to the DRM_VMW_REF_SURFACE Ioctl.
- */
-
-union drm_vmw_surface_reference_arg {
- struct drm_vmw_surface_create_req rep;
- struct drm_vmw_surface_arg req;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_UNREF_SURFACE - Unreference a host surface.
- *
- * Clear a reference previously put on a host surface.
- * When all references are gone, including the one implicitly placed
- * on creation,
- * a destroy surface command will be queued for the host.
- * Does not wait for completion.
- */
-
-/*************************************************************************/
-/**
- * DRM_VMW_EXECBUF
- *
- * Submit a command buffer for execution on the host, and return a
- * fence seqno that when signaled, indicates that the command buffer has
- * executed.
- */
-
-/**
- * struct drm_vmw_execbuf_arg
- *
- * @commands: User-space address of a command buffer cast to an __u64.
- * @command-size: Size in bytes of the command buffer.
- * @throttle-us: Sleep until software is less than @throttle_us
- * microseconds ahead of hardware. The driver may round this value
- * to the nearest kernel tick.
- * @fence_rep: User-space address of a struct drm_vmw_fence_rep cast to an
- * __u64.
- * @version: Allows expanding the execbuf ioctl parameters without breaking
- * backwards compatibility, since user-space will always tell the kernel
- * which version it uses.
- * @flags: Execbuf flags.
- * @imported_fence_fd: FD for a fence imported from another device
- *
- * Argument to the DRM_VMW_EXECBUF Ioctl.
- */
-
-#define DRM_VMW_EXECBUF_VERSION 2
-
-#define DRM_VMW_EXECBUF_FLAG_IMPORT_FENCE_FD (1 << 0)
-#define DRM_VMW_EXECBUF_FLAG_EXPORT_FENCE_FD (1 << 1)
-
-struct drm_vmw_execbuf_arg {
- __u64 commands;
- __u32 command_size;
- __u32 throttle_us;
- __u64 fence_rep;
- __u32 version;
- __u32 flags;
- __u32 context_handle;
- __s32 imported_fence_fd;
-};
-
-/**
- * struct drm_vmw_fence_rep
- *
- * @handle: Fence object handle for fence associated with a command submission.
- * @mask: Fence flags relevant for this fence object.
- * @seqno: Fence sequence number in fifo. A fence object with a lower
- * seqno will signal the EXEC flag before a fence object with a higher
- * seqno. This can be used by user-space to avoid kernel calls to determine
- * whether a fence has signaled the EXEC flag. Note that @seqno will
- * wrap at 32-bit.
- * @passed_seqno: The highest seqno number processed by the hardware
- * so far. This can be used to mark user-space fence objects as signaled, and
- * to determine whether a fence seqno might be stale.
- * @fd: FD associated with the fence, -1 if not exported
- * @error: This member should've been set to -EFAULT on submission.
- * The following actions should be take on completion:
- * error == -EFAULT: Fence communication failed. The host is synchronized.
- * Use the last fence id read from the FIFO fence register.
- * error != 0 && error != -EFAULT:
- * Fence submission failed. The host is synchronized. Use the fence_seq member.
- * error == 0: All is OK, The host may not be synchronized.
- * Use the fence_seq member.
- *
- * Input / Output data to the DRM_VMW_EXECBUF Ioctl.
- */
-
-struct drm_vmw_fence_rep {
- __u32 handle;
- __u32 mask;
- __u32 seqno;
- __u32 passed_seqno;
- __s32 fd;
- __s32 error;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_ALLOC_BO
- *
- * Allocate a buffer object that is visible also to the host.
- * NOTE: The buffer is
- * identified by a handle and an offset, which are private to the guest, but
- * useable in the command stream. The guest kernel may translate these
- * and patch up the command stream accordingly. In the future, the offset may
- * be zero at all times, or it may disappear from the interface before it is
- * fixed.
- *
- * The buffer object may stay user-space mapped in the guest at all times,
- * and is thus suitable for sub-allocation.
- *
- * Buffer objects are mapped using the mmap() syscall on the drm device.
- */
-
-/**
- * struct drm_vmw_alloc_bo_req
- *
- * @size: Required minimum size of the buffer.
- *
- * Input data to the DRM_VMW_ALLOC_BO Ioctl.
- */
-
-struct drm_vmw_alloc_bo_req {
- __u32 size;
- __u32 pad64;
-};
-#define drm_vmw_alloc_dmabuf_req drm_vmw_alloc_bo_req
-
-/**
- * struct drm_vmw_bo_rep
- *
- * @map_handle: Offset to use in the mmap() call used to map the buffer.
- * @handle: Handle unique to this buffer. Used for unreferencing.
- * @cur_gmr_id: GMR id to use in the command stream when this buffer is
- * referenced. See not above.
- * @cur_gmr_offset: Offset to use in the command stream when this buffer is
- * referenced. See note above.
- *
- * Output data from the DRM_VMW_ALLOC_BO Ioctl.
- */
-
-struct drm_vmw_bo_rep {
- __u64 map_handle;
- __u32 handle;
- __u32 cur_gmr_id;
- __u32 cur_gmr_offset;
- __u32 pad64;
-};
-#define drm_vmw_dmabuf_rep drm_vmw_bo_rep
-
-/**
- * union drm_vmw_alloc_bo_arg
- *
- * @req: Input data as described above.
- * @rep: Output data as described above.
- *
- * Argument to the DRM_VMW_ALLOC_BO Ioctl.
- */
-
-union drm_vmw_alloc_bo_arg {
- struct drm_vmw_alloc_bo_req req;
- struct drm_vmw_bo_rep rep;
-};
-#define drm_vmw_alloc_dmabuf_arg drm_vmw_alloc_bo_arg
-
-/*************************************************************************/
-/**
- * DRM_VMW_CONTROL_STREAM - Control overlays, aka streams.
- *
- * This IOCTL controls the overlay units of the svga device.
- * The SVGA overlay units does not work like regular hardware units in
- * that they do not automaticaly read back the contents of the given dma
- * buffer. But instead only read back for each call to this ioctl, and
- * at any point between this call being made and a following call that
- * either changes the buffer or disables the stream.
- */
-
-/**
- * struct drm_vmw_rect
- *
- * Defines a rectangle. Used in the overlay ioctl to define
- * source and destination rectangle.
- */
-
-struct drm_vmw_rect {
- __s32 x;
- __s32 y;
- __u32 w;
- __u32 h;
-};
-
-/**
- * struct drm_vmw_control_stream_arg
- *
- * @stream_id: Stearm to control
- * @enabled: If false all following arguments are ignored.
- * @handle: Handle to buffer for getting data from.
- * @format: Format of the overlay as understood by the host.
- * @width: Width of the overlay.
- * @height: Height of the overlay.
- * @size: Size of the overlay in bytes.
- * @pitch: Array of pitches, the two last are only used for YUV12 formats.
- * @offset: Offset from start of dma buffer to overlay.
- * @src: Source rect, must be within the defined area above.
- * @dst: Destination rect, x and y may be negative.
- *
- * Argument to the DRM_VMW_CONTROL_STREAM Ioctl.
- */
-
-struct drm_vmw_control_stream_arg {
- __u32 stream_id;
- __u32 enabled;
-
- __u32 flags;
- __u32 color_key;
-
- __u32 handle;
- __u32 offset;
- __s32 format;
- __u32 size;
- __u32 width;
- __u32 height;
- __u32 pitch[3];
-
- __u32 pad64;
- struct drm_vmw_rect src;
- struct drm_vmw_rect dst;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_CURSOR_BYPASS - Give extra information about cursor bypass.
- *
- */
-
-#define DRM_VMW_CURSOR_BYPASS_ALL (1 << 0)
-#define DRM_VMW_CURSOR_BYPASS_FLAGS (1)
-
-/**
- * struct drm_vmw_cursor_bypass_arg
- *
- * @flags: Flags.
- * @crtc_id: Crtc id, only used if DMR_CURSOR_BYPASS_ALL isn't passed.
- * @xpos: X position of cursor.
- * @ypos: Y position of cursor.
- * @xhot: X hotspot.
- * @yhot: Y hotspot.
- *
- * Argument to the DRM_VMW_CURSOR_BYPASS Ioctl.
- */
-
-struct drm_vmw_cursor_bypass_arg {
- __u32 flags;
- __u32 crtc_id;
- __s32 xpos;
- __s32 ypos;
- __s32 xhot;
- __s32 yhot;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_CLAIM_STREAM - Claim a single stream.
- */
-
-/**
- * struct drm_vmw_context_arg
- *
- * @stream_id: Device unique context ID.
- *
- * Output argument to the DRM_VMW_CREATE_CONTEXT Ioctl.
- * Input argument to the DRM_VMW_UNREF_CONTEXT Ioctl.
- */
-
-struct drm_vmw_stream_arg {
- __u32 stream_id;
- __u32 pad64;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_UNREF_STREAM - Unclaim a stream.
- *
- * Return a single stream that was claimed by this process. Also makes
- * sure that the stream has been stopped.
- */
-
-/*************************************************************************/
-/**
- * DRM_VMW_GET_3D_CAP
- *
- * Read 3D capabilities from the FIFO
- *
- */
-
-/**
- * struct drm_vmw_get_3d_cap_arg
- *
- * @buffer: Pointer to a buffer for capability data, cast to an __u64
- * @size: Max size to copy
- *
- * Input argument to the DRM_VMW_GET_3D_CAP_IOCTL
- * ioctls.
- */
-
-struct drm_vmw_get_3d_cap_arg {
- __u64 buffer;
- __u32 max_size;
- __u32 pad64;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_FENCE_WAIT
- *
- * Waits for a fence object to signal. The wait is interruptible, so that
- * signals may be delivered during the interrupt. The wait may timeout,
- * in which case the calls returns -EBUSY. If the wait is restarted,
- * that is restarting without resetting @cookie_valid to zero,
- * the timeout is computed from the first call.
- *
- * The flags argument to the DRM_VMW_FENCE_WAIT ioctl indicates what to wait
- * on:
- * DRM_VMW_FENCE_FLAG_EXEC: All commands ahead of the fence in the command
- * stream
- * have executed.
- * DRM_VMW_FENCE_FLAG_QUERY: All query results resulting from query finish
- * commands
- * in the buffer given to the EXECBUF ioctl returning the fence object handle
- * are available to user-space.
- *
- * DRM_VMW_WAIT_OPTION_UNREF: If this wait option is given, and the
- * fenc wait ioctl returns 0, the fence object has been unreferenced after
- * the wait.
- */
-
-#define DRM_VMW_FENCE_FLAG_EXEC (1 << 0)
-#define DRM_VMW_FENCE_FLAG_QUERY (1 << 1)
-
-#define DRM_VMW_WAIT_OPTION_UNREF (1 << 0)
-
-/**
- * struct drm_vmw_fence_wait_arg
- *
- * @handle: Fence object handle as returned by the DRM_VMW_EXECBUF ioctl.
- * @cookie_valid: Must be reset to 0 on first call. Left alone on restart.
- * @kernel_cookie: Set to 0 on first call. Left alone on restart.
- * @timeout_us: Wait timeout in microseconds. 0 for indefinite timeout.
- * @lazy: Set to 1 if timing is not critical. Allow more than a kernel tick
- * before returning.
- * @flags: Fence flags to wait on.
- * @wait_options: Options that control the behaviour of the wait ioctl.
- *
- * Input argument to the DRM_VMW_FENCE_WAIT ioctl.
- */
-
-struct drm_vmw_fence_wait_arg {
- __u32 handle;
- __s32 cookie_valid;
- __u64 kernel_cookie;
- __u64 timeout_us;
- __s32 lazy;
- __s32 flags;
- __s32 wait_options;
- __s32 pad64;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_FENCE_SIGNALED
- *
- * Checks if a fence object is signaled..
- */
-
-/**
- * struct drm_vmw_fence_signaled_arg
- *
- * @handle: Fence object handle as returned by the DRM_VMW_EXECBUF ioctl.
- * @flags: Fence object flags input to DRM_VMW_FENCE_SIGNALED ioctl
- * @signaled: Out: Flags signaled.
- * @sequence: Out: Highest sequence passed so far. Can be used to signal the
- * EXEC flag of user-space fence objects.
- *
- * Input/Output argument to the DRM_VMW_FENCE_SIGNALED and DRM_VMW_FENCE_UNREF
- * ioctls.
- */
-
-struct drm_vmw_fence_signaled_arg {
- __u32 handle;
- __u32 flags;
- __s32 signaled;
- __u32 passed_seqno;
- __u32 signaled_flags;
- __u32 pad64;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_FENCE_UNREF
- *
- * Unreferences a fence object, and causes it to be destroyed if there are no
- * other references to it.
- *
- */
-
-/**
- * struct drm_vmw_fence_arg
- *
- * @handle: Fence object handle as returned by the DRM_VMW_EXECBUF ioctl.
- *
- * Input/Output argument to the DRM_VMW_FENCE_UNREF ioctl..
- */
-
-struct drm_vmw_fence_arg {
- __u32 handle;
- __u32 pad64;
-};
-
-
-/*************************************************************************/
-/**
- * DRM_VMW_FENCE_EVENT
- *
- * Queues an event on a fence to be delivered on the drm character device
- * when the fence has signaled the DRM_VMW_FENCE_FLAG_EXEC flag.
- * Optionally the approximate time when the fence signaled is
- * given by the event.
- */
-
-/*
- * The event type
- */
-#define DRM_VMW_EVENT_FENCE_SIGNALED 0x80000000
-
-struct drm_vmw_event_fence {
- struct drm_event base;
- __u64 user_data;
- __u32 tv_sec;
- __u32 tv_usec;
-};
-
-/*
- * Flags that may be given to the command.
- */
-/* Request fence signaled time on the event. */
-#define DRM_VMW_FE_FLAG_REQ_TIME (1 << 0)
-
-/**
- * struct drm_vmw_fence_event_arg
- *
- * @fence_rep: Pointer to fence_rep structure cast to __u64 or 0 if
- * the fence is not supposed to be referenced by user-space.
- * @user_info: Info to be delivered with the event.
- * @handle: Attach the event to this fence only.
- * @flags: A set of flags as defined above.
- */
-struct drm_vmw_fence_event_arg {
- __u64 fence_rep;
- __u64 user_data;
- __u32 handle;
- __u32 flags;
-};
-
-
-/*************************************************************************/
-/**
- * DRM_VMW_PRESENT
- *
- * Executes an SVGA present on a given fb for a given surface. The surface
- * is placed on the framebuffer. Cliprects are given relative to the given
- * point (the point disignated by dest_{x|y}).
- *
- */
-
-/**
- * struct drm_vmw_present_arg
- * @fb_id: framebuffer id to present / read back from.
- * @sid: Surface id to present from.
- * @dest_x: X placement coordinate for surface.
- * @dest_y: Y placement coordinate for surface.
- * @clips_ptr: Pointer to an array of clip rects cast to an __u64.
- * @num_clips: Number of cliprects given relative to the framebuffer origin,
- * in the same coordinate space as the frame buffer.
- * @pad64: Unused 64-bit padding.
- *
- * Input argument to the DRM_VMW_PRESENT ioctl.
- */
-
-struct drm_vmw_present_arg {
- __u32 fb_id;
- __u32 sid;
- __s32 dest_x;
- __s32 dest_y;
- __u64 clips_ptr;
- __u32 num_clips;
- __u32 pad64;
-};
-
-
-/*************************************************************************/
-/**
- * DRM_VMW_PRESENT_READBACK
- *
- * Executes an SVGA present readback from a given fb to the dma buffer
- * currently bound as the fb. If there is no dma buffer bound to the fb,
- * an error will be returned.
- *
- */
-
-/**
- * struct drm_vmw_present_arg
- * @fb_id: fb_id to present / read back from.
- * @num_clips: Number of cliprects.
- * @clips_ptr: Pointer to an array of clip rects cast to an __u64.
- * @fence_rep: Pointer to a struct drm_vmw_fence_rep, cast to an __u64.
- * If this member is NULL, then the ioctl should not return a fence.
- */
-
-struct drm_vmw_present_readback_arg {
- __u32 fb_id;
- __u32 num_clips;
- __u64 clips_ptr;
- __u64 fence_rep;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_UPDATE_LAYOUT - Update layout
- *
- * Updates the preferred modes and connection status for connectors. The
- * command consists of one drm_vmw_update_layout_arg pointing to an array
- * of num_outputs drm_vmw_rect's.
- */
-
-/**
- * struct drm_vmw_update_layout_arg
- *
- * @num_outputs: number of active connectors
- * @rects: pointer to array of drm_vmw_rect cast to an __u64
- *
- * Input argument to the DRM_VMW_UPDATE_LAYOUT Ioctl.
- */
-struct drm_vmw_update_layout_arg {
- __u32 num_outputs;
- __u32 pad64;
- __u64 rects;
-};
-
-
-/*************************************************************************/
-/**
- * DRM_VMW_CREATE_SHADER - Create shader
- *
- * Creates a shader and optionally binds it to a dma buffer containing
- * the shader byte-code.
- */
-
-/**
- * enum drm_vmw_shader_type - Shader types
- */
-enum drm_vmw_shader_type {
- drm_vmw_shader_type_vs = 0,
- drm_vmw_shader_type_ps,
-};
-
-
-/**
- * struct drm_vmw_shader_create_arg
- *
- * @shader_type: Shader type of the shader to create.
- * @size: Size of the byte-code in bytes.
- * where the shader byte-code starts
- * @buffer_handle: Buffer handle identifying the buffer containing the
- * shader byte-code
- * @shader_handle: On successful completion contains a handle that
- * can be used to subsequently identify the shader.
- * @offset: Offset in bytes into the buffer given by @buffer_handle,
- *
- * Input / Output argument to the DRM_VMW_CREATE_SHADER Ioctl.
- */
-struct drm_vmw_shader_create_arg {
- enum drm_vmw_shader_type shader_type;
- __u32 size;
- __u32 buffer_handle;
- __u32 shader_handle;
- __u64 offset;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_UNREF_SHADER - Unreferences a shader
- *
- * Destroys a user-space reference to a shader, optionally destroying
- * it.
- */
-
-/**
- * struct drm_vmw_shader_arg
- *
- * @handle: Handle identifying the shader to destroy.
- *
- * Input argument to the DRM_VMW_UNREF_SHADER ioctl.
- */
-struct drm_vmw_shader_arg {
- __u32 handle;
- __u32 pad64;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_GB_SURFACE_CREATE - Create a host guest-backed surface.
- *
- * Allocates a surface handle and queues a create surface command
- * for the host on the first use of the surface. The surface ID can
- * be used as the surface ID in commands referencing the surface.
- */
-
-/**
- * enum drm_vmw_surface_flags
- *
- * @drm_vmw_surface_flag_shareable: Whether the surface is shareable
- * @drm_vmw_surface_flag_scanout: Whether the surface is a scanout
- * surface.
- * @drm_vmw_surface_flag_create_buffer: Create a backup buffer if none is
- * given.
- */
-enum drm_vmw_surface_flags {
- drm_vmw_surface_flag_shareable = (1 << 0),
- drm_vmw_surface_flag_scanout = (1 << 1),
- drm_vmw_surface_flag_create_buffer = (1 << 2)
-};
-
-/**
- * struct drm_vmw_gb_surface_create_req
- *
- * @svga3d_flags: SVGA3d surface flags for the device.
- * @format: SVGA3d format.
- * @mip_level: Number of mip levels for all faces.
- * @drm_surface_flags Flags as described above.
- * @multisample_count Future use. Set to 0.
- * @autogen_filter Future use. Set to 0.
- * @buffer_handle Buffer handle of backup buffer. SVGA3D_INVALID_ID
- * if none.
- * @base_size Size of the base mip level for all faces.
- * @array_size Must be zero for non-DX hardware, and if non-zero
- * svga3d_flags must have proper bind flags setup.
- *
- * Input argument to the DRM_VMW_GB_SURFACE_CREATE Ioctl.
- * Part of output argument for the DRM_VMW_GB_SURFACE_REF Ioctl.
- */
-struct drm_vmw_gb_surface_create_req {
- __u32 svga3d_flags;
- __u32 format;
- __u32 mip_levels;
- enum drm_vmw_surface_flags drm_surface_flags;
- __u32 multisample_count;
- __u32 autogen_filter;
- __u32 buffer_handle;
- __u32 array_size;
- struct drm_vmw_size base_size;
-};
-
-/**
- * struct drm_vmw_gb_surface_create_rep
- *
- * @handle: Surface handle.
- * @backup_size: Size of backup buffers for this surface.
- * @buffer_handle: Handle of backup buffer. SVGA3D_INVALID_ID if none.
- * @buffer_size: Actual size of the buffer identified by
- * @buffer_handle
- * @buffer_map_handle: Offset into device address space for the buffer
- * identified by @buffer_handle.
- *
- * Part of output argument for the DRM_VMW_GB_SURFACE_REF ioctl.
- * Output argument for the DRM_VMW_GB_SURFACE_CREATE ioctl.
- */
-struct drm_vmw_gb_surface_create_rep {
- __u32 handle;
- __u32 backup_size;
- __u32 buffer_handle;
- __u32 buffer_size;
- __u64 buffer_map_handle;
-};
-
-/**
- * union drm_vmw_gb_surface_create_arg
- *
- * @req: Input argument as described above.
- * @rep: Output argument as described above.
- *
- * Argument to the DRM_VMW_GB_SURFACE_CREATE ioctl.
- */
-union drm_vmw_gb_surface_create_arg {
- struct drm_vmw_gb_surface_create_rep rep;
- struct drm_vmw_gb_surface_create_req req;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_GB_SURFACE_REF - Reference a host surface.
- *
- * Puts a reference on a host surface with a given handle, as previously
- * returned by the DRM_VMW_GB_SURFACE_CREATE ioctl.
- * A reference will make sure the surface isn't destroyed while we hold
- * it and will allow the calling client to use the surface handle in
- * the command stream.
- *
- * On successful return, the Ioctl returns the surface information given
- * to and returned from the DRM_VMW_GB_SURFACE_CREATE ioctl.
- */
-
-/**
- * struct drm_vmw_gb_surface_reference_arg
- *
- * @creq: The data used as input when the surface was created, as described
- * above at "struct drm_vmw_gb_surface_create_req"
- * @crep: Additional data output when the surface was created, as described
- * above at "struct drm_vmw_gb_surface_create_rep"
- *
- * Output Argument to the DRM_VMW_GB_SURFACE_REF ioctl.
- */
-struct drm_vmw_gb_surface_ref_rep {
- struct drm_vmw_gb_surface_create_req creq;
- struct drm_vmw_gb_surface_create_rep crep;
-};
-
-/**
- * union drm_vmw_gb_surface_reference_arg
- *
- * @req: Input data as described above at "struct drm_vmw_surface_arg"
- * @rep: Output data as described above at "struct drm_vmw_gb_surface_ref_rep"
- *
- * Argument to the DRM_VMW_GB_SURFACE_REF Ioctl.
- */
-union drm_vmw_gb_surface_reference_arg {
- struct drm_vmw_gb_surface_ref_rep rep;
- struct drm_vmw_surface_arg req;
-};
-
-
-/*************************************************************************/
-/**
- * DRM_VMW_SYNCCPU - Sync a DMA buffer / MOB for CPU access.
- *
- * Idles any previously submitted GPU operations on the buffer and
- * by default blocks command submissions that reference the buffer.
- * If the file descriptor used to grab a blocking CPU sync is closed, the
- * cpu sync is released.
- * The flags argument indicates how the grab / release operation should be
- * performed:
- */
-
-/**
- * enum drm_vmw_synccpu_flags - Synccpu flags:
- *
- * @drm_vmw_synccpu_read: Sync for read. If sync is done for read only, it's a
- * hint to the kernel to allow command submissions that references the buffer
- * for read-only.
- * @drm_vmw_synccpu_write: Sync for write. Block all command submissions
- * referencing this buffer.
- * @drm_vmw_synccpu_dontblock: Dont wait for GPU idle, but rather return
- * -EBUSY should the buffer be busy.
- * @drm_vmw_synccpu_allow_cs: Allow command submission that touches the buffer
- * while the buffer is synced for CPU. This is similar to the GEM bo idle
- * behavior.
- */
-enum drm_vmw_synccpu_flags {
- drm_vmw_synccpu_read = (1 << 0),
- drm_vmw_synccpu_write = (1 << 1),
- drm_vmw_synccpu_dontblock = (1 << 2),
- drm_vmw_synccpu_allow_cs = (1 << 3)
-};
-
-/**
- * enum drm_vmw_synccpu_op - Synccpu operations:
- *
- * @drm_vmw_synccpu_grab: Grab the buffer for CPU operations
- * @drm_vmw_synccpu_release: Release a previous grab.
- */
-enum drm_vmw_synccpu_op {
- drm_vmw_synccpu_grab,
- drm_vmw_synccpu_release
-};
-
-/**
- * struct drm_vmw_synccpu_arg
- *
- * @op: The synccpu operation as described above.
- * @handle: Handle identifying the buffer object.
- * @flags: Flags as described above.
- */
-struct drm_vmw_synccpu_arg {
- enum drm_vmw_synccpu_op op;
- enum drm_vmw_synccpu_flags flags;
- __u32 handle;
- __u32 pad64;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_CREATE_EXTENDED_CONTEXT - Create a host context.
- *
- * Allocates a device unique context id, and queues a create context command
- * for the host. Does not wait for host completion.
- */
-enum drm_vmw_extended_context {
- drm_vmw_context_legacy,
- drm_vmw_context_dx
-};
-
-/**
- * union drm_vmw_extended_context_arg
- *
- * @req: Context type.
- * @rep: Context identifier.
- *
- * Argument to the DRM_VMW_CREATE_EXTENDED_CONTEXT Ioctl.
- */
-union drm_vmw_extended_context_arg {
- enum drm_vmw_extended_context req;
- struct drm_vmw_context_arg rep;
-};
-
-/*************************************************************************/
-/*
- * DRM_VMW_HANDLE_CLOSE - Close a user-space handle and release its
- * underlying resource.
- *
- * Note that this ioctl is overlaid on the deprecated DRM_VMW_UNREF_DMABUF
- * Ioctl.
- */
-
-/**
- * struct drm_vmw_handle_close_arg
- *
- * @handle: Handle to close.
- *
- * Argument to the DRM_VMW_HANDLE_CLOSE Ioctl.
- */
-struct drm_vmw_handle_close_arg {
- __u32 handle;
- __u32 pad64;
-};
-#define drm_vmw_unref_dmabuf_arg drm_vmw_handle_close_arg
-
-/*************************************************************************/
-/**
- * DRM_VMW_GB_SURFACE_CREATE_EXT - Create a host guest-backed surface.
- *
- * Allocates a surface handle and queues a create surface command
- * for the host on the first use of the surface. The surface ID can
- * be used as the surface ID in commands referencing the surface.
- *
- * This new command extends DRM_VMW_GB_SURFACE_CREATE by adding version
- * parameter and 64 bit svga flag.
- */
-
-/**
- * enum drm_vmw_surface_version
- *
- * @drm_vmw_surface_gb_v1: Corresponds to current gb surface format with
- * svga3d surface flags split into 2, upper half and lower half.
- */
-enum drm_vmw_surface_version {
- drm_vmw_gb_surface_v1
-};
-
-/**
- * struct drm_vmw_gb_surface_create_ext_req
- *
- * @base: Surface create parameters.
- * @version: Version of surface create ioctl.
- * @svga3d_flags_upper_32_bits: Upper 32 bits of svga3d flags.
- * @multisample_pattern: Multisampling pattern when msaa is supported.
- * @quality_level: Precision settings for each sample.
- * @must_be_zero: Reserved for future usage.
- *
- * Input argument to the DRM_VMW_GB_SURFACE_CREATE_EXT Ioctl.
- * Part of output argument for the DRM_VMW_GB_SURFACE_REF_EXT Ioctl.
- */
-struct drm_vmw_gb_surface_create_ext_req {
- struct drm_vmw_gb_surface_create_req base;
- enum drm_vmw_surface_version version;
- uint32_t svga3d_flags_upper_32_bits;
- SVGA3dMSPattern multisample_pattern;
- SVGA3dMSQualityLevel quality_level;
- uint64_t must_be_zero;
-};
-
-/**
- * union drm_vmw_gb_surface_create_ext_arg
- *
- * @req: Input argument as described above.
- * @rep: Output argument as described above.
- *
- * Argument to the DRM_VMW_GB_SURFACE_CREATE_EXT ioctl.
- */
-union drm_vmw_gb_surface_create_ext_arg {
- struct drm_vmw_gb_surface_create_rep rep;
- struct drm_vmw_gb_surface_create_ext_req req;
-};
-
-/*************************************************************************/
-/**
- * DRM_VMW_GB_SURFACE_REF_EXT - Reference a host surface.
- *
- * Puts a reference on a host surface with a given handle, as previously
- * returned by the DRM_VMW_GB_SURFACE_CREATE_EXT ioctl.
- * A reference will make sure the surface isn't destroyed while we hold
- * it and will allow the calling client to use the surface handle in
- * the command stream.
- *
- * On successful return, the Ioctl returns the surface information given
- * to and returned from the DRM_VMW_GB_SURFACE_CREATE_EXT ioctl.
- */
-
-/**
- * struct drm_vmw_gb_surface_ref_ext_rep
- *
- * @creq: The data used as input when the surface was created, as described
- * above at "struct drm_vmw_gb_surface_create_ext_req"
- * @crep: Additional data output when the surface was created, as described
- * above at "struct drm_vmw_gb_surface_create_rep"
- *
- * Output Argument to the DRM_VMW_GB_SURFACE_REF_EXT ioctl.
- */
-struct drm_vmw_gb_surface_ref_ext_rep {
- struct drm_vmw_gb_surface_create_ext_req creq;
- struct drm_vmw_gb_surface_create_rep crep;
-};
-
-/**
- * union drm_vmw_gb_surface_reference_ext_arg
- *
- * @req: Input data as described above at "struct drm_vmw_surface_arg"
- * @rep: Output data as described above at
- * "struct drm_vmw_gb_surface_ref_ext_rep"
- *
- * Argument to the DRM_VMW_GB_SURFACE_REF Ioctl.
- */
-union drm_vmw_gb_surface_reference_ext_arg {
- struct drm_vmw_gb_surface_ref_ext_rep rep;
- struct drm_vmw_surface_arg req;
-};
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/elf.h b/lib/libc/include/generic-musl/elf.h
index 33da3f957838eec1094df9918b34690913a4d24d..7ab2c85fe23c58c30e50480ef6fec732e8e9baf2 100644
--- a/lib/libc/include/generic-musl/elf.h
+++ b/lib/libc/include/generic-musl/elf.h
@@ -314,7 +314,8 @@ typedef struct {
#define EM_AMDGPU 224
#define EM_RISCV 243
#define EM_BPF 247
-#define EM_NUM 248
+#define EM_CSKY 252
+#define EM_NUM 253
#define EM_ALPHA 0x9026
@@ -681,11 +682,17 @@ typedef struct {
#define NT_ARM_HW_WATCH 0x403
#define NT_ARM_SYSTEM_CALL 0x404
#define NT_ARM_SVE 0x405
+#define NT_ARM_PAC_MASK 0x406
+#define NT_ARM_PACA_KEYS 0x407
+#define NT_ARM_PACG_KEYS 0x408
#define NT_METAG_CBUF 0x500
#define NT_METAG_RPIPE 0x501
#define NT_METAG_TLS 0x502
#define NT_ARC_V2 0x600
#define NT_VMCOREDD 0x700
+#define NT_MIPS_DSP 0x800
+#define NT_MIPS_FP_MODE 0x801
+#define NT_MIPS_MSA 0x802
#define NT_VERSION 1
@@ -2619,6 +2626,61 @@ enum
#define R_ARM_NUM 256
+#define R_CKCORE_NONE 0
+#define R_CKCORE_ADDR32 1
+#define R_CKCORE_PCRELIMM8BY4 2
+#define R_CKCORE_PCRELIMM11BY2 3
+#define R_CKCORE_PCREL32 5
+#define R_CKCORE_PCRELJSR_IMM11BY2 6
+#define R_CKCORE_RELATIVE 9
+#define R_CKCORE_COPY 10
+#define R_CKCORE_GLOB_DAT 11
+#define R_CKCORE_JUMP_SLOT 12
+#define R_CKCORE_GOTOFF 13
+#define R_CKCORE_GOTPC 14
+#define R_CKCORE_GOT32 15
+#define R_CKCORE_PLT32 16
+#define R_CKCORE_ADDRGOT 17
+#define R_CKCORE_ADDRPLT 18
+#define R_CKCORE_PCREL_IMM26BY2 19
+#define R_CKCORE_PCREL_IMM16BY2 20
+#define R_CKCORE_PCREL_IMM16BY4 21
+#define R_CKCORE_PCREL_IMM10BY2 22
+#define R_CKCORE_PCREL_IMM10BY4 23
+#define R_CKCORE_ADDR_HI16 24
+#define R_CKCORE_ADDR_LO16 25
+#define R_CKCORE_GOTPC_HI16 26
+#define R_CKCORE_GOTPC_LO16 27
+#define R_CKCORE_GOTOFF_HI16 28
+#define R_CKCORE_GOTOFF_LO16 29
+#define R_CKCORE_GOT12 30
+#define R_CKCORE_GOT_HI16 31
+#define R_CKCORE_GOT_LO16 32
+#define R_CKCORE_PLT12 33
+#define R_CKCORE_PLT_HI16 34
+#define R_CKCORE_PLT_LO16 35
+#define R_CKCORE_ADDRGOT_HI16 36
+#define R_CKCORE_ADDRGOT_LO16 37
+#define R_CKCORE_ADDRPLT_HI16 38
+#define R_CKCORE_ADDRPLT_LO16 39
+#define R_CKCORE_PCREL_JSR_IMM26BY2 40
+#define R_CKCORE_TOFFSET_LO16 41
+#define R_CKCORE_DOFFSET_LO16 42
+#define R_CKCORE_PCREL_IMM18BY2 43
+#define R_CKCORE_DOFFSET_IMM18 44
+#define R_CKCORE_DOFFSET_IMM18BY2 45
+#define R_CKCORE_DOFFSET_IMM18BY4 46
+#define R_CKCORE_GOT_IMM18BY4 48
+#define R_CKCORE_PLT_IMM18BY4 49
+#define R_CKCORE_PCREL_IMM7BY4 50
+#define R_CKCORE_TLS_LE32 51
+#define R_CKCORE_TLS_IE32 52
+#define R_CKCORE_TLS_GD32 53
+#define R_CKCORE_TLS_LDM32 54
+#define R_CKCORE_TLS_LDO32 55
+#define R_CKCORE_TLS_DTPMOD32 56
+#define R_CKCORE_TLS_DTPOFF32 57
+#define R_CKCORE_TLS_TPOFF32 58
#define EF_IA_64_MASKOS 0x0000000f
@@ -3166,6 +3228,62 @@ enum
#define R_BPF_NONE 0
#define R_BPF_MAP_FD 1
+#define R_RISCV_NONE 0
+#define R_RISCV_32 1
+#define R_RISCV_64 2
+#define R_RISCV_RELATIVE 3
+#define R_RISCV_COPY 4
+#define R_RISCV_JUMP_SLOT 5
+#define R_RISCV_TLS_DTPMOD32 6
+#define R_RISCV_TLS_DTPMOD64 7
+#define R_RISCV_TLS_DTPREL32 8
+#define R_RISCV_TLS_DTPREL64 9
+#define R_RISCV_TLS_TPREL32 10
+#define R_RISCV_TLS_TPREL64 11
+
+#define R_RISCV_BRANCH 16
+#define R_RISCV_JAL 17
+#define R_RISCV_CALL 18
+#define R_RISCV_CALL_PLT 19
+#define R_RISCV_GOT_HI20 20
+#define R_RISCV_TLS_GOT_HI20 21
+#define R_RISCV_TLS_GD_HI20 22
+#define R_RISCV_PCREL_HI20 23
+#define R_RISCV_PCREL_LO12_I 24
+#define R_RISCV_PCREL_LO12_S 25
+#define R_RISCV_HI20 26
+#define R_RISCV_LO12_I 27
+#define R_RISCV_LO12_S 28
+#define R_RISCV_TPREL_HI20 29
+#define R_RISCV_TPREL_LO12_I 30
+#define R_RISCV_TPREL_LO12_S 31
+#define R_RISCV_TPREL_ADD 32
+#define R_RISCV_ADD8 33
+#define R_RISCV_ADD16 34
+#define R_RISCV_ADD32 35
+#define R_RISCV_ADD64 36
+#define R_RISCV_SUB8 37
+#define R_RISCV_SUB16 38
+#define R_RISCV_SUB32 39
+#define R_RISCV_SUB64 40
+#define R_RISCV_GNU_VTINHERIT 41
+#define R_RISCV_GNU_VTENTRY 42
+#define R_RISCV_ALIGN 43
+#define R_RISCV_RVC_BRANCH 44
+#define R_RISCV_RVC_JUMP 45
+#define R_RISCV_RVC_LUI 46
+#define R_RISCV_GPREL_I 47
+#define R_RISCV_GPREL_S 48
+#define R_RISCV_TPREL_I 49
+#define R_RISCV_TPREL_S 50
+#define R_RISCV_RELAX 51
+#define R_RISCV_SUB6 52
+#define R_RISCV_SET6 53
+#define R_RISCV_SET8 54
+#define R_RISCV_SET16 55
+#define R_RISCV_SET32 56
+#define R_RISCV_32_PCREL 57
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/libc/include/generic-musl/fcntl.h b/lib/libc/include/generic-musl/fcntl.h
index c27871cccec211c8751611270397a8d67273e813..2723d0cf0aef5f2647a1d18e13f54b3b800b41dd 100644
--- a/lib/libc/include/generic-musl/fcntl.h
+++ b/lib/libc/include/generic-musl/fcntl.h
@@ -36,8 +36,9 @@ int openat(int, const char *, int, ...);
int posix_fadvise(int, off_t, off_t, int);
int posix_fallocate(int, off_t, off_t);
-#define O_SEARCH O_PATH
-#define O_EXEC O_PATH
+#define O_SEARCH O_PATH
+#define O_EXEC O_PATH
+#define O_TTY_INIT 0
#define O_ACCMODE (03|O_SEARCH)
#define O_RDONLY 00
@@ -66,8 +67,10 @@ int posix_fallocate(int, off_t, off_t);
#define POSIX_FADV_RANDOM 1
#define POSIX_FADV_SEQUENTIAL 2
#define POSIX_FADV_WILLNEED 3
+#ifndef POSIX_FADV_DONTNEED
#define POSIX_FADV_DONTNEED 4
#define POSIX_FADV_NOREUSE 5
+#endif
#undef SEEK_SET
#undef SEEK_CUR
@@ -126,6 +129,7 @@ int posix_fallocate(int, off_t, off_t);
#define F_SEAL_SHRINK 0x0002
#define F_SEAL_GROW 0x0004
#define F_SEAL_WRITE 0x0008
+#define F_SEAL_FUTURE_WRITE 0x0010
#define F_GET_RW_HINT 1035
#define F_SET_RW_HINT 1036
diff --git a/lib/libc/include/generic-musl/math.h b/lib/libc/include/generic-musl/math.h
index 20fb2704ace98d121a80bf476a47fa004a66ecb6..f7e8058639257e5b463da7a414200f0b0e5f8b38 100644
--- a/lib/libc/include/generic-musl/math.h
+++ b/lib/libc/include/generic-musl/math.h
@@ -36,6 +36,18 @@ extern "C" {
#define FP_SUBNORMAL 3
#define FP_NORMAL 4
+#ifdef __FP_FAST_FMA
+#define FP_FAST_FMA 1
+#endif
+
+#ifdef __FP_FAST_FMAF
+#define FP_FAST_FMAF 1
+#endif
+
+#ifdef __FP_FAST_FMAL
+#define FP_FAST_FMAL 1
+#endif
+
int __fpclassify(double);
int __fpclassifyf(float);
int __fpclassifyl(long double);
diff --git a/lib/libc/include/generic-musl/misc/cxl.h b/lib/libc/include/generic-musl/misc/cxl.h
deleted file mode 100644
index dc3542e62be5163771f72f13bc99f5d5a74f2825..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/misc/cxl.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
-/*
- * Copyright 2014 IBM Corp.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#ifndef _MISC_CXL_H
-#define _MISC_CXL_H
-
-#include
-#include
-
-
-struct cxl_ioctl_start_work {
- __u64 flags;
- __u64 work_element_descriptor;
- __u64 amr;
- __s16 num_interrupts;
- __u16 tid;
- __s32 reserved1;
- __u64 reserved2;
- __u64 reserved3;
- __u64 reserved4;
- __u64 reserved5;
-};
-
-#define CXL_START_WORK_AMR 0x0000000000000001ULL
-#define CXL_START_WORK_NUM_IRQS 0x0000000000000002ULL
-#define CXL_START_WORK_ERR_FF 0x0000000000000004ULL
-#define CXL_START_WORK_TID 0x0000000000000008ULL
-#define CXL_START_WORK_ALL (CXL_START_WORK_AMR |\
- CXL_START_WORK_NUM_IRQS |\
- CXL_START_WORK_ERR_FF |\
- CXL_START_WORK_TID)
-
-
-/* Possible modes that an afu can be in */
-#define CXL_MODE_DEDICATED 0x1
-#define CXL_MODE_DIRECTED 0x2
-
-/* possible flags for the cxl_afu_id flags field */
-#define CXL_AFUID_FLAG_SLAVE 0x1 /* In directed-mode afu is in slave mode */
-
-struct cxl_afu_id {
- __u64 flags; /* One of CXL_AFUID_FLAG_X */
- __u32 card_id;
- __u32 afu_offset;
- __u32 afu_mode; /* one of the CXL_MODE_X */
- __u32 reserved1;
- __u64 reserved2;
- __u64 reserved3;
- __u64 reserved4;
- __u64 reserved5;
- __u64 reserved6;
-};
-
-/* base adapter image header is included in the image */
-#define CXL_AI_NEED_HEADER 0x0000000000000001ULL
-#define CXL_AI_ALL CXL_AI_NEED_HEADER
-
-#define CXL_AI_HEADER_SIZE 128
-#define CXL_AI_BUFFER_SIZE 4096
-#define CXL_AI_MAX_ENTRIES 256
-#define CXL_AI_MAX_CHUNK_SIZE (CXL_AI_BUFFER_SIZE * CXL_AI_MAX_ENTRIES)
-
-struct cxl_adapter_image {
- __u64 flags;
- __u64 data;
- __u64 len_data;
- __u64 len_image;
- __u64 reserved1;
- __u64 reserved2;
- __u64 reserved3;
- __u64 reserved4;
-};
-
-/* ioctl numbers */
-#define CXL_MAGIC 0xCA
-/* AFU devices */
-#define CXL_IOCTL_START_WORK _IOW(CXL_MAGIC, 0x00, struct cxl_ioctl_start_work)
-#define CXL_IOCTL_GET_PROCESS_ELEMENT _IOR(CXL_MAGIC, 0x01, __u32)
-#define CXL_IOCTL_GET_AFU_ID _IOR(CXL_MAGIC, 0x02, struct cxl_afu_id)
-/* adapter devices */
-#define CXL_IOCTL_DOWNLOAD_IMAGE _IOW(CXL_MAGIC, 0x0A, struct cxl_adapter_image)
-#define CXL_IOCTL_VALIDATE_IMAGE _IOW(CXL_MAGIC, 0x0B, struct cxl_adapter_image)
-
-#define CXL_READ_MIN_SIZE 0x1000 /* 4K */
-
-/* Events from read() */
-enum cxl_event_type {
- CXL_EVENT_RESERVED = 0,
- CXL_EVENT_AFU_INTERRUPT = 1,
- CXL_EVENT_DATA_STORAGE = 2,
- CXL_EVENT_AFU_ERROR = 3,
- CXL_EVENT_AFU_DRIVER = 4,
-};
-
-struct cxl_event_header {
- __u16 type;
- __u16 size;
- __u16 process_element;
- __u16 reserved1;
-};
-
-struct cxl_event_afu_interrupt {
- __u16 flags;
- __u16 irq; /* Raised AFU interrupt number */
- __u32 reserved1;
-};
-
-struct cxl_event_data_storage {
- __u16 flags;
- __u16 reserved1;
- __u32 reserved2;
- __u64 addr;
- __u64 dsisr;
- __u64 reserved3;
-};
-
-struct cxl_event_afu_error {
- __u16 flags;
- __u16 reserved1;
- __u32 reserved2;
- __u64 error;
-};
-
-struct cxl_event_afu_driver_reserved {
- /*
- * Defines the buffer passed to the cxl driver by the AFU driver.
- *
- * This is not ABI since the event header.size passed to the user for
- * existing events is set in the read call to sizeof(cxl_event_header)
- * + sizeof(whatever event is being dispatched) and the user is already
- * required to use a 4K buffer on the read call.
- *
- * Of course the contents will be ABI, but that's up the AFU driver.
- */
- __u32 data_size;
- __u8 data[];
-};
-
-struct cxl_event {
- struct cxl_event_header header;
- union {
- struct cxl_event_afu_interrupt irq;
- struct cxl_event_data_storage fault;
- struct cxl_event_afu_error afu_error;
- struct cxl_event_afu_driver_reserved afu_driver_event;
- };
-};
-
-#endif /* _MISC_CXL_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/misc/ocxl.h b/lib/libc/include/generic-musl/misc/ocxl.h
deleted file mode 100644
index dbf9e21208b897db016ce67da0105c6d48747283..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/misc/ocxl.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
-/* Copyright 2017 IBM Corp. */
-#ifndef _MISC_OCXL_H
-#define _MISC_OCXL_H
-
-#include
-#include
-
-enum ocxl_event_type {
- OCXL_AFU_EVENT_XSL_FAULT_ERROR = 0,
-};
-
-#define OCXL_KERNEL_EVENT_FLAG_LAST 0x0001 /* This is the last event pending */
-
-struct ocxl_kernel_event_header {
- __u16 type;
- __u16 flags;
- __u32 reserved;
-};
-
-struct ocxl_kernel_event_xsl_fault_error {
- __u64 addr;
- __u64 dsisr;
- __u64 count;
- __u64 reserved;
-};
-
-struct ocxl_ioctl_attach {
- __u64 amr;
- __u64 reserved1;
- __u64 reserved2;
- __u64 reserved3;
-};
-
-struct ocxl_ioctl_metadata {
- __u16 version; // struct version, always backwards compatible
-
- // Version 0 fields
- __u8 afu_version_major;
- __u8 afu_version_minor;
- __u32 pasid; // PASID assigned to the current context
-
- __u64 pp_mmio_size; // Per PASID MMIO size
- __u64 global_mmio_size;
-
- // End version 0 fields
-
- __u64 reserved[13]; // Total of 16*u64
-};
-
-struct ocxl_ioctl_p9_wait {
- __u16 thread_id; // The thread ID required to wake this thread
- __u16 reserved1;
- __u32 reserved2;
- __u64 reserved3[3];
-};
-
-#define OCXL_IOCTL_FEATURES_FLAGS0_P9_WAIT 0x01
-struct ocxl_ioctl_features {
- __u64 flags[4];
-};
-
-struct ocxl_ioctl_irq_fd {
- __u64 irq_offset;
- __s32 eventfd;
- __u32 reserved;
-};
-
-/* ioctl numbers */
-#define OCXL_MAGIC 0xCA
-/* AFU devices */
-#define OCXL_IOCTL_ATTACH _IOW(OCXL_MAGIC, 0x10, struct ocxl_ioctl_attach)
-#define OCXL_IOCTL_IRQ_ALLOC _IOR(OCXL_MAGIC, 0x11, __u64)
-#define OCXL_IOCTL_IRQ_FREE _IOW(OCXL_MAGIC, 0x12, __u64)
-#define OCXL_IOCTL_IRQ_SET_FD _IOW(OCXL_MAGIC, 0x13, struct ocxl_ioctl_irq_fd)
-#define OCXL_IOCTL_GET_METADATA _IOR(OCXL_MAGIC, 0x14, struct ocxl_ioctl_metadata)
-#define OCXL_IOCTL_ENABLE_P9_WAIT _IOR(OCXL_MAGIC, 0x15, struct ocxl_ioctl_p9_wait)
-#define OCXL_IOCTL_GET_FEATURES _IOR(OCXL_MAGIC, 0x16, struct ocxl_ioctl_features)
-
-#endif /* _MISC_OCXL_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/mtd/inftl-user.h b/lib/libc/include/generic-musl/mtd/inftl-user.h
deleted file mode 100644
index 3f602e167476bb8b0f16f6500c45d741285f31d7..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/mtd/inftl-user.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
- * Parts of INFTL headers shared with userspace
- *
- */
-
-#ifndef __MTD_INFTL_USER_H__
-#define __MTD_INFTL_USER_H__
-
-#include
-
-#define OSAK_VERSION 0x5120
-#define PERCENTUSED 98
-
-#define SECTORSIZE 512
-
-/* Block Control Information */
-
-struct inftl_bci {
- __u8 ECCsig[6];
- __u8 Status;
- __u8 Status1;
-} __attribute__((packed));
-
-struct inftl_unithead1 {
- __u16 virtualUnitNo;
- __u16 prevUnitNo;
- __u8 ANAC;
- __u8 NACs;
- __u8 parityPerField;
- __u8 discarded;
-} __attribute__((packed));
-
-struct inftl_unithead2 {
- __u8 parityPerField;
- __u8 ANAC;
- __u16 prevUnitNo;
- __u16 virtualUnitNo;
- __u8 NACs;
- __u8 discarded;
-} __attribute__((packed));
-
-struct inftl_unittail {
- __u8 Reserved[4];
- __u16 EraseMark;
- __u16 EraseMark1;
-} __attribute__((packed));
-
-union inftl_uci {
- struct inftl_unithead1 a;
- struct inftl_unithead2 b;
- struct inftl_unittail c;
-};
-
-struct inftl_oob {
- struct inftl_bci b;
- union inftl_uci u;
-};
-
-
-/* INFTL Media Header */
-
-struct INFTLPartition {
- __u32 virtualUnits;
- __u32 firstUnit;
- __u32 lastUnit;
- __u32 flags;
- __u32 spareUnits;
- __u32 Reserved0;
- __u32 Reserved1;
-} __attribute__((packed));
-
-struct INFTLMediaHeader {
- char bootRecordID[8];
- __u32 NoOfBootImageBlocks;
- __u32 NoOfBinaryPartitions;
- __u32 NoOfBDTLPartitions;
- __u32 BlockMultiplierBits;
- __u32 FormatFlags;
- __u32 OsakVersion;
- __u32 PercentUsed;
- struct INFTLPartition Partitions[4];
-} __attribute__((packed));
-
-/* Partition flag types */
-#define INFTL_BINARY 0x20000000
-#define INFTL_BDTL 0x40000000
-#define INFTL_LAST 0x80000000
-
-#endif /* __MTD_INFTL_USER_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/mtd/mtd-abi.h b/lib/libc/include/generic-musl/mtd/mtd-abi.h
deleted file mode 100644
index f7d07da15b9ef41226abd926999ef0a11a1b3fd4..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/mtd/mtd-abi.h
+++ /dev/null
@@ -1,285 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
-/*
- * Copyright © 1999-2010 David Woodhouse et al.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-#ifndef __MTD_ABI_H__
-#define __MTD_ABI_H__
-
-#include
-
-struct erase_info_user {
- __u32 start;
- __u32 length;
-};
-
-struct erase_info_user64 {
- __u64 start;
- __u64 length;
-};
-
-struct mtd_oob_buf {
- __u32 start;
- __u32 length;
- unsigned char *ptr;
-};
-
-struct mtd_oob_buf64 {
- __u64 start;
- __u32 pad;
- __u32 length;
- __u64 usr_ptr;
-};
-
-/**
- * MTD operation modes
- *
- * @MTD_OPS_PLACE_OOB: OOB data are placed at the given offset (default)
- * @MTD_OPS_AUTO_OOB: OOB data are automatically placed at the free areas
- * which are defined by the internal ecclayout
- * @MTD_OPS_RAW: data are transferred as-is, with no error correction;
- * this mode implies %MTD_OPS_PLACE_OOB
- *
- * These modes can be passed to ioctl(MEMWRITE) and are also used internally.
- * See notes on "MTD file modes" for discussion on %MTD_OPS_RAW vs.
- * %MTD_FILE_MODE_RAW.
- */
-enum {
- MTD_OPS_PLACE_OOB = 0,
- MTD_OPS_AUTO_OOB = 1,
- MTD_OPS_RAW = 2,
-};
-
-/**
- * struct mtd_write_req - data structure for requesting a write operation
- *
- * @start: start address
- * @len: length of data buffer
- * @ooblen: length of OOB buffer
- * @usr_data: user-provided data buffer
- * @usr_oob: user-provided OOB buffer
- * @mode: MTD mode (see "MTD operation modes")
- * @padding: reserved, must be set to 0
- *
- * This structure supports ioctl(MEMWRITE) operations, allowing data and/or OOB
- * writes in various modes. To write to OOB-only, set @usr_data == NULL, and to
- * write data-only, set @usr_oob == NULL. However, setting both @usr_data and
- * @usr_oob to NULL is not allowed.
- */
-struct mtd_write_req {
- __u64 start;
- __u64 len;
- __u64 ooblen;
- __u64 usr_data;
- __u64 usr_oob;
- __u8 mode;
- __u8 padding[7];
-};
-
-#define MTD_ABSENT 0
-#define MTD_RAM 1
-#define MTD_ROM 2
-#define MTD_NORFLASH 3
-#define MTD_NANDFLASH 4 /* SLC NAND */
-#define MTD_DATAFLASH 6
-#define MTD_UBIVOLUME 7
-#define MTD_MLCNANDFLASH 8 /* MLC NAND (including TLC) */
-
-#define MTD_WRITEABLE 0x400 /* Device is writeable */
-#define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */
-#define MTD_NO_ERASE 0x1000 /* No erase necessary */
-#define MTD_POWERUP_LOCK 0x2000 /* Always locked after reset */
-
-/* Some common devices / combinations of capabilities */
-#define MTD_CAP_ROM 0
-#define MTD_CAP_RAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE)
-#define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE)
-#define MTD_CAP_NANDFLASH (MTD_WRITEABLE)
-#define MTD_CAP_NVRAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE)
-
-/* Obsolete ECC byte placement modes (used with obsolete MEMGETOOBSEL) */
-#define MTD_NANDECC_OFF 0 // Switch off ECC (Not recommended)
-#define MTD_NANDECC_PLACE 1 // Use the given placement in the structure (YAFFS1 legacy mode)
-#define MTD_NANDECC_AUTOPLACE 2 // Use the default placement scheme
-#define MTD_NANDECC_PLACEONLY 3 // Use the given placement in the structure (Do not store ecc result on read)
-#define MTD_NANDECC_AUTOPL_USR 4 // Use the given autoplacement scheme rather than using the default
-
-/* OTP mode selection */
-#define MTD_OTP_OFF 0
-#define MTD_OTP_FACTORY 1
-#define MTD_OTP_USER 2
-
-struct mtd_info_user {
- __u8 type;
- __u32 flags;
- __u32 size; /* Total size of the MTD */
- __u32 erasesize;
- __u32 writesize;
- __u32 oobsize; /* Amount of OOB data per block (e.g. 16) */
- __u64 padding; /* Old obsolete field; do not use */
-};
-
-struct region_info_user {
- __u32 offset; /* At which this region starts,
- * from the beginning of the MTD */
- __u32 erasesize; /* For this region */
- __u32 numblocks; /* Number of blocks in this region */
- __u32 regionindex;
-};
-
-struct otp_info {
- __u32 start;
- __u32 length;
- __u32 locked;
-};
-
-/*
- * Note, the following ioctl existed in the past and was removed:
- * #define MEMSETOOBSEL _IOW('M', 9, struct nand_oobinfo)
- * Try to avoid adding a new ioctl with the same ioctl number.
- */
-
-/* Get basic MTD characteristics info (better to use sysfs) */
-#define MEMGETINFO _IOR('M', 1, struct mtd_info_user)
-/* Erase segment of MTD */
-#define MEMERASE _IOW('M', 2, struct erase_info_user)
-/* Write out-of-band data from MTD */
-#define MEMWRITEOOB _IOWR('M', 3, struct mtd_oob_buf)
-/* Read out-of-band data from MTD */
-#define MEMREADOOB _IOWR('M', 4, struct mtd_oob_buf)
-/* Lock a chip (for MTD that supports it) */
-#define MEMLOCK _IOW('M', 5, struct erase_info_user)
-/* Unlock a chip (for MTD that supports it) */
-#define MEMUNLOCK _IOW('M', 6, struct erase_info_user)
-/* Get the number of different erase regions */
-#define MEMGETREGIONCOUNT _IOR('M', 7, int)
-/* Get information about the erase region for a specific index */
-#define MEMGETREGIONINFO _IOWR('M', 8, struct region_info_user)
-/* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */
-#define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo)
-/* Check if an eraseblock is bad */
-#define MEMGETBADBLOCK _IOW('M', 11, __kernel_loff_t)
-/* Mark an eraseblock as bad */
-#define MEMSETBADBLOCK _IOW('M', 12, __kernel_loff_t)
-/* Set OTP (One-Time Programmable) mode (factory vs. user) */
-#define OTPSELECT _IOR('M', 13, int)
-/* Get number of OTP (One-Time Programmable) regions */
-#define OTPGETREGIONCOUNT _IOW('M', 14, int)
-/* Get all OTP (One-Time Programmable) info about MTD */
-#define OTPGETREGIONINFO _IOW('M', 15, struct otp_info)
-/* Lock a given range of user data (must be in mode %MTD_FILE_MODE_OTP_USER) */
-#define OTPLOCK _IOR('M', 16, struct otp_info)
-/* Get ECC layout (deprecated) */
-#define ECCGETLAYOUT _IOR('M', 17, struct nand_ecclayout_user)
-/* Get statistics about corrected/uncorrected errors */
-#define ECCGETSTATS _IOR('M', 18, struct mtd_ecc_stats)
-/* Set MTD mode on a per-file-descriptor basis (see "MTD file modes") */
-#define MTDFILEMODE _IO('M', 19)
-/* Erase segment of MTD (supports 64-bit address) */
-#define MEMERASE64 _IOW('M', 20, struct erase_info_user64)
-/* Write data to OOB (64-bit version) */
-#define MEMWRITEOOB64 _IOWR('M', 21, struct mtd_oob_buf64)
-/* Read data from OOB (64-bit version) */
-#define MEMREADOOB64 _IOWR('M', 22, struct mtd_oob_buf64)
-/* Check if chip is locked (for MTD that supports it) */
-#define MEMISLOCKED _IOR('M', 23, struct erase_info_user)
-/*
- * Most generic write interface; can write in-band and/or out-of-band in various
- * modes (see "struct mtd_write_req"). This ioctl is not supported for flashes
- * without OOB, e.g., NOR flash.
- */
-#define MEMWRITE _IOWR('M', 24, struct mtd_write_req)
-
-/*
- * Obsolete legacy interface. Keep it in order not to break userspace
- * interfaces
- */
-struct nand_oobinfo {
- __u32 useecc;
- __u32 eccbytes;
- __u32 oobfree[8][2];
- __u32 eccpos[32];
-};
-
-struct nand_oobfree {
- __u32 offset;
- __u32 length;
-};
-
-#define MTD_MAX_OOBFREE_ENTRIES 8
-#define MTD_MAX_ECCPOS_ENTRIES 64
-/*
- * OBSOLETE: ECC layout control structure. Exported to user-space via ioctl
- * ECCGETLAYOUT for backwards compatbility and should not be mistaken as a
- * complete set of ECC information. The ioctl truncates the larger internal
- * structure to retain binary compatibility with the static declaration of the
- * ioctl. Note that the "MTD_MAX_..._ENTRIES" macros represent the max size of
- * the user struct, not the MAX size of the internal OOB layout representation.
- */
-struct nand_ecclayout_user {
- __u32 eccbytes;
- __u32 eccpos[MTD_MAX_ECCPOS_ENTRIES];
- __u32 oobavail;
- struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];
-};
-
-/**
- * struct mtd_ecc_stats - error correction stats
- *
- * @corrected: number of corrected bits
- * @failed: number of uncorrectable errors
- * @badblocks: number of bad blocks in this partition
- * @bbtblocks: number of blocks reserved for bad block tables
- */
-struct mtd_ecc_stats {
- __u32 corrected;
- __u32 failed;
- __u32 badblocks;
- __u32 bbtblocks;
-};
-
-/*
- * MTD file modes - for read/write access to MTD
- *
- * @MTD_FILE_MODE_NORMAL: OTP disabled, ECC enabled
- * @MTD_FILE_MODE_OTP_FACTORY: OTP enabled in factory mode
- * @MTD_FILE_MODE_OTP_USER: OTP enabled in user mode
- * @MTD_FILE_MODE_RAW: OTP disabled, ECC disabled
- *
- * These modes can be set via ioctl(MTDFILEMODE). The mode mode will be retained
- * separately for each open file descriptor.
- *
- * Note: %MTD_FILE_MODE_RAW provides the same functionality as %MTD_OPS_RAW -
- * raw access to the flash, without error correction or autoplacement schemes.
- * Wherever possible, the MTD_OPS_* mode will override the MTD_FILE_MODE_* mode
- * (e.g., when using ioctl(MEMWRITE)), but in some cases, the MTD_FILE_MODE is
- * used out of necessity (e.g., `write()', ioctl(MEMWRITEOOB64)).
- */
-enum mtd_file_modes {
- MTD_FILE_MODE_NORMAL = MTD_OTP_OFF,
- MTD_FILE_MODE_OTP_FACTORY = MTD_OTP_FACTORY,
- MTD_FILE_MODE_OTP_USER = MTD_OTP_USER,
- MTD_FILE_MODE_RAW,
-};
-
-static __inline__ int mtd_type_is_nand_user(const struct mtd_info_user *mtd)
-{
- return mtd->type == MTD_NANDFLASH || mtd->type == MTD_MLCNANDFLASH;
-}
-
-#endif /* __MTD_ABI_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/mtd/mtd-user.h b/lib/libc/include/generic-musl/mtd/mtd-user.h
deleted file mode 100644
index db96110792ac43c8b777a7f8840941eb6694c379..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/mtd/mtd-user.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
-/*
- * Copyright © 1999-2010 David Woodhouse
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-#ifndef __MTD_USER_H__
-#define __MTD_USER_H__
-
-/* This file is blessed for inclusion by userspace */
-#include
-
-typedef struct mtd_info_user mtd_info_t;
-typedef struct erase_info_user erase_info_t;
-typedef struct region_info_user region_info_t;
-typedef struct nand_oobinfo nand_oobinfo_t;
-typedef struct nand_ecclayout_user nand_ecclayout_t;
-
-#endif /* __MTD_USER_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/mtd/nftl-user.h b/lib/libc/include/generic-musl/mtd/nftl-user.h
deleted file mode 100644
index 55dd08388cfe6333acf99f968d159fe24504da21..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/mtd/nftl-user.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
-/*
- * Copyright © 1999-2010 David Woodhouse
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-#ifndef __MTD_NFTL_USER_H__
-#define __MTD_NFTL_USER_H__
-
-#include
-
-/* Block Control Information */
-
-struct nftl_bci {
- unsigned char ECCSig[6];
- __u8 Status;
- __u8 Status1;
-}__attribute__((packed));
-
-/* Unit Control Information */
-
-struct nftl_uci0 {
- __u16 VirtUnitNum;
- __u16 ReplUnitNum;
- __u16 SpareVirtUnitNum;
- __u16 SpareReplUnitNum;
-} __attribute__((packed));
-
-struct nftl_uci1 {
- __u32 WearInfo;
- __u16 EraseMark;
- __u16 EraseMark1;
-} __attribute__((packed));
-
-struct nftl_uci2 {
- __u16 FoldMark;
- __u16 FoldMark1;
- __u32 unused;
-} __attribute__((packed));
-
-union nftl_uci {
- struct nftl_uci0 a;
- struct nftl_uci1 b;
- struct nftl_uci2 c;
-};
-
-struct nftl_oob {
- struct nftl_bci b;
- union nftl_uci u;
-};
-
-/* NFTL Media Header */
-
-struct NFTLMediaHeader {
- char DataOrgID[6];
- __u16 NumEraseUnits;
- __u16 FirstPhysicalEUN;
- __u32 FormattedSize;
- unsigned char UnitSizeFactor;
-} __attribute__((packed));
-
-#define MAX_ERASE_ZONES (8192 - 512)
-
-#define ERASE_MARK 0x3c69
-#define SECTOR_FREE 0xff
-#define SECTOR_USED 0x55
-#define SECTOR_IGNORE 0x11
-#define SECTOR_DELETED 0x00
-
-#define FOLD_MARK_IN_PROGRESS 0x5555
-
-#define ZONE_GOOD 0xff
-#define ZONE_BAD_ORIGINAL 0
-#define ZONE_BAD_MARKED 7
-
-
-#endif /* __MTD_NFTL_USER_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/mtd/ubi-user.h b/lib/libc/include/generic-musl/mtd/ubi-user.h
deleted file mode 100644
index 4fa0aaaba426e348e8fe0a56d63982421b72f735..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/mtd/ubi-user.h
+++ /dev/null
@@ -1,460 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
-/*
- * Copyright © International Business Machines Corp., 2006
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Author: Artem Bityutskiy (Битюцкий Артём)
- */
-
-#ifndef __UBI_USER_H__
-#define __UBI_USER_H__
-
-#include
-
-/*
- * UBI device creation (the same as MTD device attachment)
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
- * MTD devices may be attached using %UBI_IOCATT ioctl command of the UBI
- * control device. The caller has to properly fill and pass
- * &struct ubi_attach_req object - UBI will attach the MTD device specified in
- * the request and return the newly created UBI device number as the ioctl
- * return value.
- *
- * UBI device deletion (the same as MTD device detachment)
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
- * An UBI device maybe deleted with %UBI_IOCDET ioctl command of the UBI
- * control device.
- *
- * UBI volume creation
- * ~~~~~~~~~~~~~~~~~~~
- *
- * UBI volumes are created via the %UBI_IOCMKVOL ioctl command of UBI character
- * device. A &struct ubi_mkvol_req object has to be properly filled and a
- * pointer to it has to be passed to the ioctl.
- *
- * UBI volume deletion
- * ~~~~~~~~~~~~~~~~~~~
- *
- * To delete a volume, the %UBI_IOCRMVOL ioctl command of the UBI character
- * device should be used. A pointer to the 32-bit volume ID hast to be passed
- * to the ioctl.
- *
- * UBI volume re-size
- * ~~~~~~~~~~~~~~~~~~
- *
- * To re-size a volume, the %UBI_IOCRSVOL ioctl command of the UBI character
- * device should be used. A &struct ubi_rsvol_req object has to be properly
- * filled and a pointer to it has to be passed to the ioctl.
- *
- * UBI volumes re-name
- * ~~~~~~~~~~~~~~~~~~~
- *
- * To re-name several volumes atomically at one go, the %UBI_IOCRNVOL command
- * of the UBI character device should be used. A &struct ubi_rnvol_req object
- * has to be properly filled and a pointer to it has to be passed to the ioctl.
- *
- * UBI volume update
- * ~~~~~~~~~~~~~~~~~
- *
- * Volume update should be done via the %UBI_IOCVOLUP ioctl command of the
- * corresponding UBI volume character device. A pointer to a 64-bit update
- * size should be passed to the ioctl. After this, UBI expects user to write
- * this number of bytes to the volume character device. The update is finished
- * when the claimed number of bytes is passed. So, the volume update sequence
- * is something like:
- *
- * fd = open("/dev/my_volume");
- * ioctl(fd, UBI_IOCVOLUP, &image_size);
- * write(fd, buf, image_size);
- * close(fd);
- *
- * Logical eraseblock erase
- * ~~~~~~~~~~~~~~~~~~~~~~~~
- *
- * To erase a logical eraseblock, the %UBI_IOCEBER ioctl command of the
- * corresponding UBI volume character device should be used. This command
- * unmaps the requested logical eraseblock, makes sure the corresponding
- * physical eraseblock is successfully erased, and returns.
- *
- * Atomic logical eraseblock change
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
- * Atomic logical eraseblock change operation is called using the %UBI_IOCEBCH
- * ioctl command of the corresponding UBI volume character device. A pointer to
- * a &struct ubi_leb_change_req object has to be passed to the ioctl. Then the
- * user is expected to write the requested amount of bytes (similarly to what
- * should be done in case of the "volume update" ioctl).
- *
- * Logical eraseblock map
- * ~~~~~~~~~~~~~~~~~~~~~
- *
- * To map a logical eraseblock to a physical eraseblock, the %UBI_IOCEBMAP
- * ioctl command should be used. A pointer to a &struct ubi_map_req object is
- * expected to be passed. The ioctl maps the requested logical eraseblock to
- * a physical eraseblock and returns. Only non-mapped logical eraseblocks can
- * be mapped. If the logical eraseblock specified in the request is already
- * mapped to a physical eraseblock, the ioctl fails and returns error.
- *
- * Logical eraseblock unmap
- * ~~~~~~~~~~~~~~~~~~~~~~~~
- *
- * To unmap a logical eraseblock to a physical eraseblock, the %UBI_IOCEBUNMAP
- * ioctl command should be used. The ioctl unmaps the logical eraseblocks,
- * schedules corresponding physical eraseblock for erasure, and returns. Unlike
- * the "LEB erase" command, it does not wait for the physical eraseblock being
- * erased. Note, the side effect of this is that if an unclean reboot happens
- * after the unmap ioctl returns, you may find the LEB mapped again to the same
- * physical eraseblock after the UBI is run again.
- *
- * Check if logical eraseblock is mapped
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
- * To check if a logical eraseblock is mapped to a physical eraseblock, the
- * %UBI_IOCEBISMAP ioctl command should be used. It returns %0 if the LEB is
- * not mapped, and %1 if it is mapped.
- *
- * Set an UBI volume property
- * ~~~~~~~~~~~~~~~~~~~~~~~~~
- *
- * To set an UBI volume property the %UBI_IOCSETPROP ioctl command should be
- * used. A pointer to a &struct ubi_set_vol_prop_req object is expected to be
- * passed. The object describes which property should be set, and to which value
- * it should be set.
- *
- * Block devices on UBI volumes
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
- * To create a R/O block device on top of an UBI volume the %UBI_IOCVOLCRBLK
- * should be used. A pointer to a &struct ubi_blkcreate_req object is expected
- * to be passed, which is not used and reserved for future usage.
- *
- * Conversely, to remove a block device the %UBI_IOCVOLRMBLK should be used,
- * which takes no arguments.
- */
-
-/*
- * When a new UBI volume or UBI device is created, users may either specify the
- * volume/device number they want to create or to let UBI automatically assign
- * the number using these constants.
- */
-#define UBI_VOL_NUM_AUTO (-1)
-#define UBI_DEV_NUM_AUTO (-1)
-
-/* Maximum volume name length */
-#define UBI_MAX_VOLUME_NAME 127
-
-/* ioctl commands of UBI character devices */
-
-#define UBI_IOC_MAGIC 'o'
-
-/* Create an UBI volume */
-#define UBI_IOCMKVOL _IOW(UBI_IOC_MAGIC, 0, struct ubi_mkvol_req)
-/* Remove an UBI volume */
-#define UBI_IOCRMVOL _IOW(UBI_IOC_MAGIC, 1, __s32)
-/* Re-size an UBI volume */
-#define UBI_IOCRSVOL _IOW(UBI_IOC_MAGIC, 2, struct ubi_rsvol_req)
-/* Re-name volumes */
-#define UBI_IOCRNVOL _IOW(UBI_IOC_MAGIC, 3, struct ubi_rnvol_req)
-
-/* ioctl commands of the UBI control character device */
-
-#define UBI_CTRL_IOC_MAGIC 'o'
-
-/* Attach an MTD device */
-#define UBI_IOCATT _IOW(UBI_CTRL_IOC_MAGIC, 64, struct ubi_attach_req)
-/* Detach an MTD device */
-#define UBI_IOCDET _IOW(UBI_CTRL_IOC_MAGIC, 65, __s32)
-
-/* ioctl commands of UBI volume character devices */
-
-#define UBI_VOL_IOC_MAGIC 'O'
-
-/* Start UBI volume update
- * Note: This actually takes a pointer (__s64*), but we can't change
- * that without breaking the ABI on 32bit systems
- */
-#define UBI_IOCVOLUP _IOW(UBI_VOL_IOC_MAGIC, 0, __s64)
-/* LEB erasure command, used for debugging, disabled by default */
-#define UBI_IOCEBER _IOW(UBI_VOL_IOC_MAGIC, 1, __s32)
-/* Atomic LEB change command */
-#define UBI_IOCEBCH _IOW(UBI_VOL_IOC_MAGIC, 2, __s32)
-/* Map LEB command */
-#define UBI_IOCEBMAP _IOW(UBI_VOL_IOC_MAGIC, 3, struct ubi_map_req)
-/* Unmap LEB command */
-#define UBI_IOCEBUNMAP _IOW(UBI_VOL_IOC_MAGIC, 4, __s32)
-/* Check if LEB is mapped command */
-#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32)
-/* Set an UBI volume property */
-#define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \
- struct ubi_set_vol_prop_req)
-/* Create a R/O block device on top of an UBI volume */
-#define UBI_IOCVOLCRBLK _IOW(UBI_VOL_IOC_MAGIC, 7, struct ubi_blkcreate_req)
-/* Remove the R/O block device */
-#define UBI_IOCVOLRMBLK _IO(UBI_VOL_IOC_MAGIC, 8)
-
-/* Maximum MTD device name length supported by UBI */
-#define MAX_UBI_MTD_NAME_LEN 127
-
-/* Maximum amount of UBI volumes that can be re-named at one go */
-#define UBI_MAX_RNVOL 32
-
-/*
- * UBI volume type constants.
- *
- * @UBI_DYNAMIC_VOLUME: dynamic volume
- * @UBI_STATIC_VOLUME: static volume
- */
-enum {
- UBI_DYNAMIC_VOLUME = 3,
- UBI_STATIC_VOLUME = 4,
-};
-
-/*
- * UBI set volume property ioctl constants.
- *
- * @UBI_VOL_PROP_DIRECT_WRITE: allow (any non-zero value) or disallow (value 0)
- * user to directly write and erase individual
- * eraseblocks on dynamic volumes
- */
-enum {
- UBI_VOL_PROP_DIRECT_WRITE = 1,
-};
-
-/**
- * struct ubi_attach_req - attach MTD device request.
- * @ubi_num: UBI device number to create
- * @mtd_num: MTD device number to attach
- * @vid_hdr_offset: VID header offset (use defaults if %0)
- * @max_beb_per1024: maximum expected number of bad PEB per 1024 PEBs
- * @padding: reserved for future, not used, has to be zeroed
- *
- * This data structure is used to specify MTD device UBI has to attach and the
- * parameters it has to use. The number which should be assigned to the new UBI
- * device is passed in @ubi_num. UBI may automatically assign the number if
- * @UBI_DEV_NUM_AUTO is passed. In this case, the device number is returned in
- * @ubi_num.
- *
- * Most applications should pass %0 in @vid_hdr_offset to make UBI use default
- * offset of the VID header within physical eraseblocks. The default offset is
- * the next min. I/O unit after the EC header. For example, it will be offset
- * 512 in case of a 512 bytes page NAND flash with no sub-page support. Or
- * it will be 512 in case of a 2KiB page NAND flash with 4 512-byte sub-pages.
- *
- * But in rare cases, if this optimizes things, the VID header may be placed to
- * a different offset. For example, the boot-loader might do things faster if
- * the VID header sits at the end of the first 2KiB NAND page with 4 sub-pages.
- * As the boot-loader would not normally need to read EC headers (unless it
- * needs UBI in RW mode), it might be faster to calculate ECC. This is weird
- * example, but it real-life example. So, in this example, @vid_hdr_offer would
- * be 2KiB-64 bytes = 1984. Note, that this position is not even 512-bytes
- * aligned, which is OK, as UBI is clever enough to realize this is 4th
- * sub-page of the first page and add needed padding.
- *
- * The @max_beb_per1024 is the maximum amount of bad PEBs UBI expects on the
- * UBI device per 1024 eraseblocks. This value is often given in an other form
- * in the NAND datasheet (min NVB i.e. minimal number of valid blocks). The
- * maximum expected bad eraseblocks per 1024 is then:
- * 1024 * (1 - MinNVB / MaxNVB)
- * Which gives 20 for most NAND devices. This limit is used in order to derive
- * amount of eraseblock UBI reserves for handling new bad blocks. If the device
- * has more bad eraseblocks than this limit, UBI does not reserve any physical
- * eraseblocks for new bad eraseblocks, but attempts to use available
- * eraseblocks (if any). The accepted range is 0-768. If 0 is given, the
- * default kernel value of %CONFIG_MTD_UBI_BEB_LIMIT will be used.
- */
-struct ubi_attach_req {
- __s32 ubi_num;
- __s32 mtd_num;
- __s32 vid_hdr_offset;
- __s16 max_beb_per1024;
- __s8 padding[10];
-};
-
-/*
- * UBI volume flags.
- *
- * @UBI_VOL_SKIP_CRC_CHECK_FLG: skip the CRC check done on a static volume at
- * open time. Only valid for static volumes and
- * should only be used if the volume user has a
- * way to verify data integrity
- */
-enum {
- UBI_VOL_SKIP_CRC_CHECK_FLG = 0x1,
-};
-
-#define UBI_VOL_VALID_FLGS (UBI_VOL_SKIP_CRC_CHECK_FLG)
-
-/**
- * struct ubi_mkvol_req - volume description data structure used in
- * volume creation requests.
- * @vol_id: volume number
- * @alignment: volume alignment
- * @bytes: volume size in bytes
- * @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME)
- * @flags: volume flags (%UBI_VOL_SKIP_CRC_CHECK_FLG)
- * @name_len: volume name length
- * @padding2: reserved for future, not used, has to be zeroed
- * @name: volume name
- *
- * This structure is used by user-space programs when creating new volumes. The
- * @used_bytes field is only necessary when creating static volumes.
- *
- * The @alignment field specifies the required alignment of the volume logical
- * eraseblock. This means, that the size of logical eraseblocks will be aligned
- * to this number, i.e.,
- * (UBI device logical eraseblock size) mod (@alignment) = 0.
- *
- * To put it differently, the logical eraseblock of this volume may be slightly
- * shortened in order to make it properly aligned. The alignment has to be
- * multiple of the flash minimal input/output unit, or %1 to utilize the entire
- * available space of logical eraseblocks.
- *
- * The @alignment field may be useful, for example, when one wants to maintain
- * a block device on top of an UBI volume. In this case, it is desirable to fit
- * an integer number of blocks in logical eraseblocks of this UBI volume. With
- * alignment it is possible to update this volume using plane UBI volume image
- * BLOBs, without caring about how to properly align them.
- */
-struct ubi_mkvol_req {
- __s32 vol_id;
- __s32 alignment;
- __s64 bytes;
- __s8 vol_type;
- __u8 flags;
- __s16 name_len;
- __s8 padding2[4];
- char name[UBI_MAX_VOLUME_NAME + 1];
-} __attribute__((packed));
-
-/**
- * struct ubi_rsvol_req - a data structure used in volume re-size requests.
- * @vol_id: ID of the volume to re-size
- * @bytes: new size of the volume in bytes
- *
- * Re-sizing is possible for both dynamic and static volumes. But while dynamic
- * volumes may be re-sized arbitrarily, static volumes cannot be made to be
- * smaller than the number of bytes they bear. To arbitrarily shrink a static
- * volume, it must be wiped out first (by means of volume update operation with
- * zero number of bytes).
- */
-struct ubi_rsvol_req {
- __s64 bytes;
- __s32 vol_id;
-} __attribute__((packed));
-
-/**
- * struct ubi_rnvol_req - volumes re-name request.
- * @count: count of volumes to re-name
- * @padding1: reserved for future, not used, has to be zeroed
- * @vol_id: ID of the volume to re-name
- * @name_len: name length
- * @padding2: reserved for future, not used, has to be zeroed
- * @name: new volume name
- *
- * UBI allows to re-name up to %32 volumes at one go. The count of volumes to
- * re-name is specified in the @count field. The ID of the volumes to re-name
- * and the new names are specified in the @vol_id and @name fields.
- *
- * The UBI volume re-name operation is atomic, which means that should power cut
- * happen, the volumes will have either old name or new name. So the possible
- * use-cases of this command is atomic upgrade. Indeed, to upgrade, say, volumes
- * A and B one may create temporary volumes %A1 and %B1 with the new contents,
- * then atomically re-name A1->A and B1->B, in which case old %A and %B will
- * be removed.
- *
- * If it is not desirable to remove old A and B, the re-name request has to
- * contain 4 entries: A1->A, A->A1, B1->B, B->B1, in which case old A1 and B1
- * become A and B, and old A and B will become A1 and B1.
- *
- * It is also OK to request: A1->A, A1->X, B1->B, B->Y, in which case old A1
- * and B1 become A and B, and old A and B become X and Y.
- *
- * In other words, in case of re-naming into an existing volume name, the
- * existing volume is removed, unless it is re-named as well at the same
- * re-name request.
- */
-struct ubi_rnvol_req {
- __s32 count;
- __s8 padding1[12];
- struct {
- __s32 vol_id;
- __s16 name_len;
- __s8 padding2[2];
- char name[UBI_MAX_VOLUME_NAME + 1];
- } ents[UBI_MAX_RNVOL];
-} __attribute__((packed));
-
-/**
- * struct ubi_leb_change_req - a data structure used in atomic LEB change
- * requests.
- * @lnum: logical eraseblock number to change
- * @bytes: how many bytes will be written to the logical eraseblock
- * @dtype: pass "3" for better compatibility with old kernels
- * @padding: reserved for future, not used, has to be zeroed
- *
- * The @dtype field used to inform UBI about what kind of data will be written
- * to the LEB: long term (value 1), short term (value 2), unknown (value 3).
- * UBI tried to pick a PEB with lower erase counter for short term data and a
- * PEB with higher erase counter for long term data. But this was not really
- * used because users usually do not know this and could easily mislead UBI. We
- * removed this feature in May 2012. UBI currently just ignores the @dtype
- * field. But for better compatibility with older kernels it is recommended to
- * set @dtype to 3 (unknown).
- */
-struct ubi_leb_change_req {
- __s32 lnum;
- __s32 bytes;
- __s8 dtype; /* obsolete, do not use! */
- __s8 padding[7];
-} __attribute__((packed));
-
-/**
- * struct ubi_map_req - a data structure used in map LEB requests.
- * @dtype: pass "3" for better compatibility with old kernels
- * @lnum: logical eraseblock number to unmap
- * @padding: reserved for future, not used, has to be zeroed
- */
-struct ubi_map_req {
- __s32 lnum;
- __s8 dtype; /* obsolete, do not use! */
- __s8 padding[3];
-} __attribute__((packed));
-
-
-/**
- * struct ubi_set_vol_prop_req - a data structure used to set an UBI volume
- * property.
- * @property: property to set (%UBI_VOL_PROP_DIRECT_WRITE)
- * @padding: reserved for future, not used, has to be zeroed
- * @value: value to set
- */
-struct ubi_set_vol_prop_req {
- __u8 property;
- __u8 padding[7];
- __u64 value;
-} __attribute__((packed));
-
-/**
- * struct ubi_blkcreate_req - a data structure used in block creation requests.
- * @padding: reserved for future, not used, has to be zeroed
- */
-struct ubi_blkcreate_req {
- __s8 padding[128];
-} __attribute__((packed));
-
-#endif /* __UBI_USER_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/netinet/in.h b/lib/libc/include/generic-musl/netinet/in.h
index fc3036ea735b2ed1b10e4e65c75a3ff4e5fbbbf8..87076c5c0ede01b0574a325daafb9961aa5d2b1d 100644
--- a/lib/libc/include/generic-musl/netinet/in.h
+++ b/lib/libc/include/generic-musl/netinet/in.h
@@ -52,6 +52,7 @@ struct ipv6_mreq {
#define INADDR_UNSPEC_GROUP ((in_addr_t) 0xe0000000)
#define INADDR_ALLHOSTS_GROUP ((in_addr_t) 0xe0000001)
#define INADDR_ALLRTRS_GROUP ((in_addr_t) 0xe0000002)
+#define INADDR_ALLSNOOPERS_GROUP ((in_addr_t) 0xe000006a)
#define INADDR_MAX_LOCAL_GROUP ((in_addr_t) 0xe00000ff)
#define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }
@@ -335,6 +336,8 @@ struct ip6_mtuinfo {
#define IPV6_V6ONLY 26
#define IPV6_JOIN_ANYCAST 27
#define IPV6_LEAVE_ANYCAST 28
+#define IPV6_MULTICAST_ALL 29
+#define IPV6_ROUTER_ALERT_ISOLATE 30
#define IPV6_IPSEC_POLICY 34
#define IPV6_XFRM_POLICY 35
#define IPV6_HDRINCL 36
diff --git a/lib/libc/include/generic-musl/netinet/tcp.h b/lib/libc/include/generic-musl/netinet/tcp.h
index 05e262b52074d5f02ed1cd3bcd572b84840a04a3..949f701493aaa2b0a3836cafb9e88162f6057348 100644
--- a/lib/libc/include/generic-musl/netinet/tcp.h
+++ b/lib/libc/include/generic-musl/netinet/tcp.h
@@ -72,6 +72,11 @@ enum {
TCP_NLA_SND_SSTHRESH,
TCP_NLA_DELIVERED,
TCP_NLA_DELIVERED_CE,
+ TCP_NLA_BYTES_SENT,
+ TCP_NLA_BYTES_RETRANS,
+ TCP_NLA_DSACK_DUPS,
+ TCP_NLA_REORD_SEEN,
+ TCP_NLA_SRTT,
};
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
@@ -225,6 +230,10 @@ struct tcp_info {
uint64_t tcpi_sndbuf_limited;
uint32_t tcpi_delivered;
uint32_t tcpi_delivered_ce;
+ uint64_t tcpi_bytes_sent;
+ uint64_t tcpi_bytes_retrans;
+ uint32_t tcpi_dsack_dups;
+ uint32_t tcpi_reord_seen;
};
#define TCP_MD5SIG_MAXKEYLEN 80
diff --git a/lib/libc/include/generic-musl/netinet/udp.h b/lib/libc/include/generic-musl/netinet/udp.h
index 16d716160a45dd66b6fc5ba0f079bc42eb9773ec..40ca6df9850a27355e6f9f65dbd1254402ef73fd 100644
--- a/lib/libc/include/generic-musl/netinet/udp.h
+++ b/lib/libc/include/generic-musl/netinet/udp.h
@@ -27,12 +27,14 @@ struct udphdr {
#define UDP_NO_CHECK6_TX 101
#define UDP_NO_CHECK6_RX 102
#define UDP_SEGMENT 103
+#define UDP_GRO 104
#define UDP_ENCAP_ESPINUDP_NON_IKE 1
#define UDP_ENCAP_ESPINUDP 2
#define UDP_ENCAP_L2TPINUDP 3
#define UDP_ENCAP_GTP0 4
#define UDP_ENCAP_GTP1U 5
+#define UDP_ENCAP_RXRPC 6
#define SOL_UDP 17
diff --git a/lib/libc/include/generic-musl/netpacket/packet.h b/lib/libc/include/generic-musl/netpacket/packet.h
index 0a69a7e05c72befad2ef0b5f1a5f2daaedd75048..65a6d2ae1c265a1223a20f2e06e2042fa934ed02 100644
--- a/lib/libc/include/generic-musl/netpacket/packet.h
+++ b/lib/libc/include/generic-musl/netpacket/packet.h
@@ -48,6 +48,7 @@ struct packet_mreq {
#define PACKET_QDISC_BYPASS 20
#define PACKET_ROLLOVER_STATS 21
#define PACKET_FANOUT_DATA 22
+#define PACKET_IGNORE_OUTGOING 23
#define PACKET_MR_MULTICAST 0
#define PACKET_MR_PROMISC 1
diff --git a/lib/libc/include/generic-musl/plugin-api.h b/lib/libc/include/generic-musl/plugin-api.h
deleted file mode 100644
index ffd562fc10d79abe5b821548893f96d857af1e09..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/plugin-api.h
+++ /dev/null
@@ -1,483 +0,0 @@
-/* plugin-api.h -- External linker plugin API. */
-
-/* Copyright (C) 2009-2019 Free Software Foundation, Inc.
- Written by Cary Coutant .
-
- This file is part of binutils.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
- MA 02110-1301, USA. */
-
-/* This file defines the interface for writing a linker plugin, which is
- described at < http://gcc.gnu.org/wiki/whopr/driver >. */
-
-#ifndef PLUGIN_API_H
-#define PLUGIN_API_H
-
-#ifdef HAVE_STDINT_H
-#include
-#elif defined(HAVE_INTTYPES_H)
-#include
-#endif
-#include
-#if !defined(HAVE_STDINT_H) && !defined(HAVE_INTTYPES_H) && \
- !defined(UINT64_MAX) && !defined(uint64_t)
-#error cannot find uint64_t type
-#endif
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Status code returned by most API routines. */
-
-enum ld_plugin_status
-{
- LDPS_OK = 0,
- LDPS_NO_SYMS, /* Attempt to get symbols that haven't been added. */
- LDPS_BAD_HANDLE, /* No claimed object associated with given handle. */
- LDPS_ERR
- /* Additional Error codes TBD. */
-};
-
-/* The version of the API specification. */
-
-enum ld_plugin_api_version
-{
- LD_PLUGIN_API_VERSION = 1
-};
-
-/* The type of output file being generated by the linker. */
-
-enum ld_plugin_output_file_type
-{
- LDPO_REL,
- LDPO_EXEC,
- LDPO_DYN,
- LDPO_PIE
-};
-
-/* An input file managed by the plugin library. */
-
-struct ld_plugin_input_file
-{
- const char *name;
- int fd;
- off_t offset;
- off_t filesize;
- void *handle;
-};
-
-/* A symbol belonging to an input file managed by the plugin library. */
-
-struct ld_plugin_symbol
-{
- char *name;
- char *version;
- int def;
- int visibility;
- uint64_t size;
- char *comdat_key;
- int resolution;
-};
-
-/* An object's section. */
-
-struct ld_plugin_section
-{
- const void* handle;
- unsigned int shndx;
-};
-
-/* Whether the symbol is a definition, reference, or common, weak or not. */
-
-enum ld_plugin_symbol_kind
-{
- LDPK_DEF,
- LDPK_WEAKDEF,
- LDPK_UNDEF,
- LDPK_WEAKUNDEF,
- LDPK_COMMON
-};
-
-/* The visibility of the symbol. */
-
-enum ld_plugin_symbol_visibility
-{
- LDPV_DEFAULT,
- LDPV_PROTECTED,
- LDPV_INTERNAL,
- LDPV_HIDDEN
-};
-
-/* How a symbol is resolved. */
-
-enum ld_plugin_symbol_resolution
-{
- LDPR_UNKNOWN = 0,
-
- /* Symbol is still undefined at this point. */
- LDPR_UNDEF,
-
- /* This is the prevailing definition of the symbol, with references from
- regular object code. */
- LDPR_PREVAILING_DEF,
-
- /* This is the prevailing definition of the symbol, with no
- references from regular objects. It is only referenced from IR
- code. */
- LDPR_PREVAILING_DEF_IRONLY,
-
- /* This definition was pre-empted by a definition in a regular
- object file. */
- LDPR_PREEMPTED_REG,
-
- /* This definition was pre-empted by a definition in another IR file. */
- LDPR_PREEMPTED_IR,
-
- /* This symbol was resolved by a definition in another IR file. */
- LDPR_RESOLVED_IR,
-
- /* This symbol was resolved by a definition in a regular object
- linked into the main executable. */
- LDPR_RESOLVED_EXEC,
-
- /* This symbol was resolved by a definition in a shared object. */
- LDPR_RESOLVED_DYN,
-
- /* This is the prevailing definition of the symbol, with no
- references from regular objects. It is only referenced from IR
- code, but the symbol is exported and may be referenced from
- a dynamic object (not seen at link time). */
- LDPR_PREVAILING_DEF_IRONLY_EXP
-};
-
-/* The plugin library's "claim file" handler. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_claim_file_handler) (
- const struct ld_plugin_input_file *file, int *claimed);
-
-/* The plugin library's "all symbols read" handler. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_all_symbols_read_handler) (void);
-
-/* The plugin library's cleanup handler. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_cleanup_handler) (void);
-
-/* The linker's interface for registering the "claim file" handler. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_register_claim_file) (ld_plugin_claim_file_handler handler);
-
-/* The linker's interface for registering the "all symbols read" handler. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_register_all_symbols_read) (
- ld_plugin_all_symbols_read_handler handler);
-
-/* The linker's interface for registering the cleanup handler. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_register_cleanup) (ld_plugin_cleanup_handler handler);
-
-/* The linker's interface for adding symbols from a claimed input file. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_add_symbols) (void *handle, int nsyms,
- const struct ld_plugin_symbol *syms);
-
-/* The linker's interface for getting the input file information with
- an open (possibly re-opened) file descriptor. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_get_input_file) (const void *handle,
- struct ld_plugin_input_file *file);
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_get_view) (const void *handle, const void **viewp);
-
-/* The linker's interface for releasing the input file. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_release_input_file) (const void *handle);
-
-/* The linker's interface for retrieving symbol resolution information. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_get_symbols) (const void *handle, int nsyms,
- struct ld_plugin_symbol *syms);
-
-/* The linker's interface for adding a compiled input file. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_add_input_file) (const char *pathname);
-
-/* The linker's interface for adding a library that should be searched. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_add_input_library) (const char *libname);
-
-/* The linker's interface for adding a library path that should be searched. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_set_extra_library_path) (const char *path);
-
-/* The linker's interface for issuing a warning or error message. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_message) (int level, const char *format, ...);
-
-/* The linker's interface for retrieving the number of sections in an object.
- The handle is obtained in the claim_file handler. This interface should
- only be invoked in the claim_file handler. This function sets *COUNT to
- the number of sections in the object. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_get_input_section_count) (const void* handle, unsigned int *count);
-
-/* The linker's interface for retrieving the section type of a specific
- section in an object. This interface should only be invoked in the
- claim_file handler. This function sets *TYPE to an ELF SHT_xxx value. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_get_input_section_type) (const struct ld_plugin_section section,
- unsigned int *type);
-
-/* The linker's interface for retrieving the name of a specific section in
- an object. This interface should only be invoked in the claim_file handler.
- This function sets *SECTION_NAME_PTR to a null-terminated buffer allocated
- by malloc. The plugin must free *SECTION_NAME_PTR. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_get_input_section_name) (const struct ld_plugin_section section,
- char **section_name_ptr);
-
-/* The linker's interface for retrieving the contents of a specific section
- in an object. This interface should only be invoked in the claim_file
- handler. This function sets *SECTION_CONTENTS to point to a buffer that is
- valid until clam_file handler returns. It sets *LEN to the size of the
- buffer. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_get_input_section_contents) (const struct ld_plugin_section section,
- const unsigned char **section_contents,
- size_t* len);
-
-/* The linker's interface for specifying the desired order of sections.
- The sections should be specifed using the array SECTION_LIST in the
- order in which they should appear in the final layout. NUM_SECTIONS
- specifies the number of entries in each array. This should be invoked
- in the all_symbols_read handler. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_update_section_order) (const struct ld_plugin_section *section_list,
- unsigned int num_sections);
-
-/* The linker's interface for specifying that reordering of sections is
- desired so that the linker can prepare for it. This should be invoked
- before update_section_order, preferably in the claim_file handler. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_allow_section_ordering) (void);
-
-/* The linker's interface for specifying that a subset of sections is
- to be mapped to a unique segment. If the plugin wants to call
- unique_segment_for_sections, it must call this function from a
- claim_file_handler or when it is first loaded. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_allow_unique_segment_for_sections) (void);
-
-/* The linker's interface for specifying that a specific set of sections
- must be mapped to a unique segment. ELF segments do not have names
- and the NAME is used as the name of the newly created output section
- that is then placed in the unique PT_LOAD segment. FLAGS is used to
- specify if any additional segment flags need to be set. For instance,
- a specific segment flag can be set to identify this segment. Unsetting
- segment flags that would be set by default is not possible. The
- parameter SEGMENT_ALIGNMENT when non-zero will override the default. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_unique_segment_for_sections) (
- const char* segment_name,
- uint64_t segment_flags,
- uint64_t segment_alignment,
- const struct ld_plugin_section * section_list,
- unsigned int num_sections);
-
-/* The linker's interface for retrieving the section alignment requirement
- of a specific section in an object. This interface should only be invoked in the
- claim_file handler. This function sets *ADDRALIGN to the ELF sh_addralign
- value of the input section. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_get_input_section_alignment) (const struct ld_plugin_section section,
- unsigned int *addralign);
-
-/* The linker's interface for retrieving the section size of a specific section
- in an object. This interface should only be invoked in the claim_file handler.
- This function sets *SECSIZE to the ELF sh_size
- value of the input section. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_get_input_section_size) (const struct ld_plugin_section section,
- uint64_t *secsize);
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_new_input_handler) (const struct ld_plugin_input_file *file);
-
-/* The linker's interface for registering the "new_input" handler. This handler
- will be notified when a new input file has been added after the
- all_symbols_read event, allowing the plugin to, for example, set a unique
- segment for sections in plugin-generated input files. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_register_new_input) (ld_plugin_new_input_handler handler);
-
-/* The linker's interface for getting the list of wrapped symbols using the
- --wrap option. This sets *NUM_SYMBOLS to number of wrapped symbols and
- *WRAP_SYMBOL_LIST to the list of wrapped symbols. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_get_wrap_symbols) (uint64_t *num_symbols,
- const char ***wrap_symbol_list);
-
-enum ld_plugin_level
-{
- LDPL_INFO,
- LDPL_WARNING,
- LDPL_ERROR,
- LDPL_FATAL
-};
-
-/* Values for the tv_tag field of the transfer vector. */
-
-enum ld_plugin_tag
-{
- LDPT_NULL = 0,
- LDPT_API_VERSION = 1,
- LDPT_GOLD_VERSION = 2,
- LDPT_LINKER_OUTPUT = 3,
- LDPT_OPTION = 4,
- LDPT_REGISTER_CLAIM_FILE_HOOK = 5,
- LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK = 6,
- LDPT_REGISTER_CLEANUP_HOOK = 7,
- LDPT_ADD_SYMBOLS = 8,
- LDPT_GET_SYMBOLS = 9,
- LDPT_ADD_INPUT_FILE = 10,
- LDPT_MESSAGE = 11,
- LDPT_GET_INPUT_FILE = 12,
- LDPT_RELEASE_INPUT_FILE = 13,
- LDPT_ADD_INPUT_LIBRARY = 14,
- LDPT_OUTPUT_NAME = 15,
- LDPT_SET_EXTRA_LIBRARY_PATH = 16,
- LDPT_GNU_LD_VERSION = 17,
- LDPT_GET_VIEW = 18,
- LDPT_GET_INPUT_SECTION_COUNT = 19,
- LDPT_GET_INPUT_SECTION_TYPE = 20,
- LDPT_GET_INPUT_SECTION_NAME = 21,
- LDPT_GET_INPUT_SECTION_CONTENTS = 22,
- LDPT_UPDATE_SECTION_ORDER = 23,
- LDPT_ALLOW_SECTION_ORDERING = 24,
- LDPT_GET_SYMBOLS_V2 = 25,
- LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS = 26,
- LDPT_UNIQUE_SEGMENT_FOR_SECTIONS = 27,
- LDPT_GET_SYMBOLS_V3 = 28,
- LDPT_GET_INPUT_SECTION_ALIGNMENT = 29,
- LDPT_GET_INPUT_SECTION_SIZE = 30,
- LDPT_REGISTER_NEW_INPUT_HOOK = 31,
- LDPT_GET_WRAP_SYMBOLS = 32
-};
-
-/* The plugin transfer vector. */
-
-struct ld_plugin_tv
-{
- enum ld_plugin_tag tv_tag;
- union
- {
- int tv_val;
- const char *tv_string;
- ld_plugin_register_claim_file tv_register_claim_file;
- ld_plugin_register_all_symbols_read tv_register_all_symbols_read;
- ld_plugin_register_cleanup tv_register_cleanup;
- ld_plugin_add_symbols tv_add_symbols;
- ld_plugin_get_symbols tv_get_symbols;
- ld_plugin_add_input_file tv_add_input_file;
- ld_plugin_message tv_message;
- ld_plugin_get_input_file tv_get_input_file;
- ld_plugin_get_view tv_get_view;
- ld_plugin_release_input_file tv_release_input_file;
- ld_plugin_add_input_library tv_add_input_library;
- ld_plugin_set_extra_library_path tv_set_extra_library_path;
- ld_plugin_get_input_section_count tv_get_input_section_count;
- ld_plugin_get_input_section_type tv_get_input_section_type;
- ld_plugin_get_input_section_name tv_get_input_section_name;
- ld_plugin_get_input_section_contents tv_get_input_section_contents;
- ld_plugin_update_section_order tv_update_section_order;
- ld_plugin_allow_section_ordering tv_allow_section_ordering;
- ld_plugin_allow_unique_segment_for_sections tv_allow_unique_segment_for_sections;
- ld_plugin_unique_segment_for_sections tv_unique_segment_for_sections;
- ld_plugin_get_input_section_alignment tv_get_input_section_alignment;
- ld_plugin_get_input_section_size tv_get_input_section_size;
- ld_plugin_register_new_input tv_register_new_input;
- ld_plugin_get_wrap_symbols tv_get_wrap_symbols;
- } tv_u;
-};
-
-/* The plugin library's "onload" entry point. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_onload) (struct ld_plugin_tv *tv);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !defined(PLUGIN_API_H) */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/bnxt_re-abi.h b/lib/libc/include/generic-musl/rdma/bnxt_re-abi.h
deleted file mode 100644
index 9eab2b0aec28a7fd253b7555fadd8011a2056f11..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/bnxt_re-abi.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
-/*
- * Broadcom NetXtreme-E RoCE driver.
- *
- * Copyright (c) 2016 - 2017, Broadcom. All rights reserved. The term
- * Broadcom refers to Broadcom Limited and/or its subsidiaries.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * BSD license below:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Description: Uverbs ABI header file
- */
-
-#ifndef __BNXT_RE_UVERBS_ABI_H__
-#define __BNXT_RE_UVERBS_ABI_H__
-
-#include
-
-#define BNXT_RE_ABI_VERSION 1
-
-struct bnxt_re_uctx_resp {
- __u32 dev_id;
- __u32 max_qp;
- __u32 pg_size;
- __u32 cqe_sz;
- __u32 max_cqd;
- __u32 rsvd;
-};
-
-/*
- * This struct is placed after the ib_uverbs_alloc_pd_resp struct, which is
- * not 8 byted aligned. To avoid undesired padding in various cases we have to
- * set this struct to packed.
- */
-struct bnxt_re_pd_resp {
- __u32 pdid;
- __u32 dpi;
- __u64 dbr;
-} __attribute__((packed, aligned(4)));
-
-struct bnxt_re_cq_req {
- __aligned_u64 cq_va;
- __aligned_u64 cq_handle;
-};
-
-struct bnxt_re_cq_resp {
- __u32 cqid;
- __u32 tail;
- __u32 phase;
- __u32 rsvd;
-};
-
-struct bnxt_re_qp_req {
- __aligned_u64 qpsva;
- __aligned_u64 qprva;
- __aligned_u64 qp_handle;
-};
-
-struct bnxt_re_qp_resp {
- __u32 qpid;
- __u32 rsvd;
-};
-
-struct bnxt_re_srq_req {
- __aligned_u64 srqva;
- __aligned_u64 srq_handle;
-};
-
-struct bnxt_re_srq_resp {
- __u32 srqid;
-};
-
-enum bnxt_re_shpg_offt {
- BNXT_RE_BEG_RESV_OFFT = 0x00,
- BNXT_RE_AVID_OFFT = 0x10,
- BNXT_RE_AVID_SIZE = 0x04,
- BNXT_RE_END_RESV_OFFT = 0xFF0
-};
-
-#endif /* __BNXT_RE_UVERBS_ABI_H__*/
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/cxgb3-abi.h b/lib/libc/include/generic-musl/rdma/cxgb3-abi.h
deleted file mode 100644
index 6e1b36da467e334185b3870adc4087ca1e878352..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/cxgb3-abi.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/*
- * Copyright (c) 2006 Chelsio, Inc. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef CXGB3_ABI_USER_H
-#define CXGB3_ABI_USER_H
-
-#include
-
-#define IWCH_UVERBS_ABI_VERSION 1
-
-/*
- * Make sure that all structs defined in this file remain laid out so
- * that they pack the same way on 32-bit and 64-bit architectures (to
- * avoid incompatibility between 32-bit userspace and 64-bit kernels).
- * In particular do not use pointer types -- pass pointers in __aligned_u64
- * instead.
- */
-struct iwch_create_cq_req {
- __aligned_u64 user_rptr_addr;
-};
-
-struct iwch_create_cq_resp_v0 {
- __aligned_u64 key;
- __u32 cqid;
- __u32 size_log2;
-};
-
-struct iwch_create_cq_resp {
- __aligned_u64 key;
- __u32 cqid;
- __u32 size_log2;
- __u32 memsize;
- __u32 reserved;
-};
-
-struct iwch_create_qp_resp {
- __aligned_u64 key;
- __aligned_u64 db_key;
- __u32 qpid;
- __u32 size_log2;
- __u32 sq_size_log2;
- __u32 rq_size_log2;
-};
-
-struct iwch_reg_user_mr_resp {
- __u32 pbl_addr;
-};
-
-struct iwch_alloc_pd_resp {
- __u32 pdid;
-};
-
-#endif /* CXGB3_ABI_USER_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/cxgb4-abi.h b/lib/libc/include/generic-musl/rdma/cxgb4-abi.h
deleted file mode 100644
index 8ab7cb26ea051eb4f2c37aaeb7701c214d154ddf..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/cxgb4-abi.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/*
- * Copyright (c) 2009-2010 Chelsio, Inc. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef CXGB4_ABI_USER_H
-#define CXGB4_ABI_USER_H
-
-#include
-
-#define C4IW_UVERBS_ABI_VERSION 3
-
-/*
- * Make sure that all structs defined in this file remain laid out so
- * that they pack the same way on 32-bit and 64-bit architectures (to
- * avoid incompatibility between 32-bit userspace and 64-bit kernels).
- * In particular do not use pointer types -- pass pointers in __aligned_u64
- * instead.
- */
-
-enum {
- C4IW_64B_CQE = (1 << 0)
-};
-
-struct c4iw_create_cq {
- __u32 flags;
- __u32 reserved;
-};
-
-struct c4iw_create_cq_resp {
- __aligned_u64 key;
- __aligned_u64 gts_key;
- __aligned_u64 memsize;
- __u32 cqid;
- __u32 size;
- __u32 qid_mask;
- __u32 flags;
-};
-
-enum {
- C4IW_QPF_ONCHIP = (1 << 0),
- C4IW_QPF_WRITE_W_IMM = (1 << 1)
-};
-
-struct c4iw_create_qp_resp {
- __aligned_u64 ma_sync_key;
- __aligned_u64 sq_key;
- __aligned_u64 rq_key;
- __aligned_u64 sq_db_gts_key;
- __aligned_u64 rq_db_gts_key;
- __aligned_u64 sq_memsize;
- __aligned_u64 rq_memsize;
- __u32 sqid;
- __u32 rqid;
- __u32 sq_size;
- __u32 rq_size;
- __u32 qid_mask;
- __u32 flags;
-};
-
-struct c4iw_create_srq_resp {
- __aligned_u64 srq_key;
- __aligned_u64 srq_db_gts_key;
- __aligned_u64 srq_memsize;
- __u32 srqid;
- __u32 srq_size;
- __u32 rqt_abs_idx;
- __u32 qid_mask;
- __u32 flags;
- __u32 reserved; /* explicit padding */
-};
-
-enum {
- /* HW supports SRQ_LIMIT_REACHED event */
- T4_SRQ_LIMIT_SUPPORT = 1 << 0,
-};
-
-struct c4iw_alloc_ucontext_resp {
- __aligned_u64 status_page_key;
- __u32 status_page_size;
- __u32 reserved; /* explicit padding (optional for i386) */
-};
-
-struct c4iw_alloc_pd_resp {
- __u32 pdid;
-};
-
-#endif /* CXGB4_ABI_USER_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/hfi/hfi1_ioctl.h b/lib/libc/include/generic-musl/rdma/hfi/hfi1_ioctl.h
deleted file mode 100644
index 07d9c8abc49a6b623c67034772575060d339550d..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/hfi/hfi1_ioctl.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
-/*
- *
- * This file is provided under a dual BSD/GPLv2 license. When using or
- * redistributing this file, you may do so under either license.
- *
- * GPL LICENSE SUMMARY
- *
- * Copyright(c) 2015 Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * BSD LICENSE
- *
- * Copyright(c) 2015 Intel Corporation.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * - Neither the name of Intel Corporation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef _LINUX__HFI1_IOCTL_H
-#define _LINUX__HFI1_IOCTL_H
-#include
-
-/*
- * This structure is passed to the driver to tell it where
- * user code buffers are, sizes, etc. The offsets and sizes of the
- * fields must remain unchanged, for binary compatibility. It can
- * be extended, if userversion is changed so user code can tell, if needed
- */
-struct hfi1_user_info {
- /*
- * version of user software, to detect compatibility issues.
- * Should be set to HFI1_USER_SWVERSION.
- */
- __u32 userversion;
- __u32 pad;
- /*
- * If two or more processes wish to share a context, each process
- * must set the subcontext_cnt and subcontext_id to the same
- * values. The only restriction on the subcontext_id is that
- * it be unique for a given node.
- */
- __u16 subctxt_cnt;
- __u16 subctxt_id;
- /* 128bit UUID passed in by PSM. */
- __u8 uuid[16];
-};
-
-struct hfi1_ctxt_info {
- __aligned_u64 runtime_flags; /* chip/drv runtime flags (HFI1_CAP_*) */
- __u32 rcvegr_size; /* size of each eager buffer */
- __u16 num_active; /* number of active units */
- __u16 unit; /* unit (chip) assigned to caller */
- __u16 ctxt; /* ctxt on unit assigned to caller */
- __u16 subctxt; /* subctxt on unit assigned to caller */
- __u16 rcvtids; /* number of Rcv TIDs for this context */
- __u16 credits; /* number of PIO credits for this context */
- __u16 numa_node; /* NUMA node of the assigned device */
- __u16 rec_cpu; /* cpu # for affinity (0xffff if none) */
- __u16 send_ctxt; /* send context in use by this user context */
- __u16 egrtids; /* number of RcvArray entries for Eager Rcvs */
- __u16 rcvhdrq_cnt; /* number of RcvHdrQ entries */
- __u16 rcvhdrq_entsize; /* size (in bytes) for each RcvHdrQ entry */
- __u16 sdma_ring_size; /* number of entries in SDMA request ring */
-};
-
-struct hfi1_tid_info {
- /* virtual address of first page in transfer */
- __aligned_u64 vaddr;
- /* pointer to tid array. this array is big enough */
- __aligned_u64 tidlist;
- /* number of tids programmed by this request */
- __u32 tidcnt;
- /* length of transfer buffer programmed by this request */
- __u32 length;
-};
-
-/*
- * This structure is returned by the driver immediately after
- * open to get implementation-specific info, and info specific to this
- * instance.
- *
- * This struct must have explicit pad fields where type sizes
- * may result in different alignments between 32 and 64 bit
- * programs, since the 64 bit * bit kernel requires the user code
- * to have matching offsets
- */
-struct hfi1_base_info {
- /* version of hardware, for feature checking. */
- __u32 hw_version;
- /* version of software, for feature checking. */
- __u32 sw_version;
- /* Job key */
- __u16 jkey;
- __u16 padding1;
- /*
- * The special QP (queue pair) value that identifies PSM
- * protocol packet from standard IB packets.
- */
- __u32 bthqp;
- /* PIO credit return address, */
- __aligned_u64 sc_credits_addr;
- /*
- * Base address of write-only pio buffers for this process.
- * Each buffer has sendpio_credits*64 bytes.
- */
- __aligned_u64 pio_bufbase_sop;
- /*
- * Base address of write-only pio buffers for this process.
- * Each buffer has sendpio_credits*64 bytes.
- */
- __aligned_u64 pio_bufbase;
- /* address where receive buffer queue is mapped into */
- __aligned_u64 rcvhdr_bufbase;
- /* base address of Eager receive buffers. */
- __aligned_u64 rcvegr_bufbase;
- /* base address of SDMA completion ring */
- __aligned_u64 sdma_comp_bufbase;
- /*
- * User register base for init code, not to be used directly by
- * protocol or applications. Always maps real chip register space.
- * the register addresses are:
- * ur_rcvhdrhead, ur_rcvhdrtail, ur_rcvegrhead, ur_rcvegrtail,
- * ur_rcvtidflow
- */
- __aligned_u64 user_regbase;
- /* notification events */
- __aligned_u64 events_bufbase;
- /* status page */
- __aligned_u64 status_bufbase;
- /* rcvhdrtail update */
- __aligned_u64 rcvhdrtail_base;
- /*
- * shared memory pages for subctxts if ctxt is shared; these cover
- * all the processes in the group sharing a single context.
- * all have enough space for the num_subcontexts value on this job.
- */
- __aligned_u64 subctxt_uregbase;
- __aligned_u64 subctxt_rcvegrbuf;
- __aligned_u64 subctxt_rcvhdrbuf;
-};
-#endif /* _LINIUX__HFI1_IOCTL_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/hfi/hfi1_user.h b/lib/libc/include/generic-musl/rdma/hfi/hfi1_user.h
deleted file mode 100644
index f15f5c52ac7aae2db53fb0108350db54dc2ef003..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/hfi/hfi1_user.h
+++ /dev/null
@@ -1,267 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
-/*
- *
- * This file is provided under a dual BSD/GPLv2 license. When using or
- * redistributing this file, you may do so under either license.
- *
- * GPL LICENSE SUMMARY
- *
- * Copyright(c) 2015 Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * BSD LICENSE
- *
- * Copyright(c) 2015 Intel Corporation.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * - Neither the name of Intel Corporation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-/*
- * This file contains defines, structures, etc. that are used
- * to communicate between kernel and user code.
- */
-
-#ifndef _LINUX__HFI1_USER_H
-#define _LINUX__HFI1_USER_H
-
-#include
-#include
-
-/*
- * This version number is given to the driver by the user code during
- * initialization in the spu_userversion field of hfi1_user_info, so
- * the driver can check for compatibility with user code.
- *
- * The major version changes when data structures change in an incompatible
- * way. The driver must be the same for initialization to succeed.
- */
-#define HFI1_USER_SWMAJOR 6
-
-/*
- * Minor version differences are always compatible
- * a within a major version, however if user software is larger
- * than driver software, some new features and/or structure fields
- * may not be implemented; the user code must deal with this if it
- * cares, or it must abort after initialization reports the difference.
- */
-#define HFI1_USER_SWMINOR 3
-
-/*
- * We will encode the major/minor inside a single 32bit version number.
- */
-#define HFI1_SWMAJOR_SHIFT 16
-
-/*
- * Set of HW and driver capability/feature bits.
- * These bit values are used to configure enabled/disabled HW and
- * driver features. The same set of bits are communicated to user
- * space.
- */
-#define HFI1_CAP_DMA_RTAIL (1UL << 0) /* Use DMA'ed RTail value */
-#define HFI1_CAP_SDMA (1UL << 1) /* Enable SDMA support */
-#define HFI1_CAP_SDMA_AHG (1UL << 2) /* Enable SDMA AHG support */
-#define HFI1_CAP_EXTENDED_PSN (1UL << 3) /* Enable Extended PSN support */
-#define HFI1_CAP_HDRSUPP (1UL << 4) /* Enable Header Suppression */
-/* 1UL << 5 unused */
-#define HFI1_CAP_USE_SDMA_HEAD (1UL << 6) /* DMA Hdr Q tail vs. use CSR */
-#define HFI1_CAP_MULTI_PKT_EGR (1UL << 7) /* Enable multi-packet Egr buffs*/
-#define HFI1_CAP_NODROP_RHQ_FULL (1UL << 8) /* Don't drop on Hdr Q full */
-#define HFI1_CAP_NODROP_EGR_FULL (1UL << 9) /* Don't drop on EGR buffs full */
-#define HFI1_CAP_TID_UNMAP (1UL << 10) /* Disable Expected TID caching */
-#define HFI1_CAP_PRINT_UNIMPL (1UL << 11) /* Show for unimplemented feats */
-#define HFI1_CAP_ALLOW_PERM_JKEY (1UL << 12) /* Allow use of permissive JKEY */
-#define HFI1_CAP_NO_INTEGRITY (1UL << 13) /* Enable ctxt integrity checks */
-#define HFI1_CAP_PKEY_CHECK (1UL << 14) /* Enable ctxt PKey checking */
-#define HFI1_CAP_STATIC_RATE_CTRL (1UL << 15) /* Allow PBC.StaticRateControl */
-/* 1UL << 16 unused */
-#define HFI1_CAP_SDMA_HEAD_CHECK (1UL << 17) /* SDMA head checking */
-#define HFI1_CAP_EARLY_CREDIT_RETURN (1UL << 18) /* early credit return */
-
-#define HFI1_RCVHDR_ENTSIZE_2 (1UL << 0)
-#define HFI1_RCVHDR_ENTSIZE_16 (1UL << 1)
-#define HFI1_RCVDHR_ENTSIZE_32 (1UL << 2)
-
-#define _HFI1_EVENT_FROZEN_BIT 0
-#define _HFI1_EVENT_LINKDOWN_BIT 1
-#define _HFI1_EVENT_LID_CHANGE_BIT 2
-#define _HFI1_EVENT_LMC_CHANGE_BIT 3
-#define _HFI1_EVENT_SL2VL_CHANGE_BIT 4
-#define _HFI1_EVENT_TID_MMU_NOTIFY_BIT 5
-#define _HFI1_MAX_EVENT_BIT _HFI1_EVENT_TID_MMU_NOTIFY_BIT
-
-#define HFI1_EVENT_FROZEN (1UL << _HFI1_EVENT_FROZEN_BIT)
-#define HFI1_EVENT_LINKDOWN (1UL << _HFI1_EVENT_LINKDOWN_BIT)
-#define HFI1_EVENT_LID_CHANGE (1UL << _HFI1_EVENT_LID_CHANGE_BIT)
-#define HFI1_EVENT_LMC_CHANGE (1UL << _HFI1_EVENT_LMC_CHANGE_BIT)
-#define HFI1_EVENT_SL2VL_CHANGE (1UL << _HFI1_EVENT_SL2VL_CHANGE_BIT)
-#define HFI1_EVENT_TID_MMU_NOTIFY (1UL << _HFI1_EVENT_TID_MMU_NOTIFY_BIT)
-
-/*
- * These are the status bits readable (in ASCII form, 64bit value)
- * from the "status" sysfs file. For binary compatibility, values
- * must remain as is; removed states can be reused for different
- * purposes.
- */
-#define HFI1_STATUS_INITTED 0x1 /* basic initialization done */
-/* Chip has been found and initialized */
-#define HFI1_STATUS_CHIP_PRESENT 0x20
-/* IB link is at ACTIVE, usable for data traffic */
-#define HFI1_STATUS_IB_READY 0x40
-/* link is configured, LID, MTU, etc. have been set */
-#define HFI1_STATUS_IB_CONF 0x80
-/* A Fatal hardware error has occurred. */
-#define HFI1_STATUS_HWERROR 0x200
-
-/*
- * Number of supported shared contexts.
- * This is the maximum number of software contexts that can share
- * a hardware send/receive context.
- */
-#define HFI1_MAX_SHARED_CTXTS 8
-
-/*
- * Poll types
- */
-#define HFI1_POLL_TYPE_ANYRCV 0x0
-#define HFI1_POLL_TYPE_URGENT 0x1
-
-enum hfi1_sdma_comp_state {
- FREE = 0,
- QUEUED,
- COMPLETE,
- ERROR
-};
-
-/*
- * SDMA completion ring entry
- */
-struct hfi1_sdma_comp_entry {
- __u32 status;
- __u32 errcode;
-};
-
-/*
- * Device status and notifications from driver to user-space.
- */
-struct hfi1_status {
- __aligned_u64 dev; /* device/hw status bits */
- __aligned_u64 port; /* port state and status bits */
- char freezemsg[0];
-};
-
-enum sdma_req_opcode {
- EXPECTED = 0,
- EAGER
-};
-
-#define HFI1_SDMA_REQ_VERSION_MASK 0xF
-#define HFI1_SDMA_REQ_VERSION_SHIFT 0x0
-#define HFI1_SDMA_REQ_OPCODE_MASK 0xF
-#define HFI1_SDMA_REQ_OPCODE_SHIFT 0x4
-#define HFI1_SDMA_REQ_IOVCNT_MASK 0xFF
-#define HFI1_SDMA_REQ_IOVCNT_SHIFT 0x8
-
-struct sdma_req_info {
- /*
- * bits 0-3 - version (currently unused)
- * bits 4-7 - opcode (enum sdma_req_opcode)
- * bits 8-15 - io vector count
- */
- __u16 ctrl;
- /*
- * Number of fragments contained in this request.
- * User-space has already computed how many
- * fragment-sized packet the user buffer will be
- * split into.
- */
- __u16 npkts;
- /*
- * Size of each fragment the user buffer will be
- * split into.
- */
- __u16 fragsize;
- /*
- * Index of the slot in the SDMA completion ring
- * this request should be using. User-space is
- * in charge of managing its own ring.
- */
- __u16 comp_idx;
-} __attribute__((__packed__));
-
-/*
- * SW KDETH header.
- * swdata is SW defined portion.
- */
-struct hfi1_kdeth_header {
- __le32 ver_tid_offset;
- __le16 jkey;
- __le16 hcrc;
- __le32 swdata[7];
-} __attribute__((__packed__));
-
-/*
- * Structure describing the headers that User space uses. The
- * structure above is a subset of this one.
- */
-struct hfi1_pkt_header {
- __le16 pbc[4];
- __be16 lrh[4];
- __be32 bth[3];
- struct hfi1_kdeth_header kdeth;
-} __attribute__((__packed__));
-
-
-/*
- * The list of usermode accessible registers.
- */
-enum hfi1_ureg {
- /* (RO) DMA RcvHdr to be used next. */
- ur_rcvhdrtail = 0,
- /* (RW) RcvHdr entry to be processed next by host. */
- ur_rcvhdrhead = 1,
- /* (RO) Index of next Eager index to use. */
- ur_rcvegrindextail = 2,
- /* (RW) Eager TID to be processed next */
- ur_rcvegrindexhead = 3,
- /* (RO) Receive Eager Offset Tail */
- ur_rcvegroffsettail = 4,
- /* For internal use only; max register number. */
- ur_maxreg,
- /* (RW) Receive TID flow table */
- ur_rcvtidflowtable = 256
-};
-
-#endif /* _LINIUX__HFI1_USER_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/hns-abi.h b/lib/libc/include/generic-musl/rdma/hns-abi.h
deleted file mode 100644
index 1e1f7e8da86db6f8584586d0b12b9a2b7a836729..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/hns-abi.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/*
- * Copyright (c) 2016 Hisilicon Limited.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef HNS_ABI_USER_H
-#define HNS_ABI_USER_H
-
-#include
-
-struct hns_roce_ib_create_cq {
- __aligned_u64 buf_addr;
- __aligned_u64 db_addr;
-};
-
-struct hns_roce_ib_create_cq_resp {
- __aligned_u64 cqn; /* Only 32 bits used, 64 for compat */
- __aligned_u64 cap_flags;
-};
-
-struct hns_roce_ib_create_qp {
- __aligned_u64 buf_addr;
- __aligned_u64 db_addr;
- __u8 log_sq_bb_count;
- __u8 log_sq_stride;
- __u8 sq_no_prefetch;
- __u8 reserved[5];
- __aligned_u64 sdb_addr;
-};
-
-struct hns_roce_ib_create_qp_resp {
- __aligned_u64 cap_flags;
-};
-
-struct hns_roce_ib_alloc_ucontext_resp {
- __u32 qp_tab_size;
- __u32 reserved;
-};
-
-struct hns_roce_ib_alloc_pd_resp {
- __u32 pdn;
-};
-
-#endif /* HNS_ABI_USER_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/i40iw-abi.h b/lib/libc/include/generic-musl/rdma/i40iw-abi.h
deleted file mode 100644
index cef8c4624de658cb6c7073acee5ea6f99c104675..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/i40iw-abi.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2006 - 2016 Intel Corporation. All rights reserved.
- * Copyright (c) 2005 Topspin Communications. All rights reserved.
- * Copyright (c) 2005 Cisco Systems. All rights reserved.
- * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-#ifndef I40IW_ABI_H
-#define I40IW_ABI_H
-
-#include
-
-#define I40IW_ABI_VER 5
-
-struct i40iw_alloc_ucontext_req {
- __u32 reserved32;
- __u8 userspace_ver;
- __u8 reserved8[3];
-};
-
-struct i40iw_alloc_ucontext_resp {
- __u32 max_pds; /* maximum pds allowed for this user process */
- __u32 max_qps; /* maximum qps allowed for this user process */
- __u32 wq_size; /* size of the WQs (sq+rq) allocated to the mmaped area */
- __u8 kernel_ver;
- __u8 reserved[3];
-};
-
-struct i40iw_alloc_pd_resp {
- __u32 pd_id;
- __u8 reserved[4];
-};
-
-struct i40iw_create_cq_req {
- __aligned_u64 user_cq_buffer;
- __aligned_u64 user_shadow_area;
-};
-
-struct i40iw_create_qp_req {
- __aligned_u64 user_wqe_buffers;
- __aligned_u64 user_compl_ctx;
-
- /* UDA QP PHB */
- __aligned_u64 user_sq_phb; /* place for VA of the sq phb buff */
- __aligned_u64 user_rq_phb; /* place for VA of the rq phb buff */
-};
-
-enum i40iw_memreg_type {
- IW_MEMREG_TYPE_MEM = 0x0000,
- IW_MEMREG_TYPE_QP = 0x0001,
- IW_MEMREG_TYPE_CQ = 0x0002,
-};
-
-struct i40iw_mem_reg_req {
- __u16 reg_type; /* Memory, QP or CQ */
- __u16 cq_pages;
- __u16 rq_pages;
- __u16 sq_pages;
-};
-
-struct i40iw_create_cq_resp {
- __u32 cq_id;
- __u32 cq_size;
- __u32 mmap_db_index;
- __u32 reserved;
-};
-
-struct i40iw_create_qp_resp {
- __u32 qp_id;
- __u32 actual_sq_size;
- __u32 actual_rq_size;
- __u32 i40iw_drv_opt;
- __u16 push_idx;
- __u8 lsmm;
- __u8 rsvd2;
-};
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/ib_user_cm.h b/lib/libc/include/generic-musl/rdma/ib_user_cm.h
deleted file mode 100644
index 9637f729ad8fc1b0bbd273c5074089f012c48846..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/ib_user_cm.h
+++ /dev/null
@@ -1,326 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/*
- * Copyright (c) 2005 Topspin Communications. All rights reserved.
- * Copyright (c) 2005 Intel Corporation. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef IB_USER_CM_H
-#define IB_USER_CM_H
-
-#include
-#include
-
-#define IB_USER_CM_ABI_VERSION 5
-
-enum {
- IB_USER_CM_CMD_CREATE_ID,
- IB_USER_CM_CMD_DESTROY_ID,
- IB_USER_CM_CMD_ATTR_ID,
-
- IB_USER_CM_CMD_LISTEN,
- IB_USER_CM_CMD_NOTIFY,
-
- IB_USER_CM_CMD_SEND_REQ,
- IB_USER_CM_CMD_SEND_REP,
- IB_USER_CM_CMD_SEND_RTU,
- IB_USER_CM_CMD_SEND_DREQ,
- IB_USER_CM_CMD_SEND_DREP,
- IB_USER_CM_CMD_SEND_REJ,
- IB_USER_CM_CMD_SEND_MRA,
- IB_USER_CM_CMD_SEND_LAP,
- IB_USER_CM_CMD_SEND_APR,
- IB_USER_CM_CMD_SEND_SIDR_REQ,
- IB_USER_CM_CMD_SEND_SIDR_REP,
-
- IB_USER_CM_CMD_EVENT,
- IB_USER_CM_CMD_INIT_QP_ATTR,
-};
-/*
- * command ABI structures.
- */
-struct ib_ucm_cmd_hdr {
- __u32 cmd;
- __u16 in;
- __u16 out;
-};
-
-struct ib_ucm_create_id {
- __aligned_u64 uid;
- __aligned_u64 response;
-};
-
-struct ib_ucm_create_id_resp {
- __u32 id;
-};
-
-struct ib_ucm_destroy_id {
- __aligned_u64 response;
- __u32 id;
- __u32 reserved;
-};
-
-struct ib_ucm_destroy_id_resp {
- __u32 events_reported;
-};
-
-struct ib_ucm_attr_id {
- __aligned_u64 response;
- __u32 id;
- __u32 reserved;
-};
-
-struct ib_ucm_attr_id_resp {
- __be64 service_id;
- __be64 service_mask;
- __be32 local_id;
- __be32 remote_id;
-};
-
-struct ib_ucm_init_qp_attr {
- __aligned_u64 response;
- __u32 id;
- __u32 qp_state;
-};
-
-struct ib_ucm_listen {
- __be64 service_id;
- __be64 service_mask;
- __u32 id;
- __u32 reserved;
-};
-
-struct ib_ucm_notify {
- __u32 id;
- __u32 event;
-};
-
-struct ib_ucm_private_data {
- __aligned_u64 data;
- __u32 id;
- __u8 len;
- __u8 reserved[3];
-};
-
-struct ib_ucm_req {
- __u32 id;
- __u32 qpn;
- __u32 qp_type;
- __u32 psn;
- __be64 sid;
- __aligned_u64 data;
- __aligned_u64 primary_path;
- __aligned_u64 alternate_path;
- __u8 len;
- __u8 peer_to_peer;
- __u8 responder_resources;
- __u8 initiator_depth;
- __u8 remote_cm_response_timeout;
- __u8 flow_control;
- __u8 local_cm_response_timeout;
- __u8 retry_count;
- __u8 rnr_retry_count;
- __u8 max_cm_retries;
- __u8 srq;
- __u8 reserved[5];
-};
-
-struct ib_ucm_rep {
- __aligned_u64 uid;
- __aligned_u64 data;
- __u32 id;
- __u32 qpn;
- __u32 psn;
- __u8 len;
- __u8 responder_resources;
- __u8 initiator_depth;
- __u8 target_ack_delay;
- __u8 failover_accepted;
- __u8 flow_control;
- __u8 rnr_retry_count;
- __u8 srq;
- __u8 reserved[4];
-};
-
-struct ib_ucm_info {
- __u32 id;
- __u32 status;
- __aligned_u64 info;
- __aligned_u64 data;
- __u8 info_len;
- __u8 data_len;
- __u8 reserved[6];
-};
-
-struct ib_ucm_mra {
- __aligned_u64 data;
- __u32 id;
- __u8 len;
- __u8 timeout;
- __u8 reserved[2];
-};
-
-struct ib_ucm_lap {
- __aligned_u64 path;
- __aligned_u64 data;
- __u32 id;
- __u8 len;
- __u8 reserved[3];
-};
-
-struct ib_ucm_sidr_req {
- __u32 id;
- __u32 timeout;
- __be64 sid;
- __aligned_u64 data;
- __aligned_u64 path;
- __u16 reserved_pkey;
- __u8 len;
- __u8 max_cm_retries;
- __u8 reserved[4];
-};
-
-struct ib_ucm_sidr_rep {
- __u32 id;
- __u32 qpn;
- __u32 qkey;
- __u32 status;
- __aligned_u64 info;
- __aligned_u64 data;
- __u8 info_len;
- __u8 data_len;
- __u8 reserved[6];
-};
-/*
- * event notification ABI structures.
- */
-struct ib_ucm_event_get {
- __aligned_u64 response;
- __aligned_u64 data;
- __aligned_u64 info;
- __u8 data_len;
- __u8 info_len;
- __u8 reserved[6];
-};
-
-struct ib_ucm_req_event_resp {
- struct ib_user_path_rec primary_path;
- struct ib_user_path_rec alternate_path;
- __be64 remote_ca_guid;
- __u32 remote_qkey;
- __u32 remote_qpn;
- __u32 qp_type;
- __u32 starting_psn;
- __u8 responder_resources;
- __u8 initiator_depth;
- __u8 local_cm_response_timeout;
- __u8 flow_control;
- __u8 remote_cm_response_timeout;
- __u8 retry_count;
- __u8 rnr_retry_count;
- __u8 srq;
- __u8 port;
- __u8 reserved[7];
-};
-
-struct ib_ucm_rep_event_resp {
- __be64 remote_ca_guid;
- __u32 remote_qkey;
- __u32 remote_qpn;
- __u32 starting_psn;
- __u8 responder_resources;
- __u8 initiator_depth;
- __u8 target_ack_delay;
- __u8 failover_accepted;
- __u8 flow_control;
- __u8 rnr_retry_count;
- __u8 srq;
- __u8 reserved[5];
-};
-
-struct ib_ucm_rej_event_resp {
- __u32 reason;
- /* ari in ib_ucm_event_get info field. */
-};
-
-struct ib_ucm_mra_event_resp {
- __u8 timeout;
- __u8 reserved[3];
-};
-
-struct ib_ucm_lap_event_resp {
- struct ib_user_path_rec path;
-};
-
-struct ib_ucm_apr_event_resp {
- __u32 status;
- /* apr info in ib_ucm_event_get info field. */
-};
-
-struct ib_ucm_sidr_req_event_resp {
- __u16 pkey;
- __u8 port;
- __u8 reserved;
-};
-
-struct ib_ucm_sidr_rep_event_resp {
- __u32 status;
- __u32 qkey;
- __u32 qpn;
- /* info in ib_ucm_event_get info field. */
-};
-
-#define IB_UCM_PRES_DATA 0x01
-#define IB_UCM_PRES_INFO 0x02
-#define IB_UCM_PRES_PRIMARY 0x04
-#define IB_UCM_PRES_ALTERNATE 0x08
-
-struct ib_ucm_event_resp {
- __aligned_u64 uid;
- __u32 id;
- __u32 event;
- __u32 present;
- __u32 reserved;
- union {
- struct ib_ucm_req_event_resp req_resp;
- struct ib_ucm_rep_event_resp rep_resp;
- struct ib_ucm_rej_event_resp rej_resp;
- struct ib_ucm_mra_event_resp mra_resp;
- struct ib_ucm_lap_event_resp lap_resp;
- struct ib_ucm_apr_event_resp apr_resp;
-
- struct ib_ucm_sidr_req_event_resp sidr_req_resp;
- struct ib_ucm_sidr_rep_event_resp sidr_rep_resp;
-
- __u32 send_status;
- } u;
-};
-
-#endif /* IB_USER_CM_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/ib_user_ioctl_cmds.h b/lib/libc/include/generic-musl/rdma/ib_user_ioctl_cmds.h
deleted file mode 100644
index 5d756e099b66f7b35e580b86e648a471ac5c2ca5..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/ib_user_ioctl_cmds.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 2018, Mellanox Technologies inc. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef IB_USER_IOCTL_CMDS_H
-#define IB_USER_IOCTL_CMDS_H
-
-#define UVERBS_ID_NS_MASK 0xF000
-#define UVERBS_ID_NS_SHIFT 12
-
-#define UVERBS_UDATA_DRIVER_DATA_NS 1
-#define UVERBS_UDATA_DRIVER_DATA_FLAG (1UL << UVERBS_ID_NS_SHIFT)
-
-enum uverbs_default_objects {
- UVERBS_OBJECT_DEVICE, /* No instances of DEVICE are allowed */
- UVERBS_OBJECT_PD,
- UVERBS_OBJECT_COMP_CHANNEL,
- UVERBS_OBJECT_CQ,
- UVERBS_OBJECT_QP,
- UVERBS_OBJECT_SRQ,
- UVERBS_OBJECT_AH,
- UVERBS_OBJECT_MR,
- UVERBS_OBJECT_MW,
- UVERBS_OBJECT_FLOW,
- UVERBS_OBJECT_XRCD,
- UVERBS_OBJECT_RWQ_IND_TBL,
- UVERBS_OBJECT_WQ,
- UVERBS_OBJECT_FLOW_ACTION,
- UVERBS_OBJECT_DM,
- UVERBS_OBJECT_COUNTERS,
-};
-
-enum {
- UVERBS_ATTR_UHW_IN = UVERBS_UDATA_DRIVER_DATA_FLAG,
- UVERBS_ATTR_UHW_OUT,
-};
-
-enum uverbs_attrs_create_cq_cmd_attr_ids {
- UVERBS_ATTR_CREATE_CQ_HANDLE,
- UVERBS_ATTR_CREATE_CQ_CQE,
- UVERBS_ATTR_CREATE_CQ_USER_HANDLE,
- UVERBS_ATTR_CREATE_CQ_COMP_CHANNEL,
- UVERBS_ATTR_CREATE_CQ_COMP_VECTOR,
- UVERBS_ATTR_CREATE_CQ_FLAGS,
- UVERBS_ATTR_CREATE_CQ_RESP_CQE,
-};
-
-enum uverbs_attrs_destroy_cq_cmd_attr_ids {
- UVERBS_ATTR_DESTROY_CQ_HANDLE,
- UVERBS_ATTR_DESTROY_CQ_RESP,
-};
-
-enum uverbs_attrs_create_flow_action_esp {
- UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE,
- UVERBS_ATTR_FLOW_ACTION_ESP_ATTRS,
- UVERBS_ATTR_FLOW_ACTION_ESP_ESN,
- UVERBS_ATTR_FLOW_ACTION_ESP_KEYMAT,
- UVERBS_ATTR_FLOW_ACTION_ESP_REPLAY,
- UVERBS_ATTR_FLOW_ACTION_ESP_ENCAP,
-};
-
-enum uverbs_attrs_modify_flow_action_esp {
- UVERBS_ATTR_MODIFY_FLOW_ACTION_ESP_HANDLE =
- UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE,
-};
-
-enum uverbs_attrs_destroy_flow_action_esp {
- UVERBS_ATTR_DESTROY_FLOW_ACTION_HANDLE,
-};
-
-enum uverbs_methods_cq {
- UVERBS_METHOD_CQ_CREATE,
- UVERBS_METHOD_CQ_DESTROY,
-};
-
-enum uverbs_methods_actions_flow_action_ops {
- UVERBS_METHOD_FLOW_ACTION_ESP_CREATE,
- UVERBS_METHOD_FLOW_ACTION_DESTROY,
- UVERBS_METHOD_FLOW_ACTION_ESP_MODIFY,
-};
-
-enum uverbs_attrs_alloc_dm_cmd_attr_ids {
- UVERBS_ATTR_ALLOC_DM_HANDLE,
- UVERBS_ATTR_ALLOC_DM_LENGTH,
- UVERBS_ATTR_ALLOC_DM_ALIGNMENT,
-};
-
-enum uverbs_attrs_free_dm_cmd_attr_ids {
- UVERBS_ATTR_FREE_DM_HANDLE,
-};
-
-enum uverbs_methods_dm {
- UVERBS_METHOD_DM_ALLOC,
- UVERBS_METHOD_DM_FREE,
-};
-
-enum uverbs_attrs_reg_dm_mr_cmd_attr_ids {
- UVERBS_ATTR_REG_DM_MR_HANDLE,
- UVERBS_ATTR_REG_DM_MR_OFFSET,
- UVERBS_ATTR_REG_DM_MR_LENGTH,
- UVERBS_ATTR_REG_DM_MR_PD_HANDLE,
- UVERBS_ATTR_REG_DM_MR_ACCESS_FLAGS,
- UVERBS_ATTR_REG_DM_MR_DM_HANDLE,
- UVERBS_ATTR_REG_DM_MR_RESP_LKEY,
- UVERBS_ATTR_REG_DM_MR_RESP_RKEY,
-};
-
-enum uverbs_methods_mr {
- UVERBS_METHOD_DM_MR_REG,
-};
-
-enum uverbs_attrs_create_counters_cmd_attr_ids {
- UVERBS_ATTR_CREATE_COUNTERS_HANDLE,
-};
-
-enum uverbs_attrs_destroy_counters_cmd_attr_ids {
- UVERBS_ATTR_DESTROY_COUNTERS_HANDLE,
-};
-
-enum uverbs_attrs_read_counters_cmd_attr_ids {
- UVERBS_ATTR_READ_COUNTERS_HANDLE,
- UVERBS_ATTR_READ_COUNTERS_BUFF,
- UVERBS_ATTR_READ_COUNTERS_FLAGS,
-};
-
-enum uverbs_methods_actions_counters_ops {
- UVERBS_METHOD_COUNTERS_CREATE,
- UVERBS_METHOD_COUNTERS_DESTROY,
- UVERBS_METHOD_COUNTERS_READ,
-};
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/ib_user_ioctl_verbs.h b/lib/libc/include/generic-musl/rdma/ib_user_ioctl_verbs.h
deleted file mode 100644
index c541d1a16325a26aa58f6ba66334bdb916de17f9..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/ib_user_ioctl_verbs.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/*
- * Copyright (c) 2017-2018, Mellanox Technologies inc. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef IB_USER_IOCTL_VERBS_H
-#define IB_USER_IOCTL_VERBS_H
-
-#include
-
-#ifndef RDMA_UAPI_PTR
-#define RDMA_UAPI_PTR(_type, _name) __aligned_u64 _name
-#endif
-
-enum ib_uverbs_access_flags {
- IB_UVERBS_ACCESS_LOCAL_WRITE = 1 << 0,
- IB_UVERBS_ACCESS_REMOTE_WRITE = 1 << 1,
- IB_UVERBS_ACCESS_REMOTE_READ = 1 << 2,
- IB_UVERBS_ACCESS_REMOTE_ATOMIC = 1 << 3,
- IB_UVERBS_ACCESS_MW_BIND = 1 << 4,
- IB_UVERBS_ACCESS_ZERO_BASED = 1 << 5,
- IB_UVERBS_ACCESS_ON_DEMAND = 1 << 6,
- IB_UVERBS_ACCESS_HUGETLB = 1 << 7,
-};
-
-enum ib_uverbs_query_port_cap_flags {
- IB_UVERBS_PCF_SM = 1 << 1,
- IB_UVERBS_PCF_NOTICE_SUP = 1 << 2,
- IB_UVERBS_PCF_TRAP_SUP = 1 << 3,
- IB_UVERBS_PCF_OPT_IPD_SUP = 1 << 4,
- IB_UVERBS_PCF_AUTO_MIGR_SUP = 1 << 5,
- IB_UVERBS_PCF_SL_MAP_SUP = 1 << 6,
- IB_UVERBS_PCF_MKEY_NVRAM = 1 << 7,
- IB_UVERBS_PCF_PKEY_NVRAM = 1 << 8,
- IB_UVERBS_PCF_LED_INFO_SUP = 1 << 9,
- IB_UVERBS_PCF_SM_DISABLED = 1 << 10,
- IB_UVERBS_PCF_SYS_IMAGE_GUID_SUP = 1 << 11,
- IB_UVERBS_PCF_PKEY_SW_EXT_PORT_TRAP_SUP = 1 << 12,
- IB_UVERBS_PCF_EXTENDED_SPEEDS_SUP = 1 << 14,
- IB_UVERBS_PCF_CM_SUP = 1 << 16,
- IB_UVERBS_PCF_SNMP_TUNNEL_SUP = 1 << 17,
- IB_UVERBS_PCF_REINIT_SUP = 1 << 18,
- IB_UVERBS_PCF_DEVICE_MGMT_SUP = 1 << 19,
- IB_UVERBS_PCF_VENDOR_CLASS_SUP = 1 << 20,
- IB_UVERBS_PCF_DR_NOTICE_SUP = 1 << 21,
- IB_UVERBS_PCF_CAP_MASK_NOTICE_SUP = 1 << 22,
- IB_UVERBS_PCF_BOOT_MGMT_SUP = 1 << 23,
- IB_UVERBS_PCF_LINK_LATENCY_SUP = 1 << 24,
- IB_UVERBS_PCF_CLIENT_REG_SUP = 1 << 25,
- /*
- * IsOtherLocalChangesNoticeSupported is aliased by IP_BASED_GIDS and
- * is inaccessible
- */
- IB_UVERBS_PCF_LINK_SPEED_WIDTH_TABLE_SUP = 1 << 27,
- IB_UVERBS_PCF_VENDOR_SPECIFIC_MADS_TABLE_SUP = 1 << 28,
- IB_UVERBS_PCF_MCAST_PKEY_TRAP_SUPPRESSION_SUP = 1 << 29,
- IB_UVERBS_PCF_MCAST_FDB_TOP_SUP = 1 << 30,
- IB_UVERBS_PCF_HIERARCHY_INFO_SUP = 1ULL << 31,
-
- /* NOTE this is an internal flag, not an IBA flag */
- IB_UVERBS_PCF_IP_BASED_GIDS = 1 << 26,
-};
-
-enum ib_uverbs_query_port_flags {
- IB_UVERBS_QPF_GRH_REQUIRED = 1 << 0,
-};
-
-enum ib_uverbs_flow_action_esp_keymat {
- IB_UVERBS_FLOW_ACTION_ESP_KEYMAT_AES_GCM,
-};
-
-enum ib_uverbs_flow_action_esp_keymat_aes_gcm_iv_algo {
- IB_UVERBS_FLOW_ACTION_IV_ALGO_SEQ,
-};
-
-struct ib_uverbs_flow_action_esp_keymat_aes_gcm {
- __aligned_u64 iv;
- __u32 iv_algo; /* Use enum ib_uverbs_flow_action_esp_keymat_aes_gcm_iv_algo */
-
- __u32 salt;
- __u32 icv_len;
-
- __u32 key_len;
- __u32 aes_key[256 / 32];
-};
-
-enum ib_uverbs_flow_action_esp_replay {
- IB_UVERBS_FLOW_ACTION_ESP_REPLAY_NONE,
- IB_UVERBS_FLOW_ACTION_ESP_REPLAY_BMP,
-};
-
-struct ib_uverbs_flow_action_esp_replay_bmp {
- __u32 size;
-};
-
-enum ib_uverbs_flow_action_esp_flags {
- IB_UVERBS_FLOW_ACTION_ESP_FLAGS_INLINE_CRYPTO = 0UL << 0, /* Default */
- IB_UVERBS_FLOW_ACTION_ESP_FLAGS_FULL_OFFLOAD = 1UL << 0,
-
- IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TUNNEL = 0UL << 1, /* Default */
- IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TRANSPORT = 1UL << 1,
-
- IB_UVERBS_FLOW_ACTION_ESP_FLAGS_DECRYPT = 0UL << 2, /* Default */
- IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ENCRYPT = 1UL << 2,
-
- IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ESN_NEW_WINDOW = 1UL << 3,
-};
-
-struct ib_uverbs_flow_action_esp_encap {
- /* This struct represents a list of pointers to flow_xxxx_filter that
- * encapsulates the payload in ESP tunnel mode.
- */
- RDMA_UAPI_PTR(void *, val_ptr); /* pointer to a flow_xxxx_filter */
- RDMA_UAPI_PTR(struct ib_uverbs_flow_action_esp_encap *, next_ptr);
- __u16 len; /* Len of the filter struct val_ptr points to */
- __u16 type; /* Use flow_spec_type enum */
-};
-
-struct ib_uverbs_flow_action_esp {
- __u32 spi;
- __u32 seq;
- __u32 tfc_pad;
- __u32 flags;
- __aligned_u64 hard_limit_pkts;
-};
-
-enum ib_uverbs_read_counters_flags {
- /* prefer read values from driver cache */
- IB_UVERBS_READ_COUNTERS_PREFER_CACHED = 1 << 0,
-};
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/ib_user_mad.h b/lib/libc/include/generic-musl/rdma/ib_user_mad.h
deleted file mode 100644
index b2313375d17caf78af1c264d54d4bb44463bc2b9..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/ib_user_mad.h
+++ /dev/null
@@ -1,234 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/*
- * Copyright (c) 2004 Topspin Communications. All rights reserved.
- * Copyright (c) 2005 Voltaire, Inc. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef IB_USER_MAD_H
-#define IB_USER_MAD_H
-
-#include
-#include
-
-/*
- * Increment this value if any changes that break userspace ABI
- * compatibility are made.
- */
-#define IB_USER_MAD_ABI_VERSION 5
-
-/*
- * Make sure that all structs defined in this file remain laid out so
- * that they pack the same way on 32-bit and 64-bit architectures (to
- * avoid incompatibility between 32-bit userspace and 64-bit kernels).
- */
-
-/**
- * ib_user_mad_hdr_old - Old version of MAD packet header without pkey_index
- * @id - ID of agent MAD received with/to be sent with
- * @status - 0 on successful receive, ETIMEDOUT if no response
- * received (transaction ID in data[] will be set to TID of original
- * request) (ignored on send)
- * @timeout_ms - Milliseconds to wait for response (unset on receive)
- * @retries - Number of automatic retries to attempt
- * @qpn - Remote QP number received from/to be sent to
- * @qkey - Remote Q_Key to be sent with (unset on receive)
- * @lid - Remote lid received from/to be sent to
- * @sl - Service level received with/to be sent with
- * @path_bits - Local path bits received with/to be sent with
- * @grh_present - If set, GRH was received/should be sent
- * @gid_index - Local GID index to send with (unset on receive)
- * @hop_limit - Hop limit in GRH
- * @traffic_class - Traffic class in GRH
- * @gid - Remote GID in GRH
- * @flow_label - Flow label in GRH
- */
-struct ib_user_mad_hdr_old {
- __u32 id;
- __u32 status;
- __u32 timeout_ms;
- __u32 retries;
- __u32 length;
- __be32 qpn;
- __be32 qkey;
- __be16 lid;
- __u8 sl;
- __u8 path_bits;
- __u8 grh_present;
- __u8 gid_index;
- __u8 hop_limit;
- __u8 traffic_class;
- __u8 gid[16];
- __be32 flow_label;
-};
-
-/**
- * ib_user_mad_hdr - MAD packet header
- * This layout allows specifying/receiving the P_Key index. To use
- * this capability, an application must call the
- * IB_USER_MAD_ENABLE_PKEY ioctl on the user MAD file handle before
- * any other actions with the file handle.
- * @id - ID of agent MAD received with/to be sent with
- * @status - 0 on successful receive, ETIMEDOUT if no response
- * received (transaction ID in data[] will be set to TID of original
- * request) (ignored on send)
- * @timeout_ms - Milliseconds to wait for response (unset on receive)
- * @retries - Number of automatic retries to attempt
- * @qpn - Remote QP number received from/to be sent to
- * @qkey - Remote Q_Key to be sent with (unset on receive)
- * @lid - Remote lid received from/to be sent to
- * @sl - Service level received with/to be sent with
- * @path_bits - Local path bits received with/to be sent with
- * @grh_present - If set, GRH was received/should be sent
- * @gid_index - Local GID index to send with (unset on receive)
- * @hop_limit - Hop limit in GRH
- * @traffic_class - Traffic class in GRH
- * @gid - Remote GID in GRH
- * @flow_label - Flow label in GRH
- * @pkey_index - P_Key index
- */
-struct ib_user_mad_hdr {
- __u32 id;
- __u32 status;
- __u32 timeout_ms;
- __u32 retries;
- __u32 length;
- __be32 qpn;
- __be32 qkey;
- __be16 lid;
- __u8 sl;
- __u8 path_bits;
- __u8 grh_present;
- __u8 gid_index;
- __u8 hop_limit;
- __u8 traffic_class;
- __u8 gid[16];
- __be32 flow_label;
- __u16 pkey_index;
- __u8 reserved[6];
-};
-
-/**
- * ib_user_mad - MAD packet
- * @hdr - MAD packet header
- * @data - Contents of MAD
- *
- */
-struct ib_user_mad {
- struct ib_user_mad_hdr hdr;
- __aligned_u64 data[0];
-};
-
-/*
- * Earlier versions of this interface definition declared the
- * method_mask[] member as an array of __u32 but treated it as a
- * bitmap made up of longs in the kernel. This ambiguity meant that
- * 32-bit big-endian applications that can run on both 32-bit and
- * 64-bit kernels had no consistent ABI to rely on, and 64-bit
- * big-endian applications that treated method_mask as being made up
- * of 32-bit words would have their bitmap misinterpreted.
- *
- * To clear up this confusion, we change the declaration of
- * method_mask[] to use unsigned long and handle the conversion from
- * 32-bit userspace to 64-bit kernel for big-endian systems in the
- * compat_ioctl method. Unfortunately, to keep the structure layout
- * the same, we need the method_mask[] array to be aligned only to 4
- * bytes even when long is 64 bits, which forces us into this ugly
- * typedef.
- */
-typedef unsigned long __attribute__((aligned(4))) packed_ulong;
-#define IB_USER_MAD_LONGS_PER_METHOD_MASK (128 / (8 * sizeof (long)))
-
-/**
- * ib_user_mad_reg_req - MAD registration request
- * @id - Set by the kernel; used to identify agent in future requests.
- * @qpn - Queue pair number; must be 0 or 1.
- * @method_mask - The caller will receive unsolicited MADs for any method
- * where @method_mask = 1.
- * @mgmt_class - Indicates which management class of MADs should be receive
- * by the caller. This field is only required if the user wishes to
- * receive unsolicited MADs, otherwise it should be 0.
- * @mgmt_class_version - Indicates which version of MADs for the given
- * management class to receive.
- * @oui: Indicates IEEE OUI when mgmt_class is a vendor class
- * in the range from 0x30 to 0x4f. Otherwise not used.
- * @rmpp_version: If set, indicates the RMPP version used.
- *
- */
-struct ib_user_mad_reg_req {
- __u32 id;
- packed_ulong method_mask[IB_USER_MAD_LONGS_PER_METHOD_MASK];
- __u8 qpn;
- __u8 mgmt_class;
- __u8 mgmt_class_version;
- __u8 oui[3];
- __u8 rmpp_version;
-};
-
-/**
- * ib_user_mad_reg_req2 - MAD registration request
- *
- * @id - Set by the _kernel_; used by userspace to identify the
- * registered agent in future requests.
- * @qpn - Queue pair number; must be 0 or 1.
- * @mgmt_class - Indicates which management class of MADs should be
- * receive by the caller. This field is only required if
- * the user wishes to receive unsolicited MADs, otherwise
- * it should be 0.
- * @mgmt_class_version - Indicates which version of MADs for the given
- * management class to receive.
- * @res - Ignored.
- * @flags - additional registration flags; Must be in the set of
- * flags defined in IB_USER_MAD_REG_FLAGS_CAP
- * @method_mask - The caller wishes to receive unsolicited MADs for the
- * methods whose bit(s) is(are) set.
- * @oui - Indicates IEEE OUI to use when mgmt_class is a vendor
- * class in the range from 0x30 to 0x4f. Otherwise not
- * used.
- * @rmpp_version - If set, indicates the RMPP version to use.
- */
-enum {
- IB_USER_MAD_USER_RMPP = (1 << 0),
-};
-#define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP)
-struct ib_user_mad_reg_req2 {
- __u32 id;
- __u32 qpn;
- __u8 mgmt_class;
- __u8 mgmt_class_version;
- __u16 res;
- __u32 flags;
- __aligned_u64 method_mask[2];
- __u32 oui;
- __u8 rmpp_version;
- __u8 reserved[3];
-};
-
-#endif /* IB_USER_MAD_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/ib_user_sa.h b/lib/libc/include/generic-musl/rdma/ib_user_sa.h
deleted file mode 100644
index 1017cb10f725e34c0a9c772619fc1548b31b612a..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/ib_user_sa.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/*
- * Copyright (c) 2005 Intel Corporation. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef IB_USER_SA_H
-#define IB_USER_SA_H
-
-#include
-
-enum {
- IB_PATH_GMP = 1,
- IB_PATH_PRIMARY = (1<<1),
- IB_PATH_ALTERNATE = (1<<2),
- IB_PATH_OUTBOUND = (1<<3),
- IB_PATH_INBOUND = (1<<4),
- IB_PATH_INBOUND_REVERSE = (1<<5),
- IB_PATH_BIDIRECTIONAL = IB_PATH_OUTBOUND | IB_PATH_INBOUND_REVERSE
-};
-
-struct ib_path_rec_data {
- __u32 flags;
- __u32 reserved;
- __u32 path_rec[16];
-};
-
-struct ib_user_path_rec {
- __u8 dgid[16];
- __u8 sgid[16];
- __be16 dlid;
- __be16 slid;
- __u32 raw_traffic;
- __be32 flow_label;
- __u32 reversible;
- __u32 mtu;
- __be16 pkey;
- __u8 hop_limit;
- __u8 traffic_class;
- __u8 numb_path;
- __u8 sl;
- __u8 mtu_selector;
- __u8 rate_selector;
- __u8 rate;
- __u8 packet_life_time_selector;
- __u8 packet_life_time;
- __u8 preference;
-};
-
-#endif /* IB_USER_SA_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/ib_user_verbs.h b/lib/libc/include/generic-musl/rdma/ib_user_verbs.h
deleted file mode 100644
index 67ea45e27bdd2784640fffd30861f567e7f96776..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/ib_user_verbs.h
+++ /dev/null
@@ -1,1292 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/*
- * Copyright (c) 2005 Topspin Communications. All rights reserved.
- * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.
- * Copyright (c) 2005 PathScale, Inc. All rights reserved.
- * Copyright (c) 2006 Mellanox Technologies. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef IB_USER_VERBS_H
-#define IB_USER_VERBS_H
-
-#include
-
-/*
- * Increment this value if any changes that break userspace ABI
- * compatibility are made.
- */
-#define IB_USER_VERBS_ABI_VERSION 6
-#define IB_USER_VERBS_CMD_THRESHOLD 50
-
-enum {
- IB_USER_VERBS_CMD_GET_CONTEXT,
- IB_USER_VERBS_CMD_QUERY_DEVICE,
- IB_USER_VERBS_CMD_QUERY_PORT,
- IB_USER_VERBS_CMD_ALLOC_PD,
- IB_USER_VERBS_CMD_DEALLOC_PD,
- IB_USER_VERBS_CMD_CREATE_AH,
- IB_USER_VERBS_CMD_MODIFY_AH,
- IB_USER_VERBS_CMD_QUERY_AH,
- IB_USER_VERBS_CMD_DESTROY_AH,
- IB_USER_VERBS_CMD_REG_MR,
- IB_USER_VERBS_CMD_REG_SMR,
- IB_USER_VERBS_CMD_REREG_MR,
- IB_USER_VERBS_CMD_QUERY_MR,
- IB_USER_VERBS_CMD_DEREG_MR,
- IB_USER_VERBS_CMD_ALLOC_MW,
- IB_USER_VERBS_CMD_BIND_MW,
- IB_USER_VERBS_CMD_DEALLOC_MW,
- IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL,
- IB_USER_VERBS_CMD_CREATE_CQ,
- IB_USER_VERBS_CMD_RESIZE_CQ,
- IB_USER_VERBS_CMD_DESTROY_CQ,
- IB_USER_VERBS_CMD_POLL_CQ,
- IB_USER_VERBS_CMD_PEEK_CQ,
- IB_USER_VERBS_CMD_REQ_NOTIFY_CQ,
- IB_USER_VERBS_CMD_CREATE_QP,
- IB_USER_VERBS_CMD_QUERY_QP,
- IB_USER_VERBS_CMD_MODIFY_QP,
- IB_USER_VERBS_CMD_DESTROY_QP,
- IB_USER_VERBS_CMD_POST_SEND,
- IB_USER_VERBS_CMD_POST_RECV,
- IB_USER_VERBS_CMD_ATTACH_MCAST,
- IB_USER_VERBS_CMD_DETACH_MCAST,
- IB_USER_VERBS_CMD_CREATE_SRQ,
- IB_USER_VERBS_CMD_MODIFY_SRQ,
- IB_USER_VERBS_CMD_QUERY_SRQ,
- IB_USER_VERBS_CMD_DESTROY_SRQ,
- IB_USER_VERBS_CMD_POST_SRQ_RECV,
- IB_USER_VERBS_CMD_OPEN_XRCD,
- IB_USER_VERBS_CMD_CLOSE_XRCD,
- IB_USER_VERBS_CMD_CREATE_XSRQ,
- IB_USER_VERBS_CMD_OPEN_QP,
-};
-
-enum {
- IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE,
- IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ,
- IB_USER_VERBS_EX_CMD_CREATE_QP = IB_USER_VERBS_CMD_CREATE_QP,
- IB_USER_VERBS_EX_CMD_MODIFY_QP = IB_USER_VERBS_CMD_MODIFY_QP,
- IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,
- IB_USER_VERBS_EX_CMD_DESTROY_FLOW,
- IB_USER_VERBS_EX_CMD_CREATE_WQ,
- IB_USER_VERBS_EX_CMD_MODIFY_WQ,
- IB_USER_VERBS_EX_CMD_DESTROY_WQ,
- IB_USER_VERBS_EX_CMD_CREATE_RWQ_IND_TBL,
- IB_USER_VERBS_EX_CMD_DESTROY_RWQ_IND_TBL,
- IB_USER_VERBS_EX_CMD_MODIFY_CQ
-};
-
-/*
- * Make sure that all structs defined in this file remain laid out so
- * that they pack the same way on 32-bit and 64-bit architectures (to
- * avoid incompatibility between 32-bit userspace and 64-bit kernels).
- * Specifically:
- * - Do not use pointer types -- pass pointers in __u64 instead.
- * - Make sure that any structure larger than 4 bytes is padded to a
- * multiple of 8 bytes. Otherwise the structure size will be
- * different between 32-bit and 64-bit architectures.
- */
-
-struct ib_uverbs_async_event_desc {
- __aligned_u64 element;
- __u32 event_type; /* enum ib_event_type */
- __u32 reserved;
-};
-
-struct ib_uverbs_comp_event_desc {
- __aligned_u64 cq_handle;
-};
-
-struct ib_uverbs_cq_moderation_caps {
- __u16 max_cq_moderation_count;
- __u16 max_cq_moderation_period;
- __u32 reserved;
-};
-
-/*
- * All commands from userspace should start with a __u32 command field
- * followed by __u16 in_words and out_words fields (which give the
- * length of the command block and response buffer if any in 32-bit
- * words). The kernel driver will read these fields first and read
- * the rest of the command struct based on these value.
- */
-
-#define IB_USER_VERBS_CMD_COMMAND_MASK 0xff
-#define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80000000u
-
-struct ib_uverbs_cmd_hdr {
- __u32 command;
- __u16 in_words;
- __u16 out_words;
-};
-
-struct ib_uverbs_ex_cmd_hdr {
- __aligned_u64 response;
- __u16 provider_in_words;
- __u16 provider_out_words;
- __u32 cmd_hdr_reserved;
-};
-
-struct ib_uverbs_get_context {
- __aligned_u64 response;
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_get_context_resp {
- __u32 async_fd;
- __u32 num_comp_vectors;
-};
-
-struct ib_uverbs_query_device {
- __aligned_u64 response;
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_query_device_resp {
- __aligned_u64 fw_ver;
- __be64 node_guid;
- __be64 sys_image_guid;
- __aligned_u64 max_mr_size;
- __aligned_u64 page_size_cap;
- __u32 vendor_id;
- __u32 vendor_part_id;
- __u32 hw_ver;
- __u32 max_qp;
- __u32 max_qp_wr;
- __u32 device_cap_flags;
- __u32 max_sge;
- __u32 max_sge_rd;
- __u32 max_cq;
- __u32 max_cqe;
- __u32 max_mr;
- __u32 max_pd;
- __u32 max_qp_rd_atom;
- __u32 max_ee_rd_atom;
- __u32 max_res_rd_atom;
- __u32 max_qp_init_rd_atom;
- __u32 max_ee_init_rd_atom;
- __u32 atomic_cap;
- __u32 max_ee;
- __u32 max_rdd;
- __u32 max_mw;
- __u32 max_raw_ipv6_qp;
- __u32 max_raw_ethy_qp;
- __u32 max_mcast_grp;
- __u32 max_mcast_qp_attach;
- __u32 max_total_mcast_qp_attach;
- __u32 max_ah;
- __u32 max_fmr;
- __u32 max_map_per_fmr;
- __u32 max_srq;
- __u32 max_srq_wr;
- __u32 max_srq_sge;
- __u16 max_pkeys;
- __u8 local_ca_ack_delay;
- __u8 phys_port_cnt;
- __u8 reserved[4];
-};
-
-struct ib_uverbs_ex_query_device {
- __u32 comp_mask;
- __u32 reserved;
-};
-
-struct ib_uverbs_odp_caps {
- __aligned_u64 general_caps;
- struct {
- __u32 rc_odp_caps;
- __u32 uc_odp_caps;
- __u32 ud_odp_caps;
- } per_transport_caps;
- __u32 reserved;
-};
-
-struct ib_uverbs_rss_caps {
- /* Corresponding bit will be set if qp type from
- * 'enum ib_qp_type' is supported, e.g.
- * supported_qpts |= 1 << IB_QPT_UD
- */
- __u32 supported_qpts;
- __u32 max_rwq_indirection_tables;
- __u32 max_rwq_indirection_table_size;
- __u32 reserved;
-};
-
-struct ib_uverbs_tm_caps {
- /* Max size of rendezvous request message */
- __u32 max_rndv_hdr_size;
- /* Max number of entries in tag matching list */
- __u32 max_num_tags;
- /* TM flags */
- __u32 flags;
- /* Max number of outstanding list operations */
- __u32 max_ops;
- /* Max number of SGE in tag matching entry */
- __u32 max_sge;
- __u32 reserved;
-};
-
-struct ib_uverbs_ex_query_device_resp {
- struct ib_uverbs_query_device_resp base;
- __u32 comp_mask;
- __u32 response_length;
- struct ib_uverbs_odp_caps odp_caps;
- __aligned_u64 timestamp_mask;
- __aligned_u64 hca_core_clock; /* in KHZ */
- __aligned_u64 device_cap_flags_ex;
- struct ib_uverbs_rss_caps rss_caps;
- __u32 max_wq_type_rq;
- __u32 raw_packet_caps;
- struct ib_uverbs_tm_caps tm_caps;
- struct ib_uverbs_cq_moderation_caps cq_moderation_caps;
- __aligned_u64 max_dm_size;
-};
-
-struct ib_uverbs_query_port {
- __aligned_u64 response;
- __u8 port_num;
- __u8 reserved[7];
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_query_port_resp {
- __u32 port_cap_flags; /* see ib_uverbs_query_port_cap_flags */
- __u32 max_msg_sz;
- __u32 bad_pkey_cntr;
- __u32 qkey_viol_cntr;
- __u32 gid_tbl_len;
- __u16 pkey_tbl_len;
- __u16 lid;
- __u16 sm_lid;
- __u8 state;
- __u8 max_mtu;
- __u8 active_mtu;
- __u8 lmc;
- __u8 max_vl_num;
- __u8 sm_sl;
- __u8 subnet_timeout;
- __u8 init_type_reply;
- __u8 active_width;
- __u8 active_speed;
- __u8 phys_state;
- __u8 link_layer;
- __u8 flags; /* see ib_uverbs_query_port_flags */
- __u8 reserved;
-};
-
-struct ib_uverbs_alloc_pd {
- __aligned_u64 response;
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_alloc_pd_resp {
- __u32 pd_handle;
-};
-
-struct ib_uverbs_dealloc_pd {
- __u32 pd_handle;
-};
-
-struct ib_uverbs_open_xrcd {
- __aligned_u64 response;
- __u32 fd;
- __u32 oflags;
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_open_xrcd_resp {
- __u32 xrcd_handle;
-};
-
-struct ib_uverbs_close_xrcd {
- __u32 xrcd_handle;
-};
-
-struct ib_uverbs_reg_mr {
- __aligned_u64 response;
- __aligned_u64 start;
- __aligned_u64 length;
- __aligned_u64 hca_va;
- __u32 pd_handle;
- __u32 access_flags;
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_reg_mr_resp {
- __u32 mr_handle;
- __u32 lkey;
- __u32 rkey;
-};
-
-struct ib_uverbs_rereg_mr {
- __aligned_u64 response;
- __u32 mr_handle;
- __u32 flags;
- __aligned_u64 start;
- __aligned_u64 length;
- __aligned_u64 hca_va;
- __u32 pd_handle;
- __u32 access_flags;
-};
-
-struct ib_uverbs_rereg_mr_resp {
- __u32 lkey;
- __u32 rkey;
-};
-
-struct ib_uverbs_dereg_mr {
- __u32 mr_handle;
-};
-
-struct ib_uverbs_alloc_mw {
- __aligned_u64 response;
- __u32 pd_handle;
- __u8 mw_type;
- __u8 reserved[3];
-};
-
-struct ib_uverbs_alloc_mw_resp {
- __u32 mw_handle;
- __u32 rkey;
-};
-
-struct ib_uverbs_dealloc_mw {
- __u32 mw_handle;
-};
-
-struct ib_uverbs_create_comp_channel {
- __aligned_u64 response;
-};
-
-struct ib_uverbs_create_comp_channel_resp {
- __u32 fd;
-};
-
-struct ib_uverbs_create_cq {
- __aligned_u64 response;
- __aligned_u64 user_handle;
- __u32 cqe;
- __u32 comp_vector;
- __s32 comp_channel;
- __u32 reserved;
- __aligned_u64 driver_data[0];
-};
-
-enum ib_uverbs_ex_create_cq_flags {
- IB_UVERBS_CQ_FLAGS_TIMESTAMP_COMPLETION = 1 << 0,
- IB_UVERBS_CQ_FLAGS_IGNORE_OVERRUN = 1 << 1,
-};
-
-struct ib_uverbs_ex_create_cq {
- __aligned_u64 user_handle;
- __u32 cqe;
- __u32 comp_vector;
- __s32 comp_channel;
- __u32 comp_mask;
- __u32 flags; /* bitmask of ib_uverbs_ex_create_cq_flags */
- __u32 reserved;
-};
-
-struct ib_uverbs_create_cq_resp {
- __u32 cq_handle;
- __u32 cqe;
-};
-
-struct ib_uverbs_ex_create_cq_resp {
- struct ib_uverbs_create_cq_resp base;
- __u32 comp_mask;
- __u32 response_length;
-};
-
-struct ib_uverbs_resize_cq {
- __aligned_u64 response;
- __u32 cq_handle;
- __u32 cqe;
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_resize_cq_resp {
- __u32 cqe;
- __u32 reserved;
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_poll_cq {
- __aligned_u64 response;
- __u32 cq_handle;
- __u32 ne;
-};
-
-struct ib_uverbs_wc {
- __aligned_u64 wr_id;
- __u32 status;
- __u32 opcode;
- __u32 vendor_err;
- __u32 byte_len;
- union {
- __be32 imm_data;
- __u32 invalidate_rkey;
- } ex;
- __u32 qp_num;
- __u32 src_qp;
- __u32 wc_flags;
- __u16 pkey_index;
- __u16 slid;
- __u8 sl;
- __u8 dlid_path_bits;
- __u8 port_num;
- __u8 reserved;
-};
-
-struct ib_uverbs_poll_cq_resp {
- __u32 count;
- __u32 reserved;
- struct ib_uverbs_wc wc[0];
-};
-
-struct ib_uverbs_req_notify_cq {
- __u32 cq_handle;
- __u32 solicited_only;
-};
-
-struct ib_uverbs_destroy_cq {
- __aligned_u64 response;
- __u32 cq_handle;
- __u32 reserved;
-};
-
-struct ib_uverbs_destroy_cq_resp {
- __u32 comp_events_reported;
- __u32 async_events_reported;
-};
-
-struct ib_uverbs_global_route {
- __u8 dgid[16];
- __u32 flow_label;
- __u8 sgid_index;
- __u8 hop_limit;
- __u8 traffic_class;
- __u8 reserved;
-};
-
-struct ib_uverbs_ah_attr {
- struct ib_uverbs_global_route grh;
- __u16 dlid;
- __u8 sl;
- __u8 src_path_bits;
- __u8 static_rate;
- __u8 is_global;
- __u8 port_num;
- __u8 reserved;
-};
-
-struct ib_uverbs_qp_attr {
- __u32 qp_attr_mask;
- __u32 qp_state;
- __u32 cur_qp_state;
- __u32 path_mtu;
- __u32 path_mig_state;
- __u32 qkey;
- __u32 rq_psn;
- __u32 sq_psn;
- __u32 dest_qp_num;
- __u32 qp_access_flags;
-
- struct ib_uverbs_ah_attr ah_attr;
- struct ib_uverbs_ah_attr alt_ah_attr;
-
- /* ib_qp_cap */
- __u32 max_send_wr;
- __u32 max_recv_wr;
- __u32 max_send_sge;
- __u32 max_recv_sge;
- __u32 max_inline_data;
-
- __u16 pkey_index;
- __u16 alt_pkey_index;
- __u8 en_sqd_async_notify;
- __u8 sq_draining;
- __u8 max_rd_atomic;
- __u8 max_dest_rd_atomic;
- __u8 min_rnr_timer;
- __u8 port_num;
- __u8 timeout;
- __u8 retry_cnt;
- __u8 rnr_retry;
- __u8 alt_port_num;
- __u8 alt_timeout;
- __u8 reserved[5];
-};
-
-struct ib_uverbs_create_qp {
- __aligned_u64 response;
- __aligned_u64 user_handle;
- __u32 pd_handle;
- __u32 send_cq_handle;
- __u32 recv_cq_handle;
- __u32 srq_handle;
- __u32 max_send_wr;
- __u32 max_recv_wr;
- __u32 max_send_sge;
- __u32 max_recv_sge;
- __u32 max_inline_data;
- __u8 sq_sig_all;
- __u8 qp_type;
- __u8 is_srq;
- __u8 reserved;
- __aligned_u64 driver_data[0];
-};
-
-enum ib_uverbs_create_qp_mask {
- IB_UVERBS_CREATE_QP_MASK_IND_TABLE = 1UL << 0,
-};
-
-enum {
- IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE,
-};
-
-enum {
- /*
- * This value is equal to IB_QP_DEST_QPN.
- */
- IB_USER_LEGACY_LAST_QP_ATTR_MASK = 1ULL << 20,
-};
-
-enum {
- /*
- * This value is equal to IB_QP_RATE_LIMIT.
- */
- IB_USER_LAST_QP_ATTR_MASK = 1ULL << 25,
-};
-
-struct ib_uverbs_ex_create_qp {
- __aligned_u64 user_handle;
- __u32 pd_handle;
- __u32 send_cq_handle;
- __u32 recv_cq_handle;
- __u32 srq_handle;
- __u32 max_send_wr;
- __u32 max_recv_wr;
- __u32 max_send_sge;
- __u32 max_recv_sge;
- __u32 max_inline_data;
- __u8 sq_sig_all;
- __u8 qp_type;
- __u8 is_srq;
- __u8 reserved;
- __u32 comp_mask;
- __u32 create_flags;
- __u32 rwq_ind_tbl_handle;
- __u32 source_qpn;
-};
-
-struct ib_uverbs_open_qp {
- __aligned_u64 response;
- __aligned_u64 user_handle;
- __u32 pd_handle;
- __u32 qpn;
- __u8 qp_type;
- __u8 reserved[7];
- __aligned_u64 driver_data[0];
-};
-
-/* also used for open response */
-struct ib_uverbs_create_qp_resp {
- __u32 qp_handle;
- __u32 qpn;
- __u32 max_send_wr;
- __u32 max_recv_wr;
- __u32 max_send_sge;
- __u32 max_recv_sge;
- __u32 max_inline_data;
- __u32 reserved;
-};
-
-struct ib_uverbs_ex_create_qp_resp {
- struct ib_uverbs_create_qp_resp base;
- __u32 comp_mask;
- __u32 response_length;
-};
-
-/*
- * This struct needs to remain a multiple of 8 bytes to keep the
- * alignment of the modify QP parameters.
- */
-struct ib_uverbs_qp_dest {
- __u8 dgid[16];
- __u32 flow_label;
- __u16 dlid;
- __u16 reserved;
- __u8 sgid_index;
- __u8 hop_limit;
- __u8 traffic_class;
- __u8 sl;
- __u8 src_path_bits;
- __u8 static_rate;
- __u8 is_global;
- __u8 port_num;
-};
-
-struct ib_uverbs_query_qp {
- __aligned_u64 response;
- __u32 qp_handle;
- __u32 attr_mask;
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_query_qp_resp {
- struct ib_uverbs_qp_dest dest;
- struct ib_uverbs_qp_dest alt_dest;
- __u32 max_send_wr;
- __u32 max_recv_wr;
- __u32 max_send_sge;
- __u32 max_recv_sge;
- __u32 max_inline_data;
- __u32 qkey;
- __u32 rq_psn;
- __u32 sq_psn;
- __u32 dest_qp_num;
- __u32 qp_access_flags;
- __u16 pkey_index;
- __u16 alt_pkey_index;
- __u8 qp_state;
- __u8 cur_qp_state;
- __u8 path_mtu;
- __u8 path_mig_state;
- __u8 sq_draining;
- __u8 max_rd_atomic;
- __u8 max_dest_rd_atomic;
- __u8 min_rnr_timer;
- __u8 port_num;
- __u8 timeout;
- __u8 retry_cnt;
- __u8 rnr_retry;
- __u8 alt_port_num;
- __u8 alt_timeout;
- __u8 sq_sig_all;
- __u8 reserved[5];
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_modify_qp {
- struct ib_uverbs_qp_dest dest;
- struct ib_uverbs_qp_dest alt_dest;
- __u32 qp_handle;
- __u32 attr_mask;
- __u32 qkey;
- __u32 rq_psn;
- __u32 sq_psn;
- __u32 dest_qp_num;
- __u32 qp_access_flags;
- __u16 pkey_index;
- __u16 alt_pkey_index;
- __u8 qp_state;
- __u8 cur_qp_state;
- __u8 path_mtu;
- __u8 path_mig_state;
- __u8 en_sqd_async_notify;
- __u8 max_rd_atomic;
- __u8 max_dest_rd_atomic;
- __u8 min_rnr_timer;
- __u8 port_num;
- __u8 timeout;
- __u8 retry_cnt;
- __u8 rnr_retry;
- __u8 alt_port_num;
- __u8 alt_timeout;
- __u8 reserved[2];
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_ex_modify_qp {
- struct ib_uverbs_modify_qp base;
- __u32 rate_limit;
- __u32 reserved;
-};
-
-struct ib_uverbs_modify_qp_resp {
-};
-
-struct ib_uverbs_ex_modify_qp_resp {
- __u32 comp_mask;
- __u32 response_length;
-};
-
-struct ib_uverbs_destroy_qp {
- __aligned_u64 response;
- __u32 qp_handle;
- __u32 reserved;
-};
-
-struct ib_uverbs_destroy_qp_resp {
- __u32 events_reported;
-};
-
-/*
- * The ib_uverbs_sge structure isn't used anywhere, since we assume
- * the ib_sge structure is packed the same way on 32-bit and 64-bit
- * architectures in both kernel and user space. It's just here to
- * document the ABI.
- */
-struct ib_uverbs_sge {
- __aligned_u64 addr;
- __u32 length;
- __u32 lkey;
-};
-
-enum ib_uverbs_wr_opcode {
- IB_UVERBS_WR_RDMA_WRITE = 0,
- IB_UVERBS_WR_RDMA_WRITE_WITH_IMM = 1,
- IB_UVERBS_WR_SEND = 2,
- IB_UVERBS_WR_SEND_WITH_IMM = 3,
- IB_UVERBS_WR_RDMA_READ = 4,
- IB_UVERBS_WR_ATOMIC_CMP_AND_SWP = 5,
- IB_UVERBS_WR_ATOMIC_FETCH_AND_ADD = 6,
- IB_UVERBS_WR_LOCAL_INV = 7,
- IB_UVERBS_WR_BIND_MW = 8,
- IB_UVERBS_WR_SEND_WITH_INV = 9,
- IB_UVERBS_WR_TSO = 10,
- IB_UVERBS_WR_RDMA_READ_WITH_INV = 11,
- IB_UVERBS_WR_MASKED_ATOMIC_CMP_AND_SWP = 12,
- IB_UVERBS_WR_MASKED_ATOMIC_FETCH_AND_ADD = 13,
- /* Review enum ib_wr_opcode before modifying this */
-};
-
-struct ib_uverbs_send_wr {
- __aligned_u64 wr_id;
- __u32 num_sge;
- __u32 opcode; /* see enum ib_uverbs_wr_opcode */
- __u32 send_flags;
- union {
- __be32 imm_data;
- __u32 invalidate_rkey;
- } ex;
- union {
- struct {
- __aligned_u64 remote_addr;
- __u32 rkey;
- __u32 reserved;
- } rdma;
- struct {
- __aligned_u64 remote_addr;
- __aligned_u64 compare_add;
- __aligned_u64 swap;
- __u32 rkey;
- __u32 reserved;
- } atomic;
- struct {
- __u32 ah;
- __u32 remote_qpn;
- __u32 remote_qkey;
- __u32 reserved;
- } ud;
- } wr;
-};
-
-struct ib_uverbs_post_send {
- __aligned_u64 response;
- __u32 qp_handle;
- __u32 wr_count;
- __u32 sge_count;
- __u32 wqe_size;
- struct ib_uverbs_send_wr send_wr[0];
-};
-
-struct ib_uverbs_post_send_resp {
- __u32 bad_wr;
-};
-
-struct ib_uverbs_recv_wr {
- __aligned_u64 wr_id;
- __u32 num_sge;
- __u32 reserved;
-};
-
-struct ib_uverbs_post_recv {
- __aligned_u64 response;
- __u32 qp_handle;
- __u32 wr_count;
- __u32 sge_count;
- __u32 wqe_size;
- struct ib_uverbs_recv_wr recv_wr[0];
-};
-
-struct ib_uverbs_post_recv_resp {
- __u32 bad_wr;
-};
-
-struct ib_uverbs_post_srq_recv {
- __aligned_u64 response;
- __u32 srq_handle;
- __u32 wr_count;
- __u32 sge_count;
- __u32 wqe_size;
- struct ib_uverbs_recv_wr recv[0];
-};
-
-struct ib_uverbs_post_srq_recv_resp {
- __u32 bad_wr;
-};
-
-struct ib_uverbs_create_ah {
- __aligned_u64 response;
- __aligned_u64 user_handle;
- __u32 pd_handle;
- __u32 reserved;
- struct ib_uverbs_ah_attr attr;
-};
-
-struct ib_uverbs_create_ah_resp {
- __u32 ah_handle;
-};
-
-struct ib_uverbs_destroy_ah {
- __u32 ah_handle;
-};
-
-struct ib_uverbs_attach_mcast {
- __u8 gid[16];
- __u32 qp_handle;
- __u16 mlid;
- __u16 reserved;
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_detach_mcast {
- __u8 gid[16];
- __u32 qp_handle;
- __u16 mlid;
- __u16 reserved;
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_flow_spec_hdr {
- __u32 type;
- __u16 size;
- __u16 reserved;
- /* followed by flow_spec */
- __aligned_u64 flow_spec_data[0];
-};
-
-struct ib_uverbs_flow_eth_filter {
- __u8 dst_mac[6];
- __u8 src_mac[6];
- __be16 ether_type;
- __be16 vlan_tag;
-};
-
-struct ib_uverbs_flow_spec_eth {
- union {
- struct ib_uverbs_flow_spec_hdr hdr;
- struct {
- __u32 type;
- __u16 size;
- __u16 reserved;
- };
- };
- struct ib_uverbs_flow_eth_filter val;
- struct ib_uverbs_flow_eth_filter mask;
-};
-
-struct ib_uverbs_flow_ipv4_filter {
- __be32 src_ip;
- __be32 dst_ip;
- __u8 proto;
- __u8 tos;
- __u8 ttl;
- __u8 flags;
-};
-
-struct ib_uverbs_flow_spec_ipv4 {
- union {
- struct ib_uverbs_flow_spec_hdr hdr;
- struct {
- __u32 type;
- __u16 size;
- __u16 reserved;
- };
- };
- struct ib_uverbs_flow_ipv4_filter val;
- struct ib_uverbs_flow_ipv4_filter mask;
-};
-
-struct ib_uverbs_flow_tcp_udp_filter {
- __be16 dst_port;
- __be16 src_port;
-};
-
-struct ib_uverbs_flow_spec_tcp_udp {
- union {
- struct ib_uverbs_flow_spec_hdr hdr;
- struct {
- __u32 type;
- __u16 size;
- __u16 reserved;
- };
- };
- struct ib_uverbs_flow_tcp_udp_filter val;
- struct ib_uverbs_flow_tcp_udp_filter mask;
-};
-
-struct ib_uverbs_flow_ipv6_filter {
- __u8 src_ip[16];
- __u8 dst_ip[16];
- __be32 flow_label;
- __u8 next_hdr;
- __u8 traffic_class;
- __u8 hop_limit;
- __u8 reserved;
-};
-
-struct ib_uverbs_flow_spec_ipv6 {
- union {
- struct ib_uverbs_flow_spec_hdr hdr;
- struct {
- __u32 type;
- __u16 size;
- __u16 reserved;
- };
- };
- struct ib_uverbs_flow_ipv6_filter val;
- struct ib_uverbs_flow_ipv6_filter mask;
-};
-
-struct ib_uverbs_flow_spec_action_tag {
- union {
- struct ib_uverbs_flow_spec_hdr hdr;
- struct {
- __u32 type;
- __u16 size;
- __u16 reserved;
- };
- };
- __u32 tag_id;
- __u32 reserved1;
-};
-
-struct ib_uverbs_flow_spec_action_drop {
- union {
- struct ib_uverbs_flow_spec_hdr hdr;
- struct {
- __u32 type;
- __u16 size;
- __u16 reserved;
- };
- };
-};
-
-struct ib_uverbs_flow_spec_action_handle {
- union {
- struct ib_uverbs_flow_spec_hdr hdr;
- struct {
- __u32 type;
- __u16 size;
- __u16 reserved;
- };
- };
- __u32 handle;
- __u32 reserved1;
-};
-
-struct ib_uverbs_flow_spec_action_count {
- union {
- struct ib_uverbs_flow_spec_hdr hdr;
- struct {
- __u32 type;
- __u16 size;
- __u16 reserved;
- };
- };
- __u32 handle;
- __u32 reserved1;
-};
-
-struct ib_uverbs_flow_tunnel_filter {
- __be32 tunnel_id;
-};
-
-struct ib_uverbs_flow_spec_tunnel {
- union {
- struct ib_uverbs_flow_spec_hdr hdr;
- struct {
- __u32 type;
- __u16 size;
- __u16 reserved;
- };
- };
- struct ib_uverbs_flow_tunnel_filter val;
- struct ib_uverbs_flow_tunnel_filter mask;
-};
-
-struct ib_uverbs_flow_spec_esp_filter {
- __u32 spi;
- __u32 seq;
-};
-
-struct ib_uverbs_flow_spec_esp {
- union {
- struct ib_uverbs_flow_spec_hdr hdr;
- struct {
- __u32 type;
- __u16 size;
- __u16 reserved;
- };
- };
- struct ib_uverbs_flow_spec_esp_filter val;
- struct ib_uverbs_flow_spec_esp_filter mask;
-};
-
-struct ib_uverbs_flow_gre_filter {
- /* c_ks_res0_ver field is bits 0-15 in offset 0 of a standard GRE header:
- * bit 0 - C - checksum bit.
- * bit 1 - reserved. set to 0.
- * bit 2 - key bit.
- * bit 3 - sequence number bit.
- * bits 4:12 - reserved. set to 0.
- * bits 13:15 - GRE version.
- */
- __be16 c_ks_res0_ver;
- __be16 protocol;
- __be32 key;
-};
-
-struct ib_uverbs_flow_spec_gre {
- union {
- struct ib_uverbs_flow_spec_hdr hdr;
- struct {
- __u32 type;
- __u16 size;
- __u16 reserved;
- };
- };
- struct ib_uverbs_flow_gre_filter val;
- struct ib_uverbs_flow_gre_filter mask;
-};
-
-struct ib_uverbs_flow_mpls_filter {
- /* The field includes the entire MPLS label:
- * bits 0:19 - label field.
- * bits 20:22 - traffic class field.
- * bits 23 - bottom of stack bit.
- * bits 24:31 - ttl field.
- */
- __be32 label;
-};
-
-struct ib_uverbs_flow_spec_mpls {
- union {
- struct ib_uverbs_flow_spec_hdr hdr;
- struct {
- __u32 type;
- __u16 size;
- __u16 reserved;
- };
- };
- struct ib_uverbs_flow_mpls_filter val;
- struct ib_uverbs_flow_mpls_filter mask;
-};
-
-struct ib_uverbs_flow_attr {
- __u32 type;
- __u16 size;
- __u16 priority;
- __u8 num_of_specs;
- __u8 reserved[2];
- __u8 port;
- __u32 flags;
- /* Following are the optional layers according to user request
- * struct ib_flow_spec_xxx
- * struct ib_flow_spec_yyy
- */
- struct ib_uverbs_flow_spec_hdr flow_specs[0];
-};
-
-struct ib_uverbs_create_flow {
- __u32 comp_mask;
- __u32 qp_handle;
- struct ib_uverbs_flow_attr flow_attr;
-};
-
-struct ib_uverbs_create_flow_resp {
- __u32 comp_mask;
- __u32 flow_handle;
-};
-
-struct ib_uverbs_destroy_flow {
- __u32 comp_mask;
- __u32 flow_handle;
-};
-
-struct ib_uverbs_create_srq {
- __aligned_u64 response;
- __aligned_u64 user_handle;
- __u32 pd_handle;
- __u32 max_wr;
- __u32 max_sge;
- __u32 srq_limit;
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_create_xsrq {
- __aligned_u64 response;
- __aligned_u64 user_handle;
- __u32 srq_type;
- __u32 pd_handle;
- __u32 max_wr;
- __u32 max_sge;
- __u32 srq_limit;
- __u32 max_num_tags;
- __u32 xrcd_handle;
- __u32 cq_handle;
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_create_srq_resp {
- __u32 srq_handle;
- __u32 max_wr;
- __u32 max_sge;
- __u32 srqn;
-};
-
-struct ib_uverbs_modify_srq {
- __u32 srq_handle;
- __u32 attr_mask;
- __u32 max_wr;
- __u32 srq_limit;
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_query_srq {
- __aligned_u64 response;
- __u32 srq_handle;
- __u32 reserved;
- __aligned_u64 driver_data[0];
-};
-
-struct ib_uverbs_query_srq_resp {
- __u32 max_wr;
- __u32 max_sge;
- __u32 srq_limit;
- __u32 reserved;
-};
-
-struct ib_uverbs_destroy_srq {
- __aligned_u64 response;
- __u32 srq_handle;
- __u32 reserved;
-};
-
-struct ib_uverbs_destroy_srq_resp {
- __u32 events_reported;
-};
-
-struct ib_uverbs_ex_create_wq {
- __u32 comp_mask;
- __u32 wq_type;
- __aligned_u64 user_handle;
- __u32 pd_handle;
- __u32 cq_handle;
- __u32 max_wr;
- __u32 max_sge;
- __u32 create_flags; /* Use enum ib_wq_flags */
- __u32 reserved;
-};
-
-struct ib_uverbs_ex_create_wq_resp {
- __u32 comp_mask;
- __u32 response_length;
- __u32 wq_handle;
- __u32 max_wr;
- __u32 max_sge;
- __u32 wqn;
-};
-
-struct ib_uverbs_ex_destroy_wq {
- __u32 comp_mask;
- __u32 wq_handle;
-};
-
-struct ib_uverbs_ex_destroy_wq_resp {
- __u32 comp_mask;
- __u32 response_length;
- __u32 events_reported;
- __u32 reserved;
-};
-
-struct ib_uverbs_ex_modify_wq {
- __u32 attr_mask;
- __u32 wq_handle;
- __u32 wq_state;
- __u32 curr_wq_state;
- __u32 flags; /* Use enum ib_wq_flags */
- __u32 flags_mask; /* Use enum ib_wq_flags */
-};
-
-/* Prevent memory allocation rather than max expected size */
-#define IB_USER_VERBS_MAX_LOG_IND_TBL_SIZE 0x0d
-struct ib_uverbs_ex_create_rwq_ind_table {
- __u32 comp_mask;
- __u32 log_ind_tbl_size;
- /* Following are the wq handles according to log_ind_tbl_size
- * wq_handle1
- * wq_handle2
- */
- __u32 wq_handles[0];
-};
-
-struct ib_uverbs_ex_create_rwq_ind_table_resp {
- __u32 comp_mask;
- __u32 response_length;
- __u32 ind_tbl_handle;
- __u32 ind_tbl_num;
-};
-
-struct ib_uverbs_ex_destroy_rwq_ind_table {
- __u32 comp_mask;
- __u32 ind_tbl_handle;
-};
-
-struct ib_uverbs_cq_moderation {
- __u16 cq_count;
- __u16 cq_period;
-};
-
-struct ib_uverbs_ex_modify_cq {
- __u32 cq_handle;
- __u32 attr_mask;
- struct ib_uverbs_cq_moderation attr;
- __u32 reserved;
-};
-
-#define IB_DEVICE_NAME_MAX 64
-
-#endif /* IB_USER_VERBS_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/mlx4-abi.h b/lib/libc/include/generic-musl/rdma/mlx4-abi.h
deleted file mode 100644
index daa8fb007f7fe16b70b733fcdebf85f8810b8456..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/mlx4-abi.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/*
- * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
- * Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef MLX4_ABI_USER_H
-#define MLX4_ABI_USER_H
-
-#include
-
-/*
- * Increment this value if any changes that break userspace ABI
- * compatibility are made.
- */
-
-#define MLX4_IB_UVERBS_NO_DEV_CAPS_ABI_VERSION 3
-#define MLX4_IB_UVERBS_ABI_VERSION 4
-
-/*
- * Make sure that all structs defined in this file remain laid out so
- * that they pack the same way on 32-bit and 64-bit architectures (to
- * avoid incompatibility between 32-bit userspace and 64-bit kernels).
- * In particular do not use pointer types -- pass pointers in __u64
- * instead.
- */
-
-struct mlx4_ib_alloc_ucontext_resp_v3 {
- __u32 qp_tab_size;
- __u16 bf_reg_size;
- __u16 bf_regs_per_page;
-};
-
-enum {
- MLX4_USER_DEV_CAP_LARGE_CQE = 1L << 0,
-};
-
-struct mlx4_ib_alloc_ucontext_resp {
- __u32 dev_caps;
- __u32 qp_tab_size;
- __u16 bf_reg_size;
- __u16 bf_regs_per_page;
- __u32 cqe_size;
-};
-
-struct mlx4_ib_alloc_pd_resp {
- __u32 pdn;
- __u32 reserved;
-};
-
-struct mlx4_ib_create_cq {
- __aligned_u64 buf_addr;
- __aligned_u64 db_addr;
-};
-
-struct mlx4_ib_create_cq_resp {
- __u32 cqn;
- __u32 reserved;
-};
-
-struct mlx4_ib_resize_cq {
- __aligned_u64 buf_addr;
-};
-
-struct mlx4_ib_create_srq {
- __aligned_u64 buf_addr;
- __aligned_u64 db_addr;
-};
-
-struct mlx4_ib_create_srq_resp {
- __u32 srqn;
- __u32 reserved;
-};
-
-struct mlx4_ib_create_qp_rss {
- __aligned_u64 rx_hash_fields_mask; /* Use enum mlx4_ib_rx_hash_fields */
- __u8 rx_hash_function; /* Use enum mlx4_ib_rx_hash_function_flags */
- __u8 reserved[7];
- __u8 rx_hash_key[40];
- __u32 comp_mask;
- __u32 reserved1;
-};
-
-struct mlx4_ib_create_qp {
- __aligned_u64 buf_addr;
- __aligned_u64 db_addr;
- __u8 log_sq_bb_count;
- __u8 log_sq_stride;
- __u8 sq_no_prefetch;
- __u8 reserved;
- __u32 inl_recv_sz;
-};
-
-struct mlx4_ib_create_wq {
- __aligned_u64 buf_addr;
- __aligned_u64 db_addr;
- __u8 log_range_size;
- __u8 reserved[3];
- __u32 comp_mask;
-};
-
-struct mlx4_ib_modify_wq {
- __u32 comp_mask;
- __u32 reserved;
-};
-
-struct mlx4_ib_create_rwq_ind_tbl_resp {
- __u32 response_length;
- __u32 reserved;
-};
-
-/* RX Hash function flags */
-enum mlx4_ib_rx_hash_function_flags {
- MLX4_IB_RX_HASH_FUNC_TOEPLITZ = 1 << 0,
-};
-
-/*
- * RX Hash flags, these flags allows to set which incoming packet's field should
- * participates in RX Hash. Each flag represent certain packet's field,
- * when the flag is set the field that is represented by the flag will
- * participate in RX Hash calculation.
- */
-enum mlx4_ib_rx_hash_fields {
- MLX4_IB_RX_HASH_SRC_IPV4 = 1 << 0,
- MLX4_IB_RX_HASH_DST_IPV4 = 1 << 1,
- MLX4_IB_RX_HASH_SRC_IPV6 = 1 << 2,
- MLX4_IB_RX_HASH_DST_IPV6 = 1 << 3,
- MLX4_IB_RX_HASH_SRC_PORT_TCP = 1 << 4,
- MLX4_IB_RX_HASH_DST_PORT_TCP = 1 << 5,
- MLX4_IB_RX_HASH_SRC_PORT_UDP = 1 << 6,
- MLX4_IB_RX_HASH_DST_PORT_UDP = 1 << 7,
- MLX4_IB_RX_HASH_INNER = 1ULL << 31,
-};
-
-struct mlx4_ib_rss_caps {
- __aligned_u64 rx_hash_fields_mask; /* enum mlx4_ib_rx_hash_fields */
- __u8 rx_hash_function; /* enum mlx4_ib_rx_hash_function_flags */
- __u8 reserved[7];
-};
-
-enum query_device_resp_mask {
- MLX4_IB_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET = 1UL << 0,
-};
-
-struct mlx4_ib_tso_caps {
- __u32 max_tso; /* Maximum tso payload size in bytes */
- /* Corresponding bit will be set if qp type from
- * 'enum ib_qp_type' is supported.
- */
- __u32 supported_qpts;
-};
-
-struct mlx4_uverbs_ex_query_device_resp {
- __u32 comp_mask;
- __u32 response_length;
- __aligned_u64 hca_core_clock_offset;
- __u32 max_inl_recv_sz;
- __u32 reserved;
- struct mlx4_ib_rss_caps rss_caps;
- struct mlx4_ib_tso_caps tso_caps;
-};
-
-#endif /* MLX4_ABI_USER_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/mlx5-abi.h b/lib/libc/include/generic-musl/rdma/mlx5-abi.h
deleted file mode 100644
index 5f226502d81b5639f370a0c4f2858f05d86b2113..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/mlx5-abi.h
+++ /dev/null
@@ -1,474 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/*
- * Copyright (c) 2013-2015, Mellanox Technologies. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef MLX5_ABI_USER_H
-#define MLX5_ABI_USER_H
-
-#include
-#include /* For ETH_ALEN. */
-#include
-
-enum {
- MLX5_QP_FLAG_SIGNATURE = 1 << 0,
- MLX5_QP_FLAG_SCATTER_CQE = 1 << 1,
- MLX5_QP_FLAG_TUNNEL_OFFLOADS = 1 << 2,
- MLX5_QP_FLAG_BFREG_INDEX = 1 << 3,
- MLX5_QP_FLAG_TYPE_DCT = 1 << 4,
- MLX5_QP_FLAG_TYPE_DCI = 1 << 5,
-};
-
-enum {
- MLX5_SRQ_FLAG_SIGNATURE = 1 << 0,
-};
-
-enum {
- MLX5_WQ_FLAG_SIGNATURE = 1 << 0,
-};
-
-/* Increment this value if any changes that break userspace ABI
- * compatibility are made.
- */
-#define MLX5_IB_UVERBS_ABI_VERSION 1
-
-/* Make sure that all structs defined in this file remain laid out so
- * that they pack the same way on 32-bit and 64-bit architectures (to
- * avoid incompatibility between 32-bit userspace and 64-bit kernels).
- * In particular do not use pointer types -- pass pointers in __u64
- * instead.
- */
-
-struct mlx5_ib_alloc_ucontext_req {
- __u32 total_num_bfregs;
- __u32 num_low_latency_bfregs;
-};
-
-enum mlx5_lib_caps {
- MLX5_LIB_CAP_4K_UAR = (__u64)1 << 0,
-};
-
-enum mlx5_ib_alloc_uctx_v2_flags {
- MLX5_IB_ALLOC_UCTX_DEVX = 1 << 0,
-};
-struct mlx5_ib_alloc_ucontext_req_v2 {
- __u32 total_num_bfregs;
- __u32 num_low_latency_bfregs;
- __u32 flags;
- __u32 comp_mask;
- __u8 max_cqe_version;
- __u8 reserved0;
- __u16 reserved1;
- __u32 reserved2;
- __aligned_u64 lib_caps;
-};
-
-enum mlx5_ib_alloc_ucontext_resp_mask {
- MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_CORE_CLOCK_OFFSET = 1UL << 0,
- MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_DUMP_FILL_MKEY = 1UL << 1,
-};
-
-enum mlx5_user_cmds_supp_uhw {
- MLX5_USER_CMDS_SUPP_UHW_QUERY_DEVICE = 1 << 0,
- MLX5_USER_CMDS_SUPP_UHW_CREATE_AH = 1 << 1,
-};
-
-/* The eth_min_inline response value is set to off-by-one vs the FW
- * returned value to allow user-space to deal with older kernels.
- */
-enum mlx5_user_inline_mode {
- MLX5_USER_INLINE_MODE_NA,
- MLX5_USER_INLINE_MODE_NONE,
- MLX5_USER_INLINE_MODE_L2,
- MLX5_USER_INLINE_MODE_IP,
- MLX5_USER_INLINE_MODE_TCP_UDP,
-};
-
-enum {
- MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM = 1 << 0,
- MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_REQ_METADATA = 1 << 1,
- MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_SPI_STEERING = 1 << 2,
- MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_FULL_OFFLOAD = 1 << 3,
- MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_TX_IV_IS_ESN = 1 << 4,
-};
-
-struct mlx5_ib_alloc_ucontext_resp {
- __u32 qp_tab_size;
- __u32 bf_reg_size;
- __u32 tot_bfregs;
- __u32 cache_line_size;
- __u16 max_sq_desc_sz;
- __u16 max_rq_desc_sz;
- __u32 max_send_wqebb;
- __u32 max_recv_wr;
- __u32 max_srq_recv_wr;
- __u16 num_ports;
- __u16 flow_action_flags;
- __u32 comp_mask;
- __u32 response_length;
- __u8 cqe_version;
- __u8 cmds_supp_uhw;
- __u8 eth_min_inline;
- __u8 clock_info_versions;
- __aligned_u64 hca_core_clock_offset;
- __u32 log_uar_size;
- __u32 num_uars_per_page;
- __u32 num_dyn_bfregs;
- __u32 dump_fill_mkey;
-};
-
-struct mlx5_ib_alloc_pd_resp {
- __u32 pdn;
-};
-
-struct mlx5_ib_tso_caps {
- __u32 max_tso; /* Maximum tso payload size in bytes */
-
- /* Corresponding bit will be set if qp type from
- * 'enum ib_qp_type' is supported, e.g.
- * supported_qpts |= 1 << IB_QPT_UD
- */
- __u32 supported_qpts;
-};
-
-struct mlx5_ib_rss_caps {
- __aligned_u64 rx_hash_fields_mask; /* enum mlx5_rx_hash_fields */
- __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */
- __u8 reserved[7];
-};
-
-enum mlx5_ib_cqe_comp_res_format {
- MLX5_IB_CQE_RES_FORMAT_HASH = 1 << 0,
- MLX5_IB_CQE_RES_FORMAT_CSUM = 1 << 1,
- MLX5_IB_CQE_RES_FORMAT_CSUM_STRIDX = 1 << 2,
-};
-
-struct mlx5_ib_cqe_comp_caps {
- __u32 max_num;
- __u32 supported_format; /* enum mlx5_ib_cqe_comp_res_format */
-};
-
-enum mlx5_ib_packet_pacing_cap_flags {
- MLX5_IB_PP_SUPPORT_BURST = 1 << 0,
-};
-
-struct mlx5_packet_pacing_caps {
- __u32 qp_rate_limit_min;
- __u32 qp_rate_limit_max; /* In kpbs */
-
- /* Corresponding bit will be set if qp type from
- * 'enum ib_qp_type' is supported, e.g.
- * supported_qpts |= 1 << IB_QPT_RAW_PACKET
- */
- __u32 supported_qpts;
- __u8 cap_flags; /* enum mlx5_ib_packet_pacing_cap_flags */
- __u8 reserved[3];
-};
-
-enum mlx5_ib_mpw_caps {
- MPW_RESERVED = 1 << 0,
- MLX5_IB_ALLOW_MPW = 1 << 1,
- MLX5_IB_SUPPORT_EMPW = 1 << 2,
-};
-
-enum mlx5_ib_sw_parsing_offloads {
- MLX5_IB_SW_PARSING = 1 << 0,
- MLX5_IB_SW_PARSING_CSUM = 1 << 1,
- MLX5_IB_SW_PARSING_LSO = 1 << 2,
-};
-
-struct mlx5_ib_sw_parsing_caps {
- __u32 sw_parsing_offloads; /* enum mlx5_ib_sw_parsing_offloads */
-
- /* Corresponding bit will be set if qp type from
- * 'enum ib_qp_type' is supported, e.g.
- * supported_qpts |= 1 << IB_QPT_RAW_PACKET
- */
- __u32 supported_qpts;
-};
-
-struct mlx5_ib_striding_rq_caps {
- __u32 min_single_stride_log_num_of_bytes;
- __u32 max_single_stride_log_num_of_bytes;
- __u32 min_single_wqe_log_num_of_strides;
- __u32 max_single_wqe_log_num_of_strides;
-
- /* Corresponding bit will be set if qp type from
- * 'enum ib_qp_type' is supported, e.g.
- * supported_qpts |= 1 << IB_QPT_RAW_PACKET
- */
- __u32 supported_qpts;
- __u32 reserved;
-};
-
-enum mlx5_ib_query_dev_resp_flags {
- /* Support 128B CQE compression */
- MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_COMP = 1 << 0,
- MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_PAD = 1 << 1,
-};
-
-enum mlx5_ib_tunnel_offloads {
- MLX5_IB_TUNNELED_OFFLOADS_VXLAN = 1 << 0,
- MLX5_IB_TUNNELED_OFFLOADS_GRE = 1 << 1,
- MLX5_IB_TUNNELED_OFFLOADS_GENEVE = 1 << 2,
- MLX5_IB_TUNNELED_OFFLOADS_MPLS_GRE = 1 << 3,
- MLX5_IB_TUNNELED_OFFLOADS_MPLS_UDP = 1 << 4,
-};
-
-struct mlx5_ib_query_device_resp {
- __u32 comp_mask;
- __u32 response_length;
- struct mlx5_ib_tso_caps tso_caps;
- struct mlx5_ib_rss_caps rss_caps;
- struct mlx5_ib_cqe_comp_caps cqe_comp_caps;
- struct mlx5_packet_pacing_caps packet_pacing_caps;
- __u32 mlx5_ib_support_multi_pkt_send_wqes;
- __u32 flags; /* Use enum mlx5_ib_query_dev_resp_flags */
- struct mlx5_ib_sw_parsing_caps sw_parsing_caps;
- struct mlx5_ib_striding_rq_caps striding_rq_caps;
- __u32 tunnel_offloads_caps; /* enum mlx5_ib_tunnel_offloads */
- __u32 reserved;
-};
-
-enum mlx5_ib_create_cq_flags {
- MLX5_IB_CREATE_CQ_FLAGS_CQE_128B_PAD = 1 << 0,
-};
-
-struct mlx5_ib_create_cq {
- __aligned_u64 buf_addr;
- __aligned_u64 db_addr;
- __u32 cqe_size;
- __u8 cqe_comp_en;
- __u8 cqe_comp_res_format;
- __u16 flags;
-};
-
-struct mlx5_ib_create_cq_resp {
- __u32 cqn;
- __u32 reserved;
-};
-
-struct mlx5_ib_resize_cq {
- __aligned_u64 buf_addr;
- __u16 cqe_size;
- __u16 reserved0;
- __u32 reserved1;
-};
-
-struct mlx5_ib_create_srq {
- __aligned_u64 buf_addr;
- __aligned_u64 db_addr;
- __u32 flags;
- __u32 reserved0; /* explicit padding (optional on i386) */
- __u32 uidx;
- __u32 reserved1;
-};
-
-struct mlx5_ib_create_srq_resp {
- __u32 srqn;
- __u32 reserved;
-};
-
-struct mlx5_ib_create_qp {
- __aligned_u64 buf_addr;
- __aligned_u64 db_addr;
- __u32 sq_wqe_count;
- __u32 rq_wqe_count;
- __u32 rq_wqe_shift;
- __u32 flags;
- __u32 uidx;
- __u32 bfreg_index;
- union {
- __aligned_u64 sq_buf_addr;
- __aligned_u64 access_key;
- };
-};
-
-/* RX Hash function flags */
-enum mlx5_rx_hash_function_flags {
- MLX5_RX_HASH_FUNC_TOEPLITZ = 1 << 0,
-};
-
-/*
- * RX Hash flags, these flags allows to set which incoming packet's field should
- * participates in RX Hash. Each flag represent certain packet's field,
- * when the flag is set the field that is represented by the flag will
- * participate in RX Hash calculation.
- * Note: *IPV4 and *IPV6 flags can't be enabled together on the same QP
- * and *TCP and *UDP flags can't be enabled together on the same QP.
-*/
-enum mlx5_rx_hash_fields {
- MLX5_RX_HASH_SRC_IPV4 = 1 << 0,
- MLX5_RX_HASH_DST_IPV4 = 1 << 1,
- MLX5_RX_HASH_SRC_IPV6 = 1 << 2,
- MLX5_RX_HASH_DST_IPV6 = 1 << 3,
- MLX5_RX_HASH_SRC_PORT_TCP = 1 << 4,
- MLX5_RX_HASH_DST_PORT_TCP = 1 << 5,
- MLX5_RX_HASH_SRC_PORT_UDP = 1 << 6,
- MLX5_RX_HASH_DST_PORT_UDP = 1 << 7,
- MLX5_RX_HASH_IPSEC_SPI = 1 << 8,
- /* Save bits for future fields */
- MLX5_RX_HASH_INNER = (1UL << 31),
-};
-
-struct mlx5_ib_create_qp_rss {
- __aligned_u64 rx_hash_fields_mask; /* enum mlx5_rx_hash_fields */
- __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */
- __u8 rx_key_len; /* valid only for Toeplitz */
- __u8 reserved[6];
- __u8 rx_hash_key[128]; /* valid only for Toeplitz */
- __u32 comp_mask;
- __u32 flags;
-};
-
-struct mlx5_ib_create_qp_resp {
- __u32 bfreg_index;
- __u32 reserved;
-};
-
-struct mlx5_ib_alloc_mw {
- __u32 comp_mask;
- __u8 num_klms;
- __u8 reserved1;
- __u16 reserved2;
-};
-
-enum mlx5_ib_create_wq_mask {
- MLX5_IB_CREATE_WQ_STRIDING_RQ = (1 << 0),
-};
-
-struct mlx5_ib_create_wq {
- __aligned_u64 buf_addr;
- __aligned_u64 db_addr;
- __u32 rq_wqe_count;
- __u32 rq_wqe_shift;
- __u32 user_index;
- __u32 flags;
- __u32 comp_mask;
- __u32 single_stride_log_num_of_bytes;
- __u32 single_wqe_log_num_of_strides;
- __u32 two_byte_shift_en;
-};
-
-struct mlx5_ib_create_ah_resp {
- __u32 response_length;
- __u8 dmac[ETH_ALEN];
- __u8 reserved[6];
-};
-
-struct mlx5_ib_burst_info {
- __u32 max_burst_sz;
- __u16 typical_pkt_sz;
- __u16 reserved;
-};
-
-struct mlx5_ib_modify_qp {
- __u32 comp_mask;
- struct mlx5_ib_burst_info burst_info;
- __u32 reserved;
-};
-
-struct mlx5_ib_modify_qp_resp {
- __u32 response_length;
- __u32 dctn;
-};
-
-struct mlx5_ib_create_wq_resp {
- __u32 response_length;
- __u32 reserved;
-};
-
-struct mlx5_ib_create_rwq_ind_tbl_resp {
- __u32 response_length;
- __u32 reserved;
-};
-
-struct mlx5_ib_modify_wq {
- __u32 comp_mask;
- __u32 reserved;
-};
-
-struct mlx5_ib_clock_info {
- __u32 sign;
- __u32 resv;
- __aligned_u64 nsec;
- __aligned_u64 cycles;
- __aligned_u64 frac;
- __u32 mult;
- __u32 shift;
- __aligned_u64 mask;
- __aligned_u64 overflow_period;
-};
-
-enum mlx5_ib_mmap_cmd {
- MLX5_IB_MMAP_REGULAR_PAGE = 0,
- MLX5_IB_MMAP_GET_CONTIGUOUS_PAGES = 1,
- MLX5_IB_MMAP_WC_PAGE = 2,
- MLX5_IB_MMAP_NC_PAGE = 3,
- /* 5 is chosen in order to be compatible with old versions of libmlx5 */
- MLX5_IB_MMAP_CORE_CLOCK = 5,
- MLX5_IB_MMAP_ALLOC_WC = 6,
- MLX5_IB_MMAP_CLOCK_INFO = 7,
- MLX5_IB_MMAP_DEVICE_MEM = 8,
-};
-
-enum {
- MLX5_IB_CLOCK_INFO_KERNEL_UPDATING = 1,
-};
-
-/* Bit indexes for the mlx5_alloc_ucontext_resp.clock_info_versions bitmap */
-enum {
- MLX5_IB_CLOCK_INFO_V1 = 0,
-};
-
-struct mlx5_ib_flow_counters_desc {
- __u32 description;
- __u32 index;
-};
-
-struct mlx5_ib_flow_counters_data {
- RDMA_UAPI_PTR(struct mlx5_ib_flow_counters_desc *, counters_data);
- __u32 ncounters;
- __u32 reserved;
-};
-
-struct mlx5_ib_create_flow {
- __u32 ncounters_data;
- __u32 reserved;
- /*
- * Following are counters data based on ncounters_data, each
- * entry in the data[] should match a corresponding counter object
- * that was pointed by a counters spec upon the flow creation
- */
- struct mlx5_ib_flow_counters_data data[];
-};
-
-#endif /* MLX5_ABI_USER_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/mlx5_user_ioctl_cmds.h b/lib/libc/include/generic-musl/rdma/mlx5_user_ioctl_cmds.h
deleted file mode 100644
index fd3213441e5f10c811eb101e9636ad1cb8a6ceb1..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/mlx5_user_ioctl_cmds.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 2018, Mellanox Technologies inc. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef MLX5_USER_IOCTL_CMDS_H
-#define MLX5_USER_IOCTL_CMDS_H
-
-#include
-#include
-
-enum mlx5_ib_create_flow_action_attrs {
- /* This attribute belong to the driver namespace */
- MLX5_IB_ATTR_CREATE_FLOW_ACTION_FLAGS = (1U << UVERBS_ID_NS_SHIFT),
-};
-
-enum mlx5_ib_alloc_dm_attrs {
- MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_ATTR_ALLOC_DM_RESP_PAGE_INDEX,
-};
-
-enum mlx5_ib_devx_methods {
- MLX5_IB_METHOD_DEVX_OTHER = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_METHOD_DEVX_QUERY_UAR,
- MLX5_IB_METHOD_DEVX_QUERY_EQN,
-};
-
-enum mlx5_ib_devx_other_attrs {
- MLX5_IB_ATTR_DEVX_OTHER_CMD_IN = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_ATTR_DEVX_OTHER_CMD_OUT,
-};
-
-enum mlx5_ib_devx_obj_create_attrs {
- MLX5_IB_ATTR_DEVX_OBJ_CREATE_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_IN,
- MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_OUT,
-};
-
-enum mlx5_ib_devx_query_uar_attrs {
- MLX5_IB_ATTR_DEVX_QUERY_UAR_USER_IDX = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_ATTR_DEVX_QUERY_UAR_DEV_IDX,
-};
-
-enum mlx5_ib_devx_obj_destroy_attrs {
- MLX5_IB_ATTR_DEVX_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
-};
-
-enum mlx5_ib_devx_obj_modify_attrs {
- MLX5_IB_ATTR_DEVX_OBJ_MODIFY_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_IN,
- MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_OUT,
-};
-
-enum mlx5_ib_devx_obj_query_attrs {
- MLX5_IB_ATTR_DEVX_OBJ_QUERY_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_IN,
- MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_OUT,
-};
-
-enum mlx5_ib_devx_query_eqn_attrs {
- MLX5_IB_ATTR_DEVX_QUERY_EQN_USER_VEC = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_ATTR_DEVX_QUERY_EQN_DEV_EQN,
-};
-
-enum mlx5_ib_devx_obj_methods {
- MLX5_IB_METHOD_DEVX_OBJ_CREATE = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_METHOD_DEVX_OBJ_DESTROY,
- MLX5_IB_METHOD_DEVX_OBJ_MODIFY,
- MLX5_IB_METHOD_DEVX_OBJ_QUERY,
-};
-
-enum mlx5_ib_devx_umem_reg_attrs {
- MLX5_IB_ATTR_DEVX_UMEM_REG_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_ATTR_DEVX_UMEM_REG_ADDR,
- MLX5_IB_ATTR_DEVX_UMEM_REG_LEN,
- MLX5_IB_ATTR_DEVX_UMEM_REG_ACCESS,
- MLX5_IB_ATTR_DEVX_UMEM_REG_OUT_ID,
-};
-
-enum mlx5_ib_devx_umem_dereg_attrs {
- MLX5_IB_ATTR_DEVX_UMEM_DEREG_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
-};
-
-enum mlx5_ib_devx_umem_methods {
- MLX5_IB_METHOD_DEVX_UMEM_REG = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_METHOD_DEVX_UMEM_DEREG,
-};
-
-enum mlx5_ib_objects {
- MLX5_IB_OBJECT_DEVX = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_OBJECT_DEVX_OBJ,
- MLX5_IB_OBJECT_DEVX_UMEM,
- MLX5_IB_OBJECT_FLOW_MATCHER,
-};
-
-enum mlx5_ib_flow_matcher_create_attrs {
- MLX5_IB_ATTR_FLOW_MATCHER_CREATE_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_ATTR_FLOW_MATCHER_MATCH_MASK,
- MLX5_IB_ATTR_FLOW_MATCHER_FLOW_TYPE,
- MLX5_IB_ATTR_FLOW_MATCHER_MATCH_CRITERIA,
-};
-
-enum mlx5_ib_flow_matcher_destroy_attrs {
- MLX5_IB_ATTR_FLOW_MATCHER_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
-};
-
-enum mlx5_ib_flow_matcher_methods {
- MLX5_IB_METHOD_FLOW_MATCHER_CREATE = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_METHOD_FLOW_MATCHER_DESTROY,
-};
-
-#define MLX5_IB_DW_MATCH_PARAM 0x80
-
-struct mlx5_ib_match_params {
- __u32 match_params[MLX5_IB_DW_MATCH_PARAM];
-};
-
-enum mlx5_ib_flow_type {
- MLX5_IB_FLOW_TYPE_NORMAL,
- MLX5_IB_FLOW_TYPE_SNIFFER,
- MLX5_IB_FLOW_TYPE_ALL_DEFAULT,
- MLX5_IB_FLOW_TYPE_MC_DEFAULT,
-};
-
-enum mlx5_ib_create_flow_attrs {
- MLX5_IB_ATTR_CREATE_FLOW_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_ATTR_CREATE_FLOW_MATCH_VALUE,
- MLX5_IB_ATTR_CREATE_FLOW_DEST_QP,
- MLX5_IB_ATTR_CREATE_FLOW_DEST_DEVX,
- MLX5_IB_ATTR_CREATE_FLOW_MATCHER,
-};
-
-enum mlx5_ib_destoy_flow_attrs {
- MLX5_IB_ATTR_DESTROY_FLOW_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
-};
-
-enum mlx5_ib_flow_methods {
- MLX5_IB_METHOD_CREATE_FLOW = (1U << UVERBS_ID_NS_SHIFT),
- MLX5_IB_METHOD_DESTROY_FLOW,
-};
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/mlx5_user_ioctl_verbs.h b/lib/libc/include/generic-musl/rdma/mlx5_user_ioctl_verbs.h
deleted file mode 100644
index e707316ff355a4343d37b8166074fcf0df706744..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/mlx5_user_ioctl_verbs.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2018, Mellanox Technologies inc. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef MLX5_USER_IOCTL_VERBS_H
-#define MLX5_USER_IOCTL_VERBS_H
-
-#include
-
-enum mlx5_ib_uapi_flow_action_flags {
- MLX5_IB_UAPI_FLOW_ACTION_FLAGS_REQUIRE_METADATA = 1 << 0,
-};
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/mthca-abi.h b/lib/libc/include/generic-musl/rdma/mthca-abi.h
deleted file mode 100644
index 2384b124b722d9c94e56a489ddb14bf955f272ee..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/mthca-abi.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/*
- * Copyright (c) 2005 Topspin Communications. All rights reserved.
- * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef MTHCA_ABI_USER_H
-#define MTHCA_ABI_USER_H
-
-#include
-
-/*
- * Increment this value if any changes that break userspace ABI
- * compatibility are made.
- */
-#define MTHCA_UVERBS_ABI_VERSION 1
-
-/*
- * Make sure that all structs defined in this file remain laid out so
- * that they pack the same way on 32-bit and 64-bit architectures (to
- * avoid incompatibility between 32-bit userspace and 64-bit kernels).
- * In particular do not use pointer types -- pass pointers in __u64
- * instead.
- */
-struct mthca_alloc_ucontext_resp {
- __u32 qp_tab_size;
- __u32 uarc_size;
-};
-
-struct mthca_alloc_pd_resp {
- __u32 pdn;
- __u32 reserved;
-};
-
-/*
- * Mark the memory region with a DMA attribute that causes
- * in-flight DMA to be flushed when the region is written to:
- */
-#define MTHCA_MR_DMASYNC 0x1
-
-struct mthca_reg_mr {
- __u32 mr_attrs;
- __u32 reserved;
-};
-
-struct mthca_create_cq {
- __u32 lkey;
- __u32 pdn;
- __aligned_u64 arm_db_page;
- __aligned_u64 set_db_page;
- __u32 arm_db_index;
- __u32 set_db_index;
-};
-
-struct mthca_create_cq_resp {
- __u32 cqn;
- __u32 reserved;
-};
-
-struct mthca_resize_cq {
- __u32 lkey;
- __u32 reserved;
-};
-
-struct mthca_create_srq {
- __u32 lkey;
- __u32 db_index;
- __aligned_u64 db_page;
-};
-
-struct mthca_create_srq_resp {
- __u32 srqn;
- __u32 reserved;
-};
-
-struct mthca_create_qp {
- __u32 lkey;
- __u32 reserved;
- __aligned_u64 sq_db_page;
- __aligned_u64 rq_db_page;
- __u32 sq_db_index;
- __u32 rq_db_index;
-};
-#endif /* MTHCA_ABI_USER_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/nes-abi.h b/lib/libc/include/generic-musl/rdma/nes-abi.h
deleted file mode 100644
index d9f90786ab484b13e53cb75f4e359ab7673dd89e..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/nes-abi.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/*
- * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.
- * Copyright (c) 2005 Topspin Communications. All rights reserved.
- * Copyright (c) 2005 Cisco Systems. All rights reserved.
- * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-#ifndef NES_ABI_USER_H
-#define NES_ABI_USER_H
-
-#include
-
-#define NES_ABI_USERSPACE_VER 2
-#define NES_ABI_KERNEL_VER 2
-
-/*
- * Make sure that all structs defined in this file remain laid out so
- * that they pack the same way on 32-bit and 64-bit architectures (to
- * avoid incompatibility between 32-bit userspace and 64-bit kernels).
- * In particular do not use pointer types -- pass pointers in __u64
- * instead.
- */
-
-struct nes_alloc_ucontext_req {
- __u32 reserved32;
- __u8 userspace_ver;
- __u8 reserved8[3];
-};
-
-struct nes_alloc_ucontext_resp {
- __u32 max_pds; /* maximum pds allowed for this user process */
- __u32 max_qps; /* maximum qps allowed for this user process */
- __u32 wq_size; /* size of the WQs (sq+rq) allocated to the mmaped area */
- __u8 virtwq; /* flag to indicate if virtual WQ are to be used or not */
- __u8 kernel_ver;
- __u8 reserved[2];
-};
-
-struct nes_alloc_pd_resp {
- __u32 pd_id;
- __u32 mmap_db_index;
-};
-
-struct nes_create_cq_req {
- __aligned_u64 user_cq_buffer;
- __u32 mcrqf;
- __u8 reserved[4];
-};
-
-struct nes_create_qp_req {
- __aligned_u64 user_wqe_buffers;
- __aligned_u64 user_qp_buffer;
-};
-
-enum iwnes_memreg_type {
- IWNES_MEMREG_TYPE_MEM = 0x0000,
- IWNES_MEMREG_TYPE_QP = 0x0001,
- IWNES_MEMREG_TYPE_CQ = 0x0002,
- IWNES_MEMREG_TYPE_MW = 0x0003,
- IWNES_MEMREG_TYPE_FMR = 0x0004,
- IWNES_MEMREG_TYPE_FMEM = 0x0005,
-};
-
-struct nes_mem_reg_req {
- __u32 reg_type; /* indicates if id is memory, QP or CQ */
- __u32 reserved;
-};
-
-struct nes_create_cq_resp {
- __u32 cq_id;
- __u32 cq_size;
- __u32 mmap_db_index;
- __u32 reserved;
-};
-
-struct nes_create_qp_resp {
- __u32 qp_id;
- __u32 actual_sq_size;
- __u32 actual_rq_size;
- __u32 mmap_sq_db_index;
- __u32 mmap_rq_db_index;
- __u32 nes_drv_opt;
-};
-
-#endif /* NES_ABI_USER_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/ocrdma-abi.h b/lib/libc/include/generic-musl/rdma/ocrdma-abi.h
deleted file mode 100644
index 518cff8d8c968fd9155b6b8c57b5d43034062ec4..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/ocrdma-abi.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
-/* This file is part of the Emulex RoCE Device Driver for
- * RoCE (RDMA over Converged Ethernet) adapters.
- * Copyright (C) 2012-2015 Emulex. All rights reserved.
- * EMULEX and SLI are trademarks of Emulex.
- * www.emulex.com
- *
- * This software is available to you under a choice of one of two licenses.
- * You may choose to be licensed under the terms of the GNU General Public
- * License (GPL) Version 2, available from the file COPYING in the main
- * directory of this source tree, or the BSD license below:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Contact Information:
- * linux-drivers@emulex.com
- *
- * Emulex
- * 3333 Susan Street
- * Costa Mesa, CA 92626
- */
-
-#ifndef OCRDMA_ABI_USER_H
-#define OCRDMA_ABI_USER_H
-
-#include
-
-#define OCRDMA_ABI_VERSION 2
-#define OCRDMA_BE_ROCE_ABI_VERSION 1
-/* user kernel communication data structures. */
-
-struct ocrdma_alloc_ucontext_resp {
- __u32 dev_id;
- __u32 wqe_size;
- __u32 max_inline_data;
- __u32 dpp_wqe_size;
- __aligned_u64 ah_tbl_page;
- __u32 ah_tbl_len;
- __u32 rqe_size;
- __u8 fw_ver[32];
- /* for future use/new features in progress */
- __aligned_u64 rsvd1;
- __aligned_u64 rsvd2;
-};
-
-struct ocrdma_alloc_pd_ureq {
- __u32 rsvd[2];
-};
-
-struct ocrdma_alloc_pd_uresp {
- __u32 id;
- __u32 dpp_enabled;
- __u32 dpp_page_addr_hi;
- __u32 dpp_page_addr_lo;
- __u32 rsvd[2];
-};
-
-struct ocrdma_create_cq_ureq {
- __u32 dpp_cq;
- __u32 rsvd; /* pad */
-};
-
-#define MAX_CQ_PAGES 8
-struct ocrdma_create_cq_uresp {
- __u32 cq_id;
- __u32 page_size;
- __u32 num_pages;
- __u32 max_hw_cqe;
- __aligned_u64 page_addr[MAX_CQ_PAGES];
- __aligned_u64 db_page_addr;
- __u32 db_page_size;
- __u32 phase_change;
- /* for future use/new features in progress */
- __aligned_u64 rsvd1;
- __aligned_u64 rsvd2;
-};
-
-#define MAX_QP_PAGES 8
-#define MAX_UD_AV_PAGES 8
-
-struct ocrdma_create_qp_ureq {
- __u8 enable_dpp_cq;
- __u8 rsvd;
- __u16 dpp_cq_id;
- __u32 rsvd1; /* pad */
-};
-
-struct ocrdma_create_qp_uresp {
- __u16 qp_id;
- __u16 sq_dbid;
- __u16 rq_dbid;
- __u16 resv0; /* pad */
- __u32 sq_page_size;
- __u32 rq_page_size;
- __u32 num_sq_pages;
- __u32 num_rq_pages;
- __aligned_u64 sq_page_addr[MAX_QP_PAGES];
- __aligned_u64 rq_page_addr[MAX_QP_PAGES];
- __aligned_u64 db_page_addr;
- __u32 db_page_size;
- __u32 dpp_credit;
- __u32 dpp_offset;
- __u32 num_wqe_allocated;
- __u32 num_rqe_allocated;
- __u32 db_sq_offset;
- __u32 db_rq_offset;
- __u32 db_shift;
- __aligned_u64 rsvd[11];
-};
-
-struct ocrdma_create_srq_uresp {
- __u16 rq_dbid;
- __u16 resv0; /* pad */
- __u32 resv1;
-
- __u32 rq_page_size;
- __u32 num_rq_pages;
-
- __aligned_u64 rq_page_addr[MAX_QP_PAGES];
- __aligned_u64 db_page_addr;
-
- __u32 db_page_size;
- __u32 num_rqe_allocated;
- __u32 db_rq_offset;
- __u32 db_shift;
-
- __aligned_u64 rsvd2;
- __aligned_u64 rsvd3;
-};
-
-#endif /* OCRDMA_ABI_USER_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/qedr-abi.h b/lib/libc/include/generic-musl/rdma/qedr-abi.h
deleted file mode 100644
index 6dd9316062b4c2147ca7d604101af47e9fe229a9..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/qedr-abi.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/* QLogic qedr NIC Driver
- * Copyright (c) 2015-2016 QLogic Corporation
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and /or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef __QEDR_USER_H__
-#define __QEDR_USER_H__
-
-#include
-
-#define QEDR_ABI_VERSION (8)
-
-/* user kernel communication data structures. */
-
-struct qedr_alloc_ucontext_resp {
- __aligned_u64 db_pa;
- __u32 db_size;
-
- __u32 max_send_wr;
- __u32 max_recv_wr;
- __u32 max_srq_wr;
- __u32 sges_per_send_wr;
- __u32 sges_per_recv_wr;
- __u32 sges_per_srq_wr;
- __u32 max_cqes;
- __u8 dpm_enabled;
- __u8 wids_enabled;
- __u16 wid_count;
- __u32 reserved;
-};
-
-struct qedr_alloc_pd_ureq {
- __aligned_u64 rsvd1;
-};
-
-struct qedr_alloc_pd_uresp {
- __u32 pd_id;
- __u32 reserved;
-};
-
-struct qedr_create_cq_ureq {
- __aligned_u64 addr;
- __aligned_u64 len;
-};
-
-struct qedr_create_cq_uresp {
- __u32 db_offset;
- __u16 icid;
- __u16 reserved;
-};
-
-struct qedr_create_qp_ureq {
- __u32 qp_handle_hi;
- __u32 qp_handle_lo;
-
- /* SQ */
- /* user space virtual address of SQ buffer */
- __aligned_u64 sq_addr;
-
- /* length of SQ buffer */
- __aligned_u64 sq_len;
-
- /* RQ */
- /* user space virtual address of RQ buffer */
- __aligned_u64 rq_addr;
-
- /* length of RQ buffer */
- __aligned_u64 rq_len;
-};
-
-struct qedr_create_qp_uresp {
- __u32 qp_id;
- __u32 atomic_supported;
-
- /* SQ */
- __u32 sq_db_offset;
- __u16 sq_icid;
-
- /* RQ */
- __u32 rq_db_offset;
- __u16 rq_icid;
-
- __u32 rq_db2_offset;
- __u32 reserved;
-};
-
-struct qedr_create_srq_ureq {
- /* user space virtual address of producer pair */
- __aligned_u64 prod_pair_addr;
-
- /* user space virtual address of SRQ buffer */
- __aligned_u64 srq_addr;
-
- /* length of SRQ buffer */
- __aligned_u64 srq_len;
-};
-
-struct qedr_create_srq_uresp {
- __u16 srq_id;
- __u16 reserved0;
- __u32 reserved1;
-};
-
-#endif /* __QEDR_USER_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/rdma_netlink.h b/lib/libc/include/generic-musl/rdma/rdma_netlink.h
deleted file mode 100644
index bca37b12bd137ae382d96ac02d7faa65b50e31b2..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/rdma_netlink.h
+++ /dev/null
@@ -1,434 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#ifndef _RDMA_NETLINK_H
-#define _RDMA_NETLINK_H
-
-#include
-
-enum {
- RDMA_NL_RDMA_CM = 1,
- RDMA_NL_IWCM,
- RDMA_NL_RSVD,
- RDMA_NL_LS, /* RDMA Local Services */
- RDMA_NL_NLDEV, /* RDMA device interface */
- RDMA_NL_NUM_CLIENTS
-};
-
-enum {
- RDMA_NL_GROUP_CM = 1,
- RDMA_NL_GROUP_IWPM,
- RDMA_NL_GROUP_LS,
- RDMA_NL_NUM_GROUPS
-};
-
-#define RDMA_NL_GET_CLIENT(type) ((type & (((1 << 6) - 1) << 10)) >> 10)
-#define RDMA_NL_GET_OP(type) (type & ((1 << 10) - 1))
-#define RDMA_NL_GET_TYPE(client, op) ((client << 10) + op)
-
-enum {
- RDMA_NL_RDMA_CM_ID_STATS = 0,
- RDMA_NL_RDMA_CM_NUM_OPS
-};
-
-enum {
- RDMA_NL_RDMA_CM_ATTR_SRC_ADDR = 1,
- RDMA_NL_RDMA_CM_ATTR_DST_ADDR,
- RDMA_NL_RDMA_CM_NUM_ATTR,
-};
-
-/* iwarp port mapper op-codes */
-enum {
- RDMA_NL_IWPM_REG_PID = 0,
- RDMA_NL_IWPM_ADD_MAPPING,
- RDMA_NL_IWPM_QUERY_MAPPING,
- RDMA_NL_IWPM_REMOVE_MAPPING,
- RDMA_NL_IWPM_REMOTE_INFO,
- RDMA_NL_IWPM_HANDLE_ERR,
- RDMA_NL_IWPM_MAPINFO,
- RDMA_NL_IWPM_MAPINFO_NUM,
- RDMA_NL_IWPM_NUM_OPS
-};
-
-struct rdma_cm_id_stats {
- __u32 qp_num;
- __u32 bound_dev_if;
- __u32 port_space;
- __s32 pid;
- __u8 cm_state;
- __u8 node_type;
- __u8 port_num;
- __u8 qp_type;
-};
-
-enum {
- IWPM_NLA_REG_PID_UNSPEC = 0,
- IWPM_NLA_REG_PID_SEQ,
- IWPM_NLA_REG_IF_NAME,
- IWPM_NLA_REG_IBDEV_NAME,
- IWPM_NLA_REG_ULIB_NAME,
- IWPM_NLA_REG_PID_MAX
-};
-
-enum {
- IWPM_NLA_RREG_PID_UNSPEC = 0,
- IWPM_NLA_RREG_PID_SEQ,
- IWPM_NLA_RREG_IBDEV_NAME,
- IWPM_NLA_RREG_ULIB_NAME,
- IWPM_NLA_RREG_ULIB_VER,
- IWPM_NLA_RREG_PID_ERR,
- IWPM_NLA_RREG_PID_MAX
-
-};
-
-enum {
- IWPM_NLA_MANAGE_MAPPING_UNSPEC = 0,
- IWPM_NLA_MANAGE_MAPPING_SEQ,
- IWPM_NLA_MANAGE_ADDR,
- IWPM_NLA_MANAGE_MAPPED_LOC_ADDR,
- IWPM_NLA_RMANAGE_MAPPING_ERR,
- IWPM_NLA_RMANAGE_MAPPING_MAX
-};
-
-#define IWPM_NLA_MANAGE_MAPPING_MAX 3
-#define IWPM_NLA_QUERY_MAPPING_MAX 4
-#define IWPM_NLA_MAPINFO_SEND_MAX 3
-
-enum {
- IWPM_NLA_QUERY_MAPPING_UNSPEC = 0,
- IWPM_NLA_QUERY_MAPPING_SEQ,
- IWPM_NLA_QUERY_LOCAL_ADDR,
- IWPM_NLA_QUERY_REMOTE_ADDR,
- IWPM_NLA_RQUERY_MAPPED_LOC_ADDR,
- IWPM_NLA_RQUERY_MAPPED_REM_ADDR,
- IWPM_NLA_RQUERY_MAPPING_ERR,
- IWPM_NLA_RQUERY_MAPPING_MAX
-};
-
-enum {
- IWPM_NLA_MAPINFO_REQ_UNSPEC = 0,
- IWPM_NLA_MAPINFO_ULIB_NAME,
- IWPM_NLA_MAPINFO_ULIB_VER,
- IWPM_NLA_MAPINFO_REQ_MAX
-};
-
-enum {
- IWPM_NLA_MAPINFO_UNSPEC = 0,
- IWPM_NLA_MAPINFO_LOCAL_ADDR,
- IWPM_NLA_MAPINFO_MAPPED_ADDR,
- IWPM_NLA_MAPINFO_MAX
-};
-
-enum {
- IWPM_NLA_MAPINFO_NUM_UNSPEC = 0,
- IWPM_NLA_MAPINFO_SEQ,
- IWPM_NLA_MAPINFO_SEND_NUM,
- IWPM_NLA_MAPINFO_ACK_NUM,
- IWPM_NLA_MAPINFO_NUM_MAX
-};
-
-enum {
- IWPM_NLA_ERR_UNSPEC = 0,
- IWPM_NLA_ERR_SEQ,
- IWPM_NLA_ERR_CODE,
- IWPM_NLA_ERR_MAX
-};
-
-/*
- * Local service operations:
- * RESOLVE - The client requests the local service to resolve a path.
- * SET_TIMEOUT - The local service requests the client to set the timeout.
- * IP_RESOLVE - The client requests the local service to resolve an IP to GID.
- */
-enum {
- RDMA_NL_LS_OP_RESOLVE = 0,
- RDMA_NL_LS_OP_SET_TIMEOUT,
- RDMA_NL_LS_OP_IP_RESOLVE,
- RDMA_NL_LS_NUM_OPS
-};
-
-/* Local service netlink message flags */
-#define RDMA_NL_LS_F_ERR 0x0100 /* Failed response */
-
-/*
- * Local service resolve operation family header.
- * The layout for the resolve operation:
- * nlmsg header
- * family header
- * attributes
- */
-
-/*
- * Local service path use:
- * Specify how the path(s) will be used.
- * ALL - For connected CM operation (6 pathrecords)
- * UNIDIRECTIONAL - For unidirectional UD (1 pathrecord)
- * GMP - For miscellaneous GMP like operation (at least 1 reversible
- * pathrecord)
- */
-enum {
- LS_RESOLVE_PATH_USE_ALL = 0,
- LS_RESOLVE_PATH_USE_UNIDIRECTIONAL,
- LS_RESOLVE_PATH_USE_GMP,
- LS_RESOLVE_PATH_USE_MAX
-};
-
-#define LS_DEVICE_NAME_MAX 64
-
-struct rdma_ls_resolve_header {
- __u8 device_name[LS_DEVICE_NAME_MAX];
- __u8 port_num;
- __u8 path_use;
-};
-
-struct rdma_ls_ip_resolve_header {
- __u32 ifindex;
-};
-
-/* Local service attribute type */
-#define RDMA_NLA_F_MANDATORY (1 << 13)
-#define RDMA_NLA_TYPE_MASK (~(NLA_F_NESTED | NLA_F_NET_BYTEORDER | \
- RDMA_NLA_F_MANDATORY))
-
-/*
- * Local service attributes:
- * Attr Name Size Byte order
- * -----------------------------------------------------
- * PATH_RECORD struct ib_path_rec_data
- * TIMEOUT u32 cpu
- * SERVICE_ID u64 cpu
- * DGID u8[16] BE
- * SGID u8[16] BE
- * TCLASS u8
- * PKEY u16 cpu
- * QOS_CLASS u16 cpu
- * IPV4 u32 BE
- * IPV6 u8[16] BE
- */
-enum {
- LS_NLA_TYPE_UNSPEC = 0,
- LS_NLA_TYPE_PATH_RECORD,
- LS_NLA_TYPE_TIMEOUT,
- LS_NLA_TYPE_SERVICE_ID,
- LS_NLA_TYPE_DGID,
- LS_NLA_TYPE_SGID,
- LS_NLA_TYPE_TCLASS,
- LS_NLA_TYPE_PKEY,
- LS_NLA_TYPE_QOS_CLASS,
- LS_NLA_TYPE_IPV4,
- LS_NLA_TYPE_IPV6,
- LS_NLA_TYPE_MAX
-};
-
-/* Local service DGID/SGID attribute: big endian */
-struct rdma_nla_ls_gid {
- __u8 gid[16];
-};
-
-enum rdma_nldev_command {
- RDMA_NLDEV_CMD_UNSPEC,
-
- RDMA_NLDEV_CMD_GET, /* can dump */
-
- /* 2 - 4 are free to use */
-
- RDMA_NLDEV_CMD_PORT_GET = 5, /* can dump */
-
- /* 6 - 8 are free to use */
-
- RDMA_NLDEV_CMD_RES_GET = 9, /* can dump */
-
- RDMA_NLDEV_CMD_RES_QP_GET, /* can dump */
-
- RDMA_NLDEV_CMD_RES_CM_ID_GET, /* can dump */
-
- RDMA_NLDEV_CMD_RES_CQ_GET, /* can dump */
-
- RDMA_NLDEV_CMD_RES_MR_GET, /* can dump */
-
- RDMA_NLDEV_CMD_RES_PD_GET, /* can dump */
-
- RDMA_NLDEV_NUM_OPS
-};
-
-enum {
- RDMA_NLDEV_ATTR_ENTRY_STRLEN = 16,
-};
-
-enum rdma_nldev_print_type {
- RDMA_NLDEV_PRINT_TYPE_UNSPEC,
- RDMA_NLDEV_PRINT_TYPE_HEX,
-};
-
-enum rdma_nldev_attr {
- /* don't change the order or add anything between, this is ABI! */
- RDMA_NLDEV_ATTR_UNSPEC,
-
- /* Pad attribute for 64b alignment */
- RDMA_NLDEV_ATTR_PAD = RDMA_NLDEV_ATTR_UNSPEC,
-
- /* Identifier for ib_device */
- RDMA_NLDEV_ATTR_DEV_INDEX, /* u32 */
-
- RDMA_NLDEV_ATTR_DEV_NAME, /* string */
- /*
- * Device index together with port index are identifiers
- * for port/link properties.
- *
- * For RDMA_NLDEV_CMD_GET commamnd, port index will return number
- * of available ports in ib_device, while for port specific operations,
- * it will be real port index as it appears in sysfs. Port index follows
- * sysfs notation and starts from 1 for the first port.
- */
- RDMA_NLDEV_ATTR_PORT_INDEX, /* u32 */
-
- /*
- * Device and port capabilities
- */
- RDMA_NLDEV_ATTR_CAP_FLAGS, /* u64 */
-
- /*
- * FW version
- */
- RDMA_NLDEV_ATTR_FW_VERSION, /* string */
-
- /*
- * Node GUID (in host byte order) associated with the RDMA device.
- */
- RDMA_NLDEV_ATTR_NODE_GUID, /* u64 */
-
- /*
- * System image GUID (in host byte order) associated with
- * this RDMA device and other devices which are part of a
- * single system.
- */
- RDMA_NLDEV_ATTR_SYS_IMAGE_GUID, /* u64 */
-
- /*
- * Subnet prefix (in host byte order)
- */
- RDMA_NLDEV_ATTR_SUBNET_PREFIX, /* u64 */
-
- /*
- * Local Identifier (LID),
- * According to IB specification, It is 16-bit address assigned
- * by the Subnet Manager. Extended to be 32-bit for OmniPath users.
- */
- RDMA_NLDEV_ATTR_LID, /* u32 */
- RDMA_NLDEV_ATTR_SM_LID, /* u32 */
-
- /*
- * LID mask control (LMC)
- */
- RDMA_NLDEV_ATTR_LMC, /* u8 */
-
- RDMA_NLDEV_ATTR_PORT_STATE, /* u8 */
- RDMA_NLDEV_ATTR_PORT_PHYS_STATE, /* u8 */
-
- RDMA_NLDEV_ATTR_DEV_NODE_TYPE, /* u8 */
-
- RDMA_NLDEV_ATTR_RES_SUMMARY, /* nested table */
- RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY, /* nested table */
- RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_NAME, /* string */
- RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_CURR, /* u64 */
-
- RDMA_NLDEV_ATTR_RES_QP, /* nested table */
- RDMA_NLDEV_ATTR_RES_QP_ENTRY, /* nested table */
- /*
- * Local QPN
- */
- RDMA_NLDEV_ATTR_RES_LQPN, /* u32 */
- /*
- * Remote QPN,
- * Applicable for RC and UC only IBTA 11.2.5.3 QUERY QUEUE PAIR
- */
- RDMA_NLDEV_ATTR_RES_RQPN, /* u32 */
- /*
- * Receive Queue PSN,
- * Applicable for RC and UC only 11.2.5.3 QUERY QUEUE PAIR
- */
- RDMA_NLDEV_ATTR_RES_RQ_PSN, /* u32 */
- /*
- * Send Queue PSN
- */
- RDMA_NLDEV_ATTR_RES_SQ_PSN, /* u32 */
- RDMA_NLDEV_ATTR_RES_PATH_MIG_STATE, /* u8 */
- /*
- * QP types as visible to RDMA/core, the reserved QPT
- * are not exported through this interface.
- */
- RDMA_NLDEV_ATTR_RES_TYPE, /* u8 */
- RDMA_NLDEV_ATTR_RES_STATE, /* u8 */
- /*
- * Process ID which created object,
- * in case of kernel origin, PID won't exist.
- */
- RDMA_NLDEV_ATTR_RES_PID, /* u32 */
- /*
- * The name of process created following resource.
- * It will exist only for kernel objects.
- * For user created objects, the user is supposed
- * to read /proc/PID/comm file.
- */
- RDMA_NLDEV_ATTR_RES_KERN_NAME, /* string */
-
- RDMA_NLDEV_ATTR_RES_CM_ID, /* nested table */
- RDMA_NLDEV_ATTR_RES_CM_ID_ENTRY, /* nested table */
- /*
- * rdma_cm_id port space.
- */
- RDMA_NLDEV_ATTR_RES_PS, /* u32 */
- /*
- * Source and destination socket addresses
- */
- RDMA_NLDEV_ATTR_RES_SRC_ADDR, /* __kernel_sockaddr_storage */
- RDMA_NLDEV_ATTR_RES_DST_ADDR, /* __kernel_sockaddr_storage */
-
- RDMA_NLDEV_ATTR_RES_CQ, /* nested table */
- RDMA_NLDEV_ATTR_RES_CQ_ENTRY, /* nested table */
- RDMA_NLDEV_ATTR_RES_CQE, /* u32 */
- RDMA_NLDEV_ATTR_RES_USECNT, /* u64 */
- RDMA_NLDEV_ATTR_RES_POLL_CTX, /* u8 */
-
- RDMA_NLDEV_ATTR_RES_MR, /* nested table */
- RDMA_NLDEV_ATTR_RES_MR_ENTRY, /* nested table */
- RDMA_NLDEV_ATTR_RES_RKEY, /* u32 */
- RDMA_NLDEV_ATTR_RES_LKEY, /* u32 */
- RDMA_NLDEV_ATTR_RES_IOVA, /* u64 */
- RDMA_NLDEV_ATTR_RES_MRLEN, /* u64 */
-
- RDMA_NLDEV_ATTR_RES_PD, /* nested table */
- RDMA_NLDEV_ATTR_RES_PD_ENTRY, /* nested table */
- RDMA_NLDEV_ATTR_RES_LOCAL_DMA_LKEY, /* u32 */
- RDMA_NLDEV_ATTR_RES_UNSAFE_GLOBAL_RKEY, /* u32 */
- /*
- * Provides logical name and index of netdevice which is
- * connected to physical port. This information is relevant
- * for RoCE and iWARP.
- *
- * The netdevices which are associated with containers are
- * supposed to be exported together with GID table once it
- * will be exposed through the netlink. Because the
- * associated netdevices are properties of GIDs.
- */
- RDMA_NLDEV_ATTR_NDEV_INDEX, /* u32 */
- RDMA_NLDEV_ATTR_NDEV_NAME, /* string */
- /*
- * driver-specific attributes.
- */
- RDMA_NLDEV_ATTR_DRIVER, /* nested table */
- RDMA_NLDEV_ATTR_DRIVER_ENTRY, /* nested table */
- RDMA_NLDEV_ATTR_DRIVER_STRING, /* string */
- /*
- * u8 values from enum rdma_nldev_print_type
- */
- RDMA_NLDEV_ATTR_DRIVER_PRINT_TYPE, /* u8 */
- RDMA_NLDEV_ATTR_DRIVER_S32, /* s32 */
- RDMA_NLDEV_ATTR_DRIVER_U32, /* u32 */
- RDMA_NLDEV_ATTR_DRIVER_S64, /* s64 */
- RDMA_NLDEV_ATTR_DRIVER_U64, /* u64 */
-
- /*
- * Always the end
- */
- RDMA_NLDEV_ATTR_MAX
-};
-#endif /* _RDMA_NETLINK_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/rdma_user_cm.h b/lib/libc/include/generic-musl/rdma/rdma_user_cm.h
deleted file mode 100644
index 22fb801b6aefba24525bf924fbb2b937c82c6b22..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/rdma_user_cm.h
+++ /dev/null
@@ -1,324 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/*
- * Copyright (c) 2005-2006 Intel Corporation. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef RDMA_USER_CM_H
-#define RDMA_USER_CM_H
-
-#include
-#include
-#include
-#include
-#include
-
-#define RDMA_USER_CM_ABI_VERSION 4
-
-#define RDMA_MAX_PRIVATE_DATA 256
-
-enum {
- RDMA_USER_CM_CMD_CREATE_ID,
- RDMA_USER_CM_CMD_DESTROY_ID,
- RDMA_USER_CM_CMD_BIND_IP,
- RDMA_USER_CM_CMD_RESOLVE_IP,
- RDMA_USER_CM_CMD_RESOLVE_ROUTE,
- RDMA_USER_CM_CMD_QUERY_ROUTE,
- RDMA_USER_CM_CMD_CONNECT,
- RDMA_USER_CM_CMD_LISTEN,
- RDMA_USER_CM_CMD_ACCEPT,
- RDMA_USER_CM_CMD_REJECT,
- RDMA_USER_CM_CMD_DISCONNECT,
- RDMA_USER_CM_CMD_INIT_QP_ATTR,
- RDMA_USER_CM_CMD_GET_EVENT,
- RDMA_USER_CM_CMD_GET_OPTION,
- RDMA_USER_CM_CMD_SET_OPTION,
- RDMA_USER_CM_CMD_NOTIFY,
- RDMA_USER_CM_CMD_JOIN_IP_MCAST,
- RDMA_USER_CM_CMD_LEAVE_MCAST,
- RDMA_USER_CM_CMD_MIGRATE_ID,
- RDMA_USER_CM_CMD_QUERY,
- RDMA_USER_CM_CMD_BIND,
- RDMA_USER_CM_CMD_RESOLVE_ADDR,
- RDMA_USER_CM_CMD_JOIN_MCAST
-};
-
-/* See IBTA Annex A11, servies ID bytes 4 & 5 */
-enum rdma_ucm_port_space {
- RDMA_PS_IPOIB = 0x0002,
- RDMA_PS_IB = 0x013F,
- RDMA_PS_TCP = 0x0106,
- RDMA_PS_UDP = 0x0111,
-};
-
-/*
- * command ABI structures.
- */
-struct rdma_ucm_cmd_hdr {
- __u32 cmd;
- __u16 in;
- __u16 out;
-};
-
-struct rdma_ucm_create_id {
- __aligned_u64 uid;
- __aligned_u64 response;
- __u16 ps; /* use enum rdma_ucm_port_space */
- __u8 qp_type;
- __u8 reserved[5];
-};
-
-struct rdma_ucm_create_id_resp {
- __u32 id;
-};
-
-struct rdma_ucm_destroy_id {
- __aligned_u64 response;
- __u32 id;
- __u32 reserved;
-};
-
-struct rdma_ucm_destroy_id_resp {
- __u32 events_reported;
-};
-
-struct rdma_ucm_bind_ip {
- __aligned_u64 response;
- struct sockaddr_in6 addr;
- __u32 id;
-};
-
-struct rdma_ucm_bind {
- __u32 id;
- __u16 addr_size;
- __u16 reserved;
- struct __kernel_sockaddr_storage addr;
-};
-
-struct rdma_ucm_resolve_ip {
- struct sockaddr_in6 src_addr;
- struct sockaddr_in6 dst_addr;
- __u32 id;
- __u32 timeout_ms;
-};
-
-struct rdma_ucm_resolve_addr {
- __u32 id;
- __u32 timeout_ms;
- __u16 src_size;
- __u16 dst_size;
- __u32 reserved;
- struct __kernel_sockaddr_storage src_addr;
- struct __kernel_sockaddr_storage dst_addr;
-};
-
-struct rdma_ucm_resolve_route {
- __u32 id;
- __u32 timeout_ms;
-};
-
-enum {
- RDMA_USER_CM_QUERY_ADDR,
- RDMA_USER_CM_QUERY_PATH,
- RDMA_USER_CM_QUERY_GID
-};
-
-struct rdma_ucm_query {
- __aligned_u64 response;
- __u32 id;
- __u32 option;
-};
-
-struct rdma_ucm_query_route_resp {
- __aligned_u64 node_guid;
- struct ib_user_path_rec ib_route[2];
- struct sockaddr_in6 src_addr;
- struct sockaddr_in6 dst_addr;
- __u32 num_paths;
- __u8 port_num;
- __u8 reserved[3];
-};
-
-struct rdma_ucm_query_addr_resp {
- __aligned_u64 node_guid;
- __u8 port_num;
- __u8 reserved;
- __u16 pkey;
- __u16 src_size;
- __u16 dst_size;
- struct __kernel_sockaddr_storage src_addr;
- struct __kernel_sockaddr_storage dst_addr;
-};
-
-struct rdma_ucm_query_path_resp {
- __u32 num_paths;
- __u32 reserved;
- struct ib_path_rec_data path_data[0];
-};
-
-struct rdma_ucm_conn_param {
- __u32 qp_num;
- __u32 qkey;
- __u8 private_data[RDMA_MAX_PRIVATE_DATA];
- __u8 private_data_len;
- __u8 srq;
- __u8 responder_resources;
- __u8 initiator_depth;
- __u8 flow_control;
- __u8 retry_count;
- __u8 rnr_retry_count;
- __u8 valid;
-};
-
-struct rdma_ucm_ud_param {
- __u32 qp_num;
- __u32 qkey;
- struct ib_uverbs_ah_attr ah_attr;
- __u8 private_data[RDMA_MAX_PRIVATE_DATA];
- __u8 private_data_len;
- __u8 reserved[7];
-};
-
-struct rdma_ucm_connect {
- struct rdma_ucm_conn_param conn_param;
- __u32 id;
- __u32 reserved;
-};
-
-struct rdma_ucm_listen {
- __u32 id;
- __u32 backlog;
-};
-
-struct rdma_ucm_accept {
- __aligned_u64 uid;
- struct rdma_ucm_conn_param conn_param;
- __u32 id;
- __u32 reserved;
-};
-
-struct rdma_ucm_reject {
- __u32 id;
- __u8 private_data_len;
- __u8 reserved[3];
- __u8 private_data[RDMA_MAX_PRIVATE_DATA];
-};
-
-struct rdma_ucm_disconnect {
- __u32 id;
-};
-
-struct rdma_ucm_init_qp_attr {
- __aligned_u64 response;
- __u32 id;
- __u32 qp_state;
-};
-
-struct rdma_ucm_notify {
- __u32 id;
- __u32 event;
-};
-
-struct rdma_ucm_join_ip_mcast {
- __aligned_u64 response; /* rdma_ucm_create_id_resp */
- __aligned_u64 uid;
- struct sockaddr_in6 addr;
- __u32 id;
-};
-
-/* Multicast join flags */
-enum {
- RDMA_MC_JOIN_FLAG_FULLMEMBER,
- RDMA_MC_JOIN_FLAG_SENDONLY_FULLMEMBER,
- RDMA_MC_JOIN_FLAG_RESERVED,
-};
-
-struct rdma_ucm_join_mcast {
- __aligned_u64 response; /* rdma_ucma_create_id_resp */
- __aligned_u64 uid;
- __u32 id;
- __u16 addr_size;
- __u16 join_flags;
- struct __kernel_sockaddr_storage addr;
-};
-
-struct rdma_ucm_get_event {
- __aligned_u64 response;
-};
-
-struct rdma_ucm_event_resp {
- __aligned_u64 uid;
- __u32 id;
- __u32 event;
- __u32 status;
- /*
- * NOTE: This union is not aligned to 8 bytes so none of the union
- * members may contain a u64 or anything with higher alignment than 4.
- */
- union {
- struct rdma_ucm_conn_param conn;
- struct rdma_ucm_ud_param ud;
- } param;
- __u32 reserved;
-};
-
-/* Option levels */
-enum {
- RDMA_OPTION_ID = 0,
- RDMA_OPTION_IB = 1
-};
-
-/* Option details */
-enum {
- RDMA_OPTION_ID_TOS = 0,
- RDMA_OPTION_ID_REUSEADDR = 1,
- RDMA_OPTION_ID_AFONLY = 2,
- RDMA_OPTION_IB_PATH = 1
-};
-
-struct rdma_ucm_set_option {
- __aligned_u64 optval;
- __u32 id;
- __u32 level;
- __u32 optname;
- __u32 optlen;
-};
-
-struct rdma_ucm_migrate_id {
- __aligned_u64 response;
- __u32 id;
- __u32 fd;
-};
-
-struct rdma_ucm_migrate_resp {
- __u32 events_reported;
-};
-
-#endif /* RDMA_USER_CM_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/rdma_user_ioctl.h b/lib/libc/include/generic-musl/rdma/rdma_user_ioctl.h
deleted file mode 100644
index bba55acc1b40c2fafe61de9415897d27abec0790..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/rdma_user_ioctl.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/*
- * Copyright (c) 2016 Mellanox Technologies, LTD. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef RDMA_USER_IOCTL_H
-#define RDMA_USER_IOCTL_H
-
-#include
-#include
-#include
-
-/* Legacy name, for user space application which already use it */
-#define IB_IOCTL_MAGIC RDMA_IOCTL_MAGIC
-
-/*
- * General blocks assignments
- * It is closed on purpose do not expose it it user space
- * #define MAD_CMD_BASE 0x00
- * #define HFI1_CMD_BAS 0xE0
- */
-
-/* MAD specific section */
-#define IB_USER_MAD_REGISTER_AGENT _IOWR(RDMA_IOCTL_MAGIC, 0x01, struct ib_user_mad_reg_req)
-#define IB_USER_MAD_UNREGISTER_AGENT _IOW(RDMA_IOCTL_MAGIC, 0x02, __u32)
-#define IB_USER_MAD_ENABLE_PKEY _IO(RDMA_IOCTL_MAGIC, 0x03)
-#define IB_USER_MAD_REGISTER_AGENT2 _IOWR(RDMA_IOCTL_MAGIC, 0x04, struct ib_user_mad_reg_req2)
-
-/* HFI specific section */
-/* allocate HFI and context */
-#define HFI1_IOCTL_ASSIGN_CTXT _IOWR(RDMA_IOCTL_MAGIC, 0xE1, struct hfi1_user_info)
-/* find out what resources we got */
-#define HFI1_IOCTL_CTXT_INFO _IOW(RDMA_IOCTL_MAGIC, 0xE2, struct hfi1_ctxt_info)
-/* set up userspace */
-#define HFI1_IOCTL_USER_INFO _IOW(RDMA_IOCTL_MAGIC, 0xE3, struct hfi1_base_info)
-/* update expected TID entries */
-#define HFI1_IOCTL_TID_UPDATE _IOWR(RDMA_IOCTL_MAGIC, 0xE4, struct hfi1_tid_info)
-/* free expected TID entries */
-#define HFI1_IOCTL_TID_FREE _IOWR(RDMA_IOCTL_MAGIC, 0xE5, struct hfi1_tid_info)
-/* force an update of PIO credit */
-#define HFI1_IOCTL_CREDIT_UPD _IO(RDMA_IOCTL_MAGIC, 0xE6)
-/* control receipt of packets */
-#define HFI1_IOCTL_RECV_CTRL _IOW(RDMA_IOCTL_MAGIC, 0xE8, int)
-/* set the kind of polling we want */
-#define HFI1_IOCTL_POLL_TYPE _IOW(RDMA_IOCTL_MAGIC, 0xE9, int)
-/* ack & clear user status bits */
-#define HFI1_IOCTL_ACK_EVENT _IOW(RDMA_IOCTL_MAGIC, 0xEA, unsigned long)
-/* set context's pkey */
-#define HFI1_IOCTL_SET_PKEY _IOW(RDMA_IOCTL_MAGIC, 0xEB, __u16)
-/* reset context's HW send context */
-#define HFI1_IOCTL_CTXT_RESET _IO(RDMA_IOCTL_MAGIC, 0xEC)
-/* read TID cache invalidations */
-#define HFI1_IOCTL_TID_INVAL_READ _IOWR(RDMA_IOCTL_MAGIC, 0xED, struct hfi1_tid_info)
-/* get the version of the user cdev */
-#define HFI1_IOCTL_GET_VERS _IOR(RDMA_IOCTL_MAGIC, 0xEE, int)
-
-#endif /* RDMA_USER_IOCTL_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/rdma_user_ioctl_cmds.h b/lib/libc/include/generic-musl/rdma/rdma_user_ioctl_cmds.h
deleted file mode 100644
index b71128f170d3aa84a89ac0f6b1d06da395cdebd9..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/rdma_user_ioctl_cmds.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2018, Mellanox Technologies inc. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef RDMA_USER_IOCTL_CMDS_H
-#define RDMA_USER_IOCTL_CMDS_H
-
-#include
-#include
-
-/* Documentation/ioctl/ioctl-number.txt */
-#define RDMA_IOCTL_MAGIC 0x1b
-#define RDMA_VERBS_IOCTL \
- _IOWR(RDMA_IOCTL_MAGIC, 1, struct ib_uverbs_ioctl_hdr)
-
-enum {
- /* User input */
- UVERBS_ATTR_F_MANDATORY = 1U << 0,
- /*
- * Valid output bit should be ignored and considered set in
- * mandatory fields. This bit is kernel output.
- */
- UVERBS_ATTR_F_VALID_OUTPUT = 1U << 1,
-};
-
-struct ib_uverbs_attr {
- __u16 attr_id; /* command specific type attribute */
- __u16 len; /* only for pointers */
- __u16 flags; /* combination of UVERBS_ATTR_F_XXXX */
- union {
- struct {
- __u8 elem_id;
- __u8 reserved;
- } enum_data;
- __u16 reserved;
- } attr_data;
- union {
- /* Used by PTR_IN/OUT, ENUM_IN and IDR */
- __aligned_u64 data;
- /* Used by FD_IN and FD_OUT */
- __s64 data_s64;
- };
-};
-
-struct ib_uverbs_ioctl_hdr {
- __u16 length;
- __u16 object_id;
- __u16 method_id;
- __u16 num_attrs;
- __aligned_u64 reserved1;
- __u32 driver_id;
- __u32 reserved2;
- struct ib_uverbs_attr attrs[0];
-};
-
-enum rdma_driver_id {
- RDMA_DRIVER_UNKNOWN,
- RDMA_DRIVER_MLX5,
- RDMA_DRIVER_MLX4,
- RDMA_DRIVER_CXGB3,
- RDMA_DRIVER_CXGB4,
- RDMA_DRIVER_MTHCA,
- RDMA_DRIVER_BNXT_RE,
- RDMA_DRIVER_OCRDMA,
- RDMA_DRIVER_NES,
- RDMA_DRIVER_I40IW,
- RDMA_DRIVER_VMW_PVRDMA,
- RDMA_DRIVER_QEDR,
- RDMA_DRIVER_HNS,
- RDMA_DRIVER_USNIC,
- RDMA_DRIVER_RXE,
- RDMA_DRIVER_HFI1,
- RDMA_DRIVER_QIB,
-};
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/rdma_user_rxe.h b/lib/libc/include/generic-musl/rdma/rdma_user_rxe.h
deleted file mode 100644
index 3664e1a1b3543e353d0aab9a08b3291baafb4660..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/rdma_user_rxe.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
-/*
- * Copyright (c) 2016 Mellanox Technologies Ltd. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses. You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef RDMA_USER_RXE_H
-#define RDMA_USER_RXE_H
-
-#include
-#include
-#include
-#include
-
-union rxe_gid {
- __u8 raw[16];
- struct {
- __be64 subnet_prefix;
- __be64 interface_id;
- } global;
-};
-
-struct rxe_global_route {
- union rxe_gid dgid;
- __u32 flow_label;
- __u8 sgid_index;
- __u8 hop_limit;
- __u8 traffic_class;
-};
-
-struct rxe_av {
- __u8 port_num;
- __u8 network_type;
- __u16 reserved1;
- __u32 reserved2;
- struct rxe_global_route grh;
- union {
- struct sockaddr_in _sockaddr_in;
- struct sockaddr_in6 _sockaddr_in6;
- } sgid_addr, dgid_addr;
-};
-
-struct rxe_send_wr {
- __aligned_u64 wr_id;
- __u32 num_sge;
- __u32 opcode;
- __u32 send_flags;
- union {
- __be32 imm_data;
- __u32 invalidate_rkey;
- } ex;
- union {
- struct {
- __aligned_u64 remote_addr;
- __u32 rkey;
- __u32 reserved;
- } rdma;
- struct {
- __aligned_u64 remote_addr;
- __aligned_u64 compare_add;
- __aligned_u64 swap;
- __u32 rkey;
- __u32 reserved;
- } atomic;
- struct {
- __u32 remote_qpn;
- __u32 remote_qkey;
- __u16 pkey_index;
- } ud;
- /* reg is only used by the kernel and is not part of the uapi */
- struct {
- union {
- struct ib_mr *mr;
- __aligned_u64 reserved;
- };
- __u32 key;
- __u32 access;
- } reg;
- } wr;
-};
-
-struct rxe_sge {
- __aligned_u64 addr;
- __u32 length;
- __u32 lkey;
-};
-
-struct mminfo {
- __aligned_u64 offset;
- __u32 size;
- __u32 pad;
-};
-
-struct rxe_dma_info {
- __u32 length;
- __u32 resid;
- __u32 cur_sge;
- __u32 num_sge;
- __u32 sge_offset;
- __u32 reserved;
- union {
- __u8 inline_data[0];
- struct rxe_sge sge[0];
- };
-};
-
-struct rxe_send_wqe {
- struct rxe_send_wr wr;
- struct rxe_av av;
- __u32 status;
- __u32 state;
- __aligned_u64 iova;
- __u32 mask;
- __u32 first_psn;
- __u32 last_psn;
- __u32 ack_length;
- __u32 ssn;
- __u32 has_rd_atomic;
- struct rxe_dma_info dma;
-};
-
-struct rxe_recv_wqe {
- __aligned_u64 wr_id;
- __u32 num_sge;
- __u32 padding;
- struct rxe_dma_info dma;
-};
-
-struct rxe_create_cq_resp {
- struct mminfo mi;
-};
-
-struct rxe_resize_cq_resp {
- struct mminfo mi;
-};
-
-struct rxe_create_qp_resp {
- struct mminfo rq_mi;
- struct mminfo sq_mi;
-};
-
-struct rxe_create_srq_resp {
- struct mminfo mi;
- __u32 srq_num;
- __u32 reserved;
-};
-
-struct rxe_modify_srq_cmd {
- __aligned_u64 mmap_info_addr;
-};
-
-#endif /* RDMA_USER_RXE_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/rdma/vmw_pvrdma-abi.h b/lib/libc/include/generic-musl/rdma/vmw_pvrdma-abi.h
deleted file mode 100644
index a95c22595659387d36806e14ecc4207b8d7c5419..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/rdma/vmw_pvrdma-abi.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
-/*
- * Copyright (c) 2012-2016 VMware, Inc. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of EITHER the GNU General Public License
- * version 2 as published by the Free Software Foundation or the BSD
- * 2-Clause License. This program is distributed in the hope that it
- * will be useful, but WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License version 2 for more details at
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program available in the file COPYING in the main
- * directory of this source tree.
- *
- * The BSD 2-Clause License
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __VMW_PVRDMA_ABI_H__
-#define __VMW_PVRDMA_ABI_H__
-
-#include
-
-#define PVRDMA_UVERBS_ABI_VERSION 3 /* ABI Version. */
-#define PVRDMA_UAR_HANDLE_MASK 0x00FFFFFF /* Bottom 24 bits. */
-#define PVRDMA_UAR_QP_OFFSET 0 /* QP doorbell. */
-#define PVRDMA_UAR_QP_SEND (1 << 30) /* Send bit. */
-#define PVRDMA_UAR_QP_RECV (1 << 31) /* Recv bit. */
-#define PVRDMA_UAR_CQ_OFFSET 4 /* CQ doorbell. */
-#define PVRDMA_UAR_CQ_ARM_SOL (1 << 29) /* Arm solicited bit. */
-#define PVRDMA_UAR_CQ_ARM (1 << 30) /* Arm bit. */
-#define PVRDMA_UAR_CQ_POLL (1 << 31) /* Poll bit. */
-#define PVRDMA_UAR_SRQ_OFFSET 8 /* SRQ doorbell. */
-#define PVRDMA_UAR_SRQ_RECV (1 << 30) /* Recv bit. */
-
-enum pvrdma_wr_opcode {
- PVRDMA_WR_RDMA_WRITE,
- PVRDMA_WR_RDMA_WRITE_WITH_IMM,
- PVRDMA_WR_SEND,
- PVRDMA_WR_SEND_WITH_IMM,
- PVRDMA_WR_RDMA_READ,
- PVRDMA_WR_ATOMIC_CMP_AND_SWP,
- PVRDMA_WR_ATOMIC_FETCH_AND_ADD,
- PVRDMA_WR_LSO,
- PVRDMA_WR_SEND_WITH_INV,
- PVRDMA_WR_RDMA_READ_WITH_INV,
- PVRDMA_WR_LOCAL_INV,
- PVRDMA_WR_FAST_REG_MR,
- PVRDMA_WR_MASKED_ATOMIC_CMP_AND_SWP,
- PVRDMA_WR_MASKED_ATOMIC_FETCH_AND_ADD,
- PVRDMA_WR_BIND_MW,
- PVRDMA_WR_REG_SIG_MR,
- PVRDMA_WR_ERROR,
-};
-
-enum pvrdma_wc_status {
- PVRDMA_WC_SUCCESS,
- PVRDMA_WC_LOC_LEN_ERR,
- PVRDMA_WC_LOC_QP_OP_ERR,
- PVRDMA_WC_LOC_EEC_OP_ERR,
- PVRDMA_WC_LOC_PROT_ERR,
- PVRDMA_WC_WR_FLUSH_ERR,
- PVRDMA_WC_MW_BIND_ERR,
- PVRDMA_WC_BAD_RESP_ERR,
- PVRDMA_WC_LOC_ACCESS_ERR,
- PVRDMA_WC_REM_INV_REQ_ERR,
- PVRDMA_WC_REM_ACCESS_ERR,
- PVRDMA_WC_REM_OP_ERR,
- PVRDMA_WC_RETRY_EXC_ERR,
- PVRDMA_WC_RNR_RETRY_EXC_ERR,
- PVRDMA_WC_LOC_RDD_VIOL_ERR,
- PVRDMA_WC_REM_INV_RD_REQ_ERR,
- PVRDMA_WC_REM_ABORT_ERR,
- PVRDMA_WC_INV_EECN_ERR,
- PVRDMA_WC_INV_EEC_STATE_ERR,
- PVRDMA_WC_FATAL_ERR,
- PVRDMA_WC_RESP_TIMEOUT_ERR,
- PVRDMA_WC_GENERAL_ERR,
-};
-
-enum pvrdma_wc_opcode {
- PVRDMA_WC_SEND,
- PVRDMA_WC_RDMA_WRITE,
- PVRDMA_WC_RDMA_READ,
- PVRDMA_WC_COMP_SWAP,
- PVRDMA_WC_FETCH_ADD,
- PVRDMA_WC_BIND_MW,
- PVRDMA_WC_LSO,
- PVRDMA_WC_LOCAL_INV,
- PVRDMA_WC_FAST_REG_MR,
- PVRDMA_WC_MASKED_COMP_SWAP,
- PVRDMA_WC_MASKED_FETCH_ADD,
- PVRDMA_WC_RECV = 1 << 7,
- PVRDMA_WC_RECV_RDMA_WITH_IMM,
-};
-
-enum pvrdma_wc_flags {
- PVRDMA_WC_GRH = 1 << 0,
- PVRDMA_WC_WITH_IMM = 1 << 1,
- PVRDMA_WC_WITH_INVALIDATE = 1 << 2,
- PVRDMA_WC_IP_CSUM_OK = 1 << 3,
- PVRDMA_WC_WITH_SMAC = 1 << 4,
- PVRDMA_WC_WITH_VLAN = 1 << 5,
- PVRDMA_WC_WITH_NETWORK_HDR_TYPE = 1 << 6,
- PVRDMA_WC_FLAGS_MAX = PVRDMA_WC_WITH_NETWORK_HDR_TYPE,
-};
-
-struct pvrdma_alloc_ucontext_resp {
- __u32 qp_tab_size;
- __u32 reserved;
-};
-
-struct pvrdma_alloc_pd_resp {
- __u32 pdn;
- __u32 reserved;
-};
-
-struct pvrdma_create_cq {
- __aligned_u64 buf_addr;
- __u32 buf_size;
- __u32 reserved;
-};
-
-struct pvrdma_create_cq_resp {
- __u32 cqn;
- __u32 reserved;
-};
-
-struct pvrdma_resize_cq {
- __aligned_u64 buf_addr;
- __u32 buf_size;
- __u32 reserved;
-};
-
-struct pvrdma_create_srq {
- __aligned_u64 buf_addr;
- __u32 buf_size;
- __u32 reserved;
-};
-
-struct pvrdma_create_srq_resp {
- __u32 srqn;
- __u32 reserved;
-};
-
-struct pvrdma_create_qp {
- __aligned_u64 rbuf_addr;
- __aligned_u64 sbuf_addr;
- __u32 rbuf_size;
- __u32 sbuf_size;
- __aligned_u64 qp_addr;
-};
-
-/* PVRDMA masked atomic compare and swap */
-struct pvrdma_ex_cmp_swap {
- __aligned_u64 swap_val;
- __aligned_u64 compare_val;
- __aligned_u64 swap_mask;
- __aligned_u64 compare_mask;
-};
-
-/* PVRDMA masked atomic fetch and add */
-struct pvrdma_ex_fetch_add {
- __aligned_u64 add_val;
- __aligned_u64 field_boundary;
-};
-
-/* PVRDMA address vector. */
-struct pvrdma_av {
- __u32 port_pd;
- __u32 sl_tclass_flowlabel;
- __u8 dgid[16];
- __u8 src_path_bits;
- __u8 gid_index;
- __u8 stat_rate;
- __u8 hop_limit;
- __u8 dmac[6];
- __u8 reserved[6];
-};
-
-/* PVRDMA scatter/gather entry */
-struct pvrdma_sge {
- __aligned_u64 addr;
- __u32 length;
- __u32 lkey;
-};
-
-/* PVRDMA receive queue work request */
-struct pvrdma_rq_wqe_hdr {
- __aligned_u64 wr_id; /* wr id */
- __u32 num_sge; /* size of s/g array */
- __u32 total_len; /* reserved */
-};
-/* Use pvrdma_sge (ib_sge) for receive queue s/g array elements. */
-
-/* PVRDMA send queue work request */
-struct pvrdma_sq_wqe_hdr {
- __aligned_u64 wr_id; /* wr id */
- __u32 num_sge; /* size of s/g array */
- __u32 total_len; /* reserved */
- __u32 opcode; /* operation type */
- __u32 send_flags; /* wr flags */
- union {
- __be32 imm_data;
- __u32 invalidate_rkey;
- } ex;
- __u32 reserved;
- union {
- struct {
- __aligned_u64 remote_addr;
- __u32 rkey;
- __u8 reserved[4];
- } rdma;
- struct {
- __aligned_u64 remote_addr;
- __aligned_u64 compare_add;
- __aligned_u64 swap;
- __u32 rkey;
- __u32 reserved;
- } atomic;
- struct {
- __aligned_u64 remote_addr;
- __u32 log_arg_sz;
- __u32 rkey;
- union {
- struct pvrdma_ex_cmp_swap cmp_swap;
- struct pvrdma_ex_fetch_add fetch_add;
- } wr_data;
- } masked_atomics;
- struct {
- __aligned_u64 iova_start;
- __aligned_u64 pl_pdir_dma;
- __u32 page_shift;
- __u32 page_list_len;
- __u32 length;
- __u32 access_flags;
- __u32 rkey;
- __u32 reserved;
- } fast_reg;
- struct {
- __u32 remote_qpn;
- __u32 remote_qkey;
- struct pvrdma_av av;
- } ud;
- } wr;
-};
-/* Use pvrdma_sge (ib_sge) for send queue s/g array elements. */
-
-/* Completion queue element. */
-struct pvrdma_cqe {
- __aligned_u64 wr_id;
- __aligned_u64 qp;
- __u32 opcode;
- __u32 status;
- __u32 byte_len;
- __be32 imm_data;
- __u32 src_qp;
- __u32 wc_flags;
- __u32 vendor_err;
- __u16 pkey_index;
- __u16 slid;
- __u8 sl;
- __u8 dlid_path_bits;
- __u8 port_num;
- __u8 smac[6];
- __u8 network_hdr_type;
- __u8 reserved2[6]; /* Pad to next power of 2 (64). */
-};
-
-#endif /* __VMW_PVRDMA_ABI_H__ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/scsi/cxlflash_ioctl.h b/lib/libc/include/generic-musl/scsi/cxlflash_ioctl.h
deleted file mode 100644
index e3331cc76a9b70524c2a3391282ce18be036515d..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/scsi/cxlflash_ioctl.h
+++ /dev/null
@@ -1,276 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
-/*
- * CXL Flash Device Driver
- *
- * Written by: Manoj N. Kumar , IBM Corporation
- * Matthew R. Ochs , IBM Corporation
- *
- * Copyright (C) 2015 IBM Corporation
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#ifndef _CXLFLASH_IOCTL_H
-#define _CXLFLASH_IOCTL_H
-
-#include
-
-/*
- * Structure and definitions for all CXL Flash ioctls
- */
-#define CXLFLASH_WWID_LEN 16
-
-/*
- * Structure and flag definitions CXL Flash superpipe ioctls
- */
-
-#define DK_CXLFLASH_VERSION_0 0
-
-struct dk_cxlflash_hdr {
- __u16 version; /* Version data */
- __u16 rsvd[3]; /* Reserved for future use */
- __u64 flags; /* Input flags */
- __u64 return_flags; /* Returned flags */
-};
-
-/*
- * Return flag definitions available to all superpipe ioctls
- *
- * Similar to the input flags, these are grown from the bottom-up with the
- * intention that ioctl-specific return flag definitions would grow from the
- * top-down, allowing the two sets to co-exist. While not required/enforced
- * at this time, this provides future flexibility.
- */
-#define DK_CXLFLASH_ALL_PORTS_ACTIVE 0x0000000000000001ULL
-#define DK_CXLFLASH_APP_CLOSE_ADAP_FD 0x0000000000000002ULL
-#define DK_CXLFLASH_CONTEXT_SQ_CMD_MODE 0x0000000000000004ULL
-
-/*
- * General Notes:
- * -------------
- * The 'context_id' field of all ioctl structures contains the context
- * identifier for a context in the lower 32-bits (upper 32-bits are not
- * to be used when identifying a context to the AFU). That said, the value
- * in its entirety (all 64-bits) is to be treated as an opaque cookie and
- * should be presented as such when issuing ioctls.
- */
-
-/*
- * DK_CXLFLASH_ATTACH Notes:
- * ------------------------
- * Read/write access permissions are specified via the O_RDONLY, O_WRONLY,
- * and O_RDWR flags defined in the fcntl.h header file.
- *
- * A valid adapter file descriptor (fd >= 0) is only returned on the initial
- * attach (successful) of a context. When a context is shared(reused), the user
- * is expected to already 'know' the adapter file descriptor associated with the
- * context.
- */
-#define DK_CXLFLASH_ATTACH_REUSE_CONTEXT 0x8000000000000000ULL
-
-struct dk_cxlflash_attach {
- struct dk_cxlflash_hdr hdr; /* Common fields */
- __u64 num_interrupts; /* Requested number of interrupts */
- __u64 context_id; /* Returned context */
- __u64 mmio_size; /* Returned size of MMIO area */
- __u64 block_size; /* Returned block size, in bytes */
- __u64 adap_fd; /* Returned adapter file descriptor */
- __u64 last_lba; /* Returned last LBA on the device */
- __u64 max_xfer; /* Returned max transfer size, blocks */
- __u64 reserved[8]; /* Reserved for future use */
-};
-
-struct dk_cxlflash_detach {
- struct dk_cxlflash_hdr hdr; /* Common fields */
- __u64 context_id; /* Context to detach */
- __u64 reserved[8]; /* Reserved for future use */
-};
-
-struct dk_cxlflash_udirect {
- struct dk_cxlflash_hdr hdr; /* Common fields */
- __u64 context_id; /* Context to own physical resources */
- __u64 rsrc_handle; /* Returned resource handle */
- __u64 last_lba; /* Returned last LBA on the device */
- __u64 reserved[8]; /* Reserved for future use */
-};
-
-#define DK_CXLFLASH_UVIRTUAL_NEED_WRITE_SAME 0x8000000000000000ULL
-
-struct dk_cxlflash_uvirtual {
- struct dk_cxlflash_hdr hdr; /* Common fields */
- __u64 context_id; /* Context to own virtual resources */
- __u64 lun_size; /* Requested size, in 4K blocks */
- __u64 rsrc_handle; /* Returned resource handle */
- __u64 last_lba; /* Returned last LBA of LUN */
- __u64 reserved[8]; /* Reserved for future use */
-};
-
-struct dk_cxlflash_release {
- struct dk_cxlflash_hdr hdr; /* Common fields */
- __u64 context_id; /* Context owning resources */
- __u64 rsrc_handle; /* Resource handle to release */
- __u64 reserved[8]; /* Reserved for future use */
-};
-
-struct dk_cxlflash_resize {
- struct dk_cxlflash_hdr hdr; /* Common fields */
- __u64 context_id; /* Context owning resources */
- __u64 rsrc_handle; /* Resource handle of LUN to resize */
- __u64 req_size; /* New requested size, in 4K blocks */
- __u64 last_lba; /* Returned last LBA of LUN */
- __u64 reserved[8]; /* Reserved for future use */
-};
-
-struct dk_cxlflash_clone {
- struct dk_cxlflash_hdr hdr; /* Common fields */
- __u64 context_id_src; /* Context to clone from */
- __u64 context_id_dst; /* Context to clone to */
- __u64 adap_fd_src; /* Source context adapter fd */
- __u64 reserved[8]; /* Reserved for future use */
-};
-
-#define DK_CXLFLASH_VERIFY_SENSE_LEN 18
-#define DK_CXLFLASH_VERIFY_HINT_SENSE 0x8000000000000000ULL
-
-struct dk_cxlflash_verify {
- struct dk_cxlflash_hdr hdr; /* Common fields */
- __u64 context_id; /* Context owning resources to verify */
- __u64 rsrc_handle; /* Resource handle of LUN */
- __u64 hint; /* Reasons for verify */
- __u64 last_lba; /* Returned last LBA of device */
- __u8 sense_data[DK_CXLFLASH_VERIFY_SENSE_LEN]; /* SCSI sense data */
- __u8 pad[6]; /* Pad to next 8-byte boundary */
- __u64 reserved[8]; /* Reserved for future use */
-};
-
-#define DK_CXLFLASH_RECOVER_AFU_CONTEXT_RESET 0x8000000000000000ULL
-
-struct dk_cxlflash_recover_afu {
- struct dk_cxlflash_hdr hdr; /* Common fields */
- __u64 reason; /* Reason for recovery request */
- __u64 context_id; /* Context to recover / updated ID */
- __u64 mmio_size; /* Returned size of MMIO area */
- __u64 adap_fd; /* Returned adapter file descriptor */
- __u64 reserved[8]; /* Reserved for future use */
-};
-
-#define DK_CXLFLASH_MANAGE_LUN_WWID_LEN CXLFLASH_WWID_LEN
-#define DK_CXLFLASH_MANAGE_LUN_ENABLE_SUPERPIPE 0x8000000000000000ULL
-#define DK_CXLFLASH_MANAGE_LUN_DISABLE_SUPERPIPE 0x4000000000000000ULL
-#define DK_CXLFLASH_MANAGE_LUN_ALL_PORTS_ACCESSIBLE 0x2000000000000000ULL
-
-struct dk_cxlflash_manage_lun {
- struct dk_cxlflash_hdr hdr; /* Common fields */
- __u8 wwid[DK_CXLFLASH_MANAGE_LUN_WWID_LEN]; /* Page83 WWID, NAA-6 */
- __u64 reserved[8]; /* Rsvd, future use */
-};
-
-union cxlflash_ioctls {
- struct dk_cxlflash_attach attach;
- struct dk_cxlflash_detach detach;
- struct dk_cxlflash_udirect udirect;
- struct dk_cxlflash_uvirtual uvirtual;
- struct dk_cxlflash_release release;
- struct dk_cxlflash_resize resize;
- struct dk_cxlflash_clone clone;
- struct dk_cxlflash_verify verify;
- struct dk_cxlflash_recover_afu recover_afu;
- struct dk_cxlflash_manage_lun manage_lun;
-};
-
-#define MAX_CXLFLASH_IOCTL_SZ (sizeof(union cxlflash_ioctls))
-
-#define CXL_MAGIC 0xCA
-#define CXL_IOWR(_n, _s) _IOWR(CXL_MAGIC, _n, struct _s)
-
-/*
- * CXL Flash superpipe ioctls start at base of the reserved CXL_MAGIC
- * region (0x80) and grow upwards.
- */
-#define DK_CXLFLASH_ATTACH CXL_IOWR(0x80, dk_cxlflash_attach)
-#define DK_CXLFLASH_USER_DIRECT CXL_IOWR(0x81, dk_cxlflash_udirect)
-#define DK_CXLFLASH_RELEASE CXL_IOWR(0x82, dk_cxlflash_release)
-#define DK_CXLFLASH_DETACH CXL_IOWR(0x83, dk_cxlflash_detach)
-#define DK_CXLFLASH_VERIFY CXL_IOWR(0x84, dk_cxlflash_verify)
-#define DK_CXLFLASH_RECOVER_AFU CXL_IOWR(0x85, dk_cxlflash_recover_afu)
-#define DK_CXLFLASH_MANAGE_LUN CXL_IOWR(0x86, dk_cxlflash_manage_lun)
-#define DK_CXLFLASH_USER_VIRTUAL CXL_IOWR(0x87, dk_cxlflash_uvirtual)
-#define DK_CXLFLASH_VLUN_RESIZE CXL_IOWR(0x88, dk_cxlflash_resize)
-#define DK_CXLFLASH_VLUN_CLONE CXL_IOWR(0x89, dk_cxlflash_clone)
-
-/*
- * Structure and flag definitions CXL Flash host ioctls
- */
-
-#define HT_CXLFLASH_VERSION_0 0
-
-struct ht_cxlflash_hdr {
- __u16 version; /* Version data */
- __u16 subcmd; /* Sub-command */
- __u16 rsvd[2]; /* Reserved for future use */
- __u64 flags; /* Input flags */
- __u64 return_flags; /* Returned flags */
-};
-
-/*
- * Input flag definitions available to all host ioctls
- *
- * These are grown from the bottom-up with the intention that ioctl-specific
- * input flag definitions would grow from the top-down, allowing the two sets
- * to co-exist. While not required/enforced at this time, this provides future
- * flexibility.
- */
-#define HT_CXLFLASH_HOST_READ 0x0000000000000000ULL
-#define HT_CXLFLASH_HOST_WRITE 0x0000000000000001ULL
-
-#define HT_CXLFLASH_LUN_PROVISION_SUBCMD_CREATE_LUN 0x0001
-#define HT_CXLFLASH_LUN_PROVISION_SUBCMD_DELETE_LUN 0x0002
-#define HT_CXLFLASH_LUN_PROVISION_SUBCMD_QUERY_PORT 0x0003
-
-struct ht_cxlflash_lun_provision {
- struct ht_cxlflash_hdr hdr; /* Common fields */
- __u16 port; /* Target port for provision request */
- __u16 reserved16[3]; /* Reserved for future use */
- __u64 size; /* Size of LUN (4K blocks) */
- __u64 lun_id; /* SCSI LUN ID */
- __u8 wwid[CXLFLASH_WWID_LEN];/* Page83 WWID, NAA-6 */
- __u64 max_num_luns; /* Maximum number of LUNs provisioned */
- __u64 cur_num_luns; /* Current number of LUNs provisioned */
- __u64 max_cap_port; /* Total capacity for port (4K blocks) */
- __u64 cur_cap_port; /* Current capacity for port (4K blocks) */
- __u64 reserved[8]; /* Reserved for future use */
-};
-
-#define HT_CXLFLASH_AFU_DEBUG_MAX_DATA_LEN 262144 /* 256K */
-#define HT_CXLFLASH_AFU_DEBUG_SUBCMD_LEN 12
-struct ht_cxlflash_afu_debug {
- struct ht_cxlflash_hdr hdr; /* Common fields */
- __u8 reserved8[4]; /* Reserved for future use */
- __u8 afu_subcmd[HT_CXLFLASH_AFU_DEBUG_SUBCMD_LEN]; /* AFU subcommand,
- * (pass through)
- */
- __u64 data_ea; /* Data buffer effective address */
- __u32 data_len; /* Data buffer length */
- __u32 reserved32; /* Reserved for future use */
- __u64 reserved[8]; /* Reserved for future use */
-};
-
-union cxlflash_ht_ioctls {
- struct ht_cxlflash_lun_provision lun_provision;
- struct ht_cxlflash_afu_debug afu_debug;
-};
-
-#define MAX_HT_CXLFLASH_IOCTL_SZ (sizeof(union cxlflash_ht_ioctls))
-
-/*
- * CXL Flash host ioctls start at the top of the reserved CXL_MAGIC
- * region (0xBF) and grow downwards.
- */
-#define HT_CXLFLASH_LUN_PROVISION CXL_IOWR(0xBF, ht_cxlflash_lun_provision)
-#define HT_CXLFLASH_AFU_DEBUG CXL_IOWR(0xBE, ht_cxlflash_afu_debug)
-
-
-#endif /* ifndef _CXLFLASH_IOCTL_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/scsi/fc/fc_els.h b/lib/libc/include/generic-musl/scsi/fc/fc_els.h
deleted file mode 100644
index 166eeb9d81bdfaf7209e55e1dc2d7c393cf3b5ac..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/scsi/fc/fc_els.h
+++ /dev/null
@@ -1,832 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
- * Copyright(c) 2007 Intel Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Maintained at www.Open-FCoE.org
- */
-
-#ifndef _FC_ELS_H_
-#define _FC_ELS_H_
-
-#include
-
-/*
- * Fibre Channel Switch - Enhanced Link Services definitions.
- * From T11 FC-LS Rev 1.2 June 7, 2005.
- */
-
-/*
- * ELS Command codes - byte 0 of the frame payload
- */
-enum fc_els_cmd {
- ELS_LS_RJT = 0x01, /* ESL reject */
- ELS_LS_ACC = 0x02, /* ESL Accept */
- ELS_PLOGI = 0x03, /* N_Port login */
- ELS_FLOGI = 0x04, /* F_Port login */
- ELS_LOGO = 0x05, /* Logout */
- ELS_ABTX = 0x06, /* Abort exchange - obsolete */
- ELS_RCS = 0x07, /* read connection status */
- ELS_RES = 0x08, /* read exchange status block */
- ELS_RSS = 0x09, /* read sequence status block */
- ELS_RSI = 0x0a, /* read sequence initiative */
- ELS_ESTS = 0x0b, /* establish streaming */
- ELS_ESTC = 0x0c, /* estimate credit */
- ELS_ADVC = 0x0d, /* advise credit */
- ELS_RTV = 0x0e, /* read timeout value */
- ELS_RLS = 0x0f, /* read link error status block */
- ELS_ECHO = 0x10, /* echo */
- ELS_TEST = 0x11, /* test */
- ELS_RRQ = 0x12, /* reinstate recovery qualifier */
- ELS_REC = 0x13, /* read exchange concise */
- ELS_SRR = 0x14, /* sequence retransmission request */
- ELS_PRLI = 0x20, /* process login */
- ELS_PRLO = 0x21, /* process logout */
- ELS_SCN = 0x22, /* state change notification */
- ELS_TPLS = 0x23, /* test process login state */
- ELS_TPRLO = 0x24, /* third party process logout */
- ELS_LCLM = 0x25, /* login control list mgmt (obs) */
- ELS_GAID = 0x30, /* get alias_ID */
- ELS_FACT = 0x31, /* fabric activate alias_id */
- ELS_FDACDT = 0x32, /* fabric deactivate alias_id */
- ELS_NACT = 0x33, /* N-port activate alias_id */
- ELS_NDACT = 0x34, /* N-port deactivate alias_id */
- ELS_QOSR = 0x40, /* quality of service request */
- ELS_RVCS = 0x41, /* read virtual circuit status */
- ELS_PDISC = 0x50, /* discover N_port service params */
- ELS_FDISC = 0x51, /* discover F_port service params */
- ELS_ADISC = 0x52, /* discover address */
- ELS_RNC = 0x53, /* report node cap (obs) */
- ELS_FARP_REQ = 0x54, /* FC ARP request */
- ELS_FARP_REPL = 0x55, /* FC ARP reply */
- ELS_RPS = 0x56, /* read port status block */
- ELS_RPL = 0x57, /* read port list */
- ELS_RPBC = 0x58, /* read port buffer condition */
- ELS_FAN = 0x60, /* fabric address notification */
- ELS_RSCN = 0x61, /* registered state change notification */
- ELS_SCR = 0x62, /* state change registration */
- ELS_RNFT = 0x63, /* report node FC-4 types */
- ELS_CSR = 0x68, /* clock synch. request */
- ELS_CSU = 0x69, /* clock synch. update */
- ELS_LINIT = 0x70, /* loop initialize */
- ELS_LSTS = 0x72, /* loop status */
- ELS_RNID = 0x78, /* request node ID data */
- ELS_RLIR = 0x79, /* registered link incident report */
- ELS_LIRR = 0x7a, /* link incident record registration */
- ELS_SRL = 0x7b, /* scan remote loop */
- ELS_SBRP = 0x7c, /* set bit-error reporting params */
- ELS_RPSC = 0x7d, /* report speed capabilities */
- ELS_QSA = 0x7e, /* query security attributes */
- ELS_EVFP = 0x7f, /* exchange virt. fabrics params */
- ELS_LKA = 0x80, /* link keep-alive */
- ELS_AUTH_ELS = 0x90, /* authentication ELS */
-};
-
-/*
- * Initializer useful for decoding table.
- * Please keep this in sync with the above definitions.
- */
-#define FC_ELS_CMDS_INIT { \
- [ELS_LS_RJT] = "LS_RJT", \
- [ELS_LS_ACC] = "LS_ACC", \
- [ELS_PLOGI] = "PLOGI", \
- [ELS_FLOGI] = "FLOGI", \
- [ELS_LOGO] = "LOGO", \
- [ELS_ABTX] = "ABTX", \
- [ELS_RCS] = "RCS", \
- [ELS_RES] = "RES", \
- [ELS_RSS] = "RSS", \
- [ELS_RSI] = "RSI", \
- [ELS_ESTS] = "ESTS", \
- [ELS_ESTC] = "ESTC", \
- [ELS_ADVC] = "ADVC", \
- [ELS_RTV] = "RTV", \
- [ELS_RLS] = "RLS", \
- [ELS_ECHO] = "ECHO", \
- [ELS_TEST] = "TEST", \
- [ELS_RRQ] = "RRQ", \
- [ELS_REC] = "REC", \
- [ELS_SRR] = "SRR", \
- [ELS_PRLI] = "PRLI", \
- [ELS_PRLO] = "PRLO", \
- [ELS_SCN] = "SCN", \
- [ELS_TPLS] = "TPLS", \
- [ELS_TPRLO] = "TPRLO", \
- [ELS_LCLM] = "LCLM", \
- [ELS_GAID] = "GAID", \
- [ELS_FACT] = "FACT", \
- [ELS_FDACDT] = "FDACDT", \
- [ELS_NACT] = "NACT", \
- [ELS_NDACT] = "NDACT", \
- [ELS_QOSR] = "QOSR", \
- [ELS_RVCS] = "RVCS", \
- [ELS_PDISC] = "PDISC", \
- [ELS_FDISC] = "FDISC", \
- [ELS_ADISC] = "ADISC", \
- [ELS_RNC] = "RNC", \
- [ELS_FARP_REQ] = "FARP_REQ", \
- [ELS_FARP_REPL] = "FARP_REPL", \
- [ELS_RPS] = "RPS", \
- [ELS_RPL] = "RPL", \
- [ELS_RPBC] = "RPBC", \
- [ELS_FAN] = "FAN", \
- [ELS_RSCN] = "RSCN", \
- [ELS_SCR] = "SCR", \
- [ELS_RNFT] = "RNFT", \
- [ELS_CSR] = "CSR", \
- [ELS_CSU] = "CSU", \
- [ELS_LINIT] = "LINIT", \
- [ELS_LSTS] = "LSTS", \
- [ELS_RNID] = "RNID", \
- [ELS_RLIR] = "RLIR", \
- [ELS_LIRR] = "LIRR", \
- [ELS_SRL] = "SRL", \
- [ELS_SBRP] = "SBRP", \
- [ELS_RPSC] = "RPSC", \
- [ELS_QSA] = "QSA", \
- [ELS_EVFP] = "EVFP", \
- [ELS_LKA] = "LKA", \
- [ELS_AUTH_ELS] = "AUTH_ELS", \
-}
-
-/*
- * LS_ACC payload.
- */
-struct fc_els_ls_acc {
- __u8 la_cmd; /* command code ELS_LS_ACC */
- __u8 la_resv[3]; /* reserved */
-};
-
-/*
- * ELS reject payload.
- */
-struct fc_els_ls_rjt {
- __u8 er_cmd; /* command code ELS_LS_RJT */
- __u8 er_resv[4]; /* reserved must be zero */
- __u8 er_reason; /* reason (enum fc_els_rjt_reason below) */
- __u8 er_explan; /* explanation (enum fc_els_rjt_explan below) */
- __u8 er_vendor; /* vendor specific code */
-};
-
-/*
- * ELS reject reason codes (er_reason).
- */
-enum fc_els_rjt_reason {
- ELS_RJT_NONE = 0, /* no reject - not to be sent */
- ELS_RJT_INVAL = 0x01, /* invalid ELS command code */
- ELS_RJT_LOGIC = 0x03, /* logical error */
- ELS_RJT_BUSY = 0x05, /* logical busy */
- ELS_RJT_PROT = 0x07, /* protocol error */
- ELS_RJT_UNAB = 0x09, /* unable to perform command request */
- ELS_RJT_UNSUP = 0x0b, /* command not supported */
- ELS_RJT_INPROG = 0x0e, /* command already in progress */
- ELS_RJT_FIP = 0x20, /* FIP error */
- ELS_RJT_VENDOR = 0xff, /* vendor specific error */
-};
-
-
-/*
- * reason code explanation (er_explan).
- */
-enum fc_els_rjt_explan {
- ELS_EXPL_NONE = 0x00, /* No additional explanation */
- ELS_EXPL_SPP_OPT_ERR = 0x01, /* service parameter error - options */
- ELS_EXPL_SPP_ICTL_ERR = 0x03, /* service parm error - initiator ctl */
- ELS_EXPL_AH = 0x11, /* invalid association header */
- ELS_EXPL_AH_REQ = 0x13, /* association_header required */
- ELS_EXPL_SID = 0x15, /* invalid originator S_ID */
- ELS_EXPL_OXID_RXID = 0x17, /* invalid OX_ID-RX_ID combination */
- ELS_EXPL_INPROG = 0x19, /* Request already in progress */
- ELS_EXPL_PLOGI_REQD = 0x1e, /* N_Port login required */
- ELS_EXPL_INSUF_RES = 0x29, /* insufficient resources */
- ELS_EXPL_UNAB_DATA = 0x2a, /* unable to supply requested data */
- ELS_EXPL_UNSUPR = 0x2c, /* Request not supported */
- ELS_EXPL_INV_LEN = 0x2d, /* Invalid payload length */
- ELS_EXPL_NOT_NEIGHBOR = 0x62, /* VN2VN_Port not in neighbor set */
- /* TBD - above definitions incomplete */
-};
-
-/*
- * Common service parameters (N ports).
- */
-struct fc_els_csp {
- __u8 sp_hi_ver; /* highest version supported (obs.) */
- __u8 sp_lo_ver; /* highest version supported (obs.) */
- __be16 sp_bb_cred; /* buffer-to-buffer credits */
- __be16 sp_features; /* common feature flags */
- __be16 sp_bb_data; /* b-b state number and data field sz */
- union {
- struct {
- __be16 _sp_tot_seq; /* total concurrent sequences */
- __be16 _sp_rel_off; /* rel. offset by info cat */
- } sp_plogi;
- struct {
- __be32 _sp_r_a_tov; /* resource alloc. timeout msec */
- } sp_flogi_acc;
- } sp_u;
- __be32 sp_e_d_tov; /* error detect timeout value */
-};
-#define sp_tot_seq sp_u.sp_plogi._sp_tot_seq
-#define sp_rel_off sp_u.sp_plogi._sp_rel_off
-#define sp_r_a_tov sp_u.sp_flogi_acc._sp_r_a_tov
-
-#define FC_SP_BB_DATA_MASK 0xfff /* mask for data field size in sp_bb_data */
-
-/*
- * Minimum and maximum values for max data field size in service parameters.
- */
-#define FC_SP_MIN_MAX_PAYLOAD FC_MIN_MAX_PAYLOAD
-#define FC_SP_MAX_MAX_PAYLOAD FC_MAX_PAYLOAD
-
-/*
- * sp_features
- */
-#define FC_SP_FT_NPIV 0x8000 /* multiple N_Port_ID support (FLOGI) */
-#define FC_SP_FT_CIRO 0x8000 /* continuously increasing rel off (PLOGI) */
-#define FC_SP_FT_CLAD 0x8000 /* clean address (in FLOGI LS_ACC) */
-#define FC_SP_FT_RAND 0x4000 /* random relative offset */
-#define FC_SP_FT_VAL 0x2000 /* valid vendor version level */
-#define FC_SP_FT_NPIV_ACC 0x2000 /* NPIV assignment (FLOGI LS_ACC) */
-#define FC_SP_FT_FPORT 0x1000 /* F port (1) vs. N port (0) */
-#define FC_SP_FT_ABB 0x0800 /* alternate BB_credit management */
-#define FC_SP_FT_EDTR 0x0400 /* E_D_TOV Resolution is nanoseconds */
-#define FC_SP_FT_MCAST 0x0200 /* multicast */
-#define FC_SP_FT_BCAST 0x0100 /* broadcast */
-#define FC_SP_FT_HUNT 0x0080 /* hunt group */
-#define FC_SP_FT_SIMP 0x0040 /* dedicated simplex */
-#define FC_SP_FT_SEC 0x0020 /* reserved for security */
-#define FC_SP_FT_CSYN 0x0010 /* clock synch. supported */
-#define FC_SP_FT_RTTOV 0x0008 /* R_T_TOV value 100 uS, else 100 mS */
-#define FC_SP_FT_HALF 0x0004 /* dynamic half duplex */
-#define FC_SP_FT_SEQC 0x0002 /* SEQ_CNT */
-#define FC_SP_FT_PAYL 0x0001 /* FLOGI payload length 256, else 116 */
-
-/*
- * Class-specific service parameters.
- */
-struct fc_els_cssp {
- __be16 cp_class; /* class flags */
- __be16 cp_init; /* initiator flags */
- __be16 cp_recip; /* recipient flags */
- __be16 cp_rdfs; /* receive data field size */
- __be16 cp_con_seq; /* concurrent sequences */
- __be16 cp_ee_cred; /* N-port end-to-end credit */
- __u8 cp_resv1; /* reserved */
- __u8 cp_open_seq; /* open sequences per exchange */
- __u8 _cp_resv2[2]; /* reserved */
-};
-
-/*
- * cp_class flags.
- */
-#define FC_CPC_VALID 0x8000 /* class valid */
-#define FC_CPC_IMIX 0x4000 /* intermix mode */
-#define FC_CPC_SEQ 0x0800 /* sequential delivery */
-#define FC_CPC_CAMP 0x0200 /* camp-on */
-#define FC_CPC_PRI 0x0080 /* priority */
-
-/*
- * cp_init flags.
- * (TBD: not all flags defined here).
- */
-#define FC_CPI_CSYN 0x0010 /* clock synch. capable */
-
-/*
- * cp_recip flags.
- */
-#define FC_CPR_CSYN 0x0008 /* clock synch. capable */
-
-/*
- * NFC_ELS_FLOGI: Fabric login request.
- * NFC_ELS_PLOGI: Port login request (same format).
- */
-struct fc_els_flogi {
- __u8 fl_cmd; /* command */
- __u8 _fl_resvd[3]; /* must be zero */
- struct fc_els_csp fl_csp; /* common service parameters */
- __be64 fl_wwpn; /* port name */
- __be64 fl_wwnn; /* node name */
- struct fc_els_cssp fl_cssp[4]; /* class 1-4 service parameters */
- __u8 fl_vend[16]; /* vendor version level */
-} __attribute__((__packed__));
-
-/*
- * Process login service parameter page.
- */
-struct fc_els_spp {
- __u8 spp_type; /* type code or common service params */
- __u8 spp_type_ext; /* type code extension */
- __u8 spp_flags;
- __u8 _spp_resvd;
- __be32 spp_orig_pa; /* originator process associator */
- __be32 spp_resp_pa; /* responder process associator */
- __be32 spp_params; /* service parameters */
-};
-
-/*
- * spp_flags.
- */
-#define FC_SPP_OPA_VAL 0x80 /* originator proc. assoc. valid */
-#define FC_SPP_RPA_VAL 0x40 /* responder proc. assoc. valid */
-#define FC_SPP_EST_IMG_PAIR 0x20 /* establish image pair */
-#define FC_SPP_RESP_MASK 0x0f /* mask for response code (below) */
-
-/*
- * SPP response code in spp_flags - lower 4 bits.
- */
-enum fc_els_spp_resp {
- FC_SPP_RESP_ACK = 1, /* request executed */
- FC_SPP_RESP_RES = 2, /* unable due to lack of resources */
- FC_SPP_RESP_INIT = 3, /* initialization not complete */
- FC_SPP_RESP_NO_PA = 4, /* unknown process associator */
- FC_SPP_RESP_CONF = 5, /* configuration precludes image pair */
- FC_SPP_RESP_COND = 6, /* request completed conditionally */
- FC_SPP_RESP_MULT = 7, /* unable to handle multiple SPPs */
- FC_SPP_RESP_INVL = 8, /* SPP is invalid */
-};
-
-/*
- * ELS_RRQ - Reinstate Recovery Qualifier
- */
-struct fc_els_rrq {
- __u8 rrq_cmd; /* command (0x12) */
- __u8 rrq_zero[3]; /* specified as zero - part of cmd */
- __u8 rrq_resvd; /* reserved */
- __u8 rrq_s_id[3]; /* originator FID */
- __be16 rrq_ox_id; /* originator exchange ID */
- __be16 rrq_rx_id; /* responders exchange ID */
-};
-
-/*
- * ELS_REC - Read exchange concise.
- */
-struct fc_els_rec {
- __u8 rec_cmd; /* command (0x13) */
- __u8 rec_zero[3]; /* specified as zero - part of cmd */
- __u8 rec_resvd; /* reserved */
- __u8 rec_s_id[3]; /* originator FID */
- __be16 rec_ox_id; /* originator exchange ID */
- __be16 rec_rx_id; /* responders exchange ID */
-};
-
-/*
- * ELS_REC LS_ACC payload.
- */
-struct fc_els_rec_acc {
- __u8 reca_cmd; /* accept (0x02) */
- __u8 reca_zero[3]; /* specified as zero - part of cmd */
- __be16 reca_ox_id; /* originator exchange ID */
- __be16 reca_rx_id; /* responders exchange ID */
- __u8 reca_resvd1; /* reserved */
- __u8 reca_ofid[3]; /* originator FID */
- __u8 reca_resvd2; /* reserved */
- __u8 reca_rfid[3]; /* responder FID */
- __be32 reca_fc4value; /* FC4 value */
- __be32 reca_e_stat; /* ESB (exchange status block) status */
-};
-
-/*
- * ELS_PRLI - Process login request and response.
- */
-struct fc_els_prli {
- __u8 prli_cmd; /* command */
- __u8 prli_spp_len; /* length of each serv. parm. page */
- __be16 prli_len; /* length of entire payload */
- /* service parameter pages follow */
-};
-
-/*
- * ELS_PRLO - Process logout request and response.
- */
-struct fc_els_prlo {
- __u8 prlo_cmd; /* command */
- __u8 prlo_obs; /* obsolete, but shall be set to 10h */
- __be16 prlo_len; /* payload length */
-};
-
-/*
- * ELS_ADISC payload
- */
-struct fc_els_adisc {
- __u8 adisc_cmd;
- __u8 adisc_resv[3];
- __u8 adisc_resv1;
- __u8 adisc_hard_addr[3];
- __be64 adisc_wwpn;
- __be64 adisc_wwnn;
- __u8 adisc_resv2;
- __u8 adisc_port_id[3];
-} __attribute__((__packed__));
-
-/*
- * ELS_LOGO - process or fabric logout.
- */
-struct fc_els_logo {
- __u8 fl_cmd; /* command code */
- __u8 fl_zero[3]; /* specified as zero - part of cmd */
- __u8 fl_resvd; /* reserved */
- __u8 fl_n_port_id[3];/* N port ID */
- __be64 fl_n_port_wwn; /* port name */
-};
-
-/*
- * ELS_RTV - read timeout value.
- */
-struct fc_els_rtv {
- __u8 rtv_cmd; /* command code 0x0e */
- __u8 rtv_zero[3]; /* specified as zero - part of cmd */
-};
-
-/*
- * LS_ACC for ELS_RTV - read timeout value.
- */
-struct fc_els_rtv_acc {
- __u8 rtv_cmd; /* command code 0x02 */
- __u8 rtv_zero[3]; /* specified as zero - part of cmd */
- __be32 rtv_r_a_tov; /* resource allocation timeout value */
- __be32 rtv_e_d_tov; /* error detection timeout value */
- __be32 rtv_toq; /* timeout qualifier (see below) */
-};
-
-/*
- * rtv_toq bits.
- */
-#define FC_ELS_RTV_EDRES (1 << 26) /* E_D_TOV resolution is nS else mS */
-#define FC_ELS_RTV_RTTOV (1 << 19) /* R_T_TOV is 100 uS else 100 mS */
-
-/*
- * ELS_SCR - state change registration payload.
- */
-struct fc_els_scr {
- __u8 scr_cmd; /* command code */
- __u8 scr_resv[6]; /* reserved */
- __u8 scr_reg_func; /* registration function (see below) */
-};
-
-enum fc_els_scr_func {
- ELS_SCRF_FAB = 1, /* fabric-detected registration */
- ELS_SCRF_NPORT = 2, /* Nx_Port-detected registration */
- ELS_SCRF_FULL = 3, /* full registration */
- ELS_SCRF_CLEAR = 255, /* remove any current registrations */
-};
-
-/*
- * ELS_RSCN - registered state change notification payload.
- */
-struct fc_els_rscn {
- __u8 rscn_cmd; /* RSCN opcode (0x61) */
- __u8 rscn_page_len; /* page length (4) */
- __be16 rscn_plen; /* payload length including this word */
-
- /* followed by 4-byte generic affected Port_ID pages */
-};
-
-struct fc_els_rscn_page {
- __u8 rscn_page_flags; /* event and address format */
- __u8 rscn_fid[3]; /* fabric ID */
-};
-
-#define ELS_RSCN_EV_QUAL_BIT 2 /* shift count for event qualifier */
-#define ELS_RSCN_EV_QUAL_MASK 0xf /* mask for event qualifier */
-#define ELS_RSCN_ADDR_FMT_BIT 0 /* shift count for address format */
-#define ELS_RSCN_ADDR_FMT_MASK 0x3 /* mask for address format */
-
-enum fc_els_rscn_ev_qual {
- ELS_EV_QUAL_NONE = 0, /* unspecified */
- ELS_EV_QUAL_NS_OBJ = 1, /* changed name server object */
- ELS_EV_QUAL_PORT_ATTR = 2, /* changed port attribute */
- ELS_EV_QUAL_SERV_OBJ = 3, /* changed service object */
- ELS_EV_QUAL_SW_CONFIG = 4, /* changed switch configuration */
- ELS_EV_QUAL_REM_OBJ = 5, /* removed object */
-};
-
-enum fc_els_rscn_addr_fmt {
- ELS_ADDR_FMT_PORT = 0, /* rscn_fid is a port address */
- ELS_ADDR_FMT_AREA = 1, /* rscn_fid is a area address */
- ELS_ADDR_FMT_DOM = 2, /* rscn_fid is a domain address */
- ELS_ADDR_FMT_FAB = 3, /* anything on fabric may have changed */
-};
-
-/*
- * ELS_RNID - request Node ID.
- */
-struct fc_els_rnid {
- __u8 rnid_cmd; /* RNID opcode (0x78) */
- __u8 rnid_resv[3]; /* reserved */
- __u8 rnid_fmt; /* data format */
- __u8 rnid_resv2[3]; /* reserved */
-};
-
-/*
- * Node Identification Data formats (rnid_fmt)
- */
-enum fc_els_rnid_fmt {
- ELS_RNIDF_NONE = 0, /* no specific identification data */
- ELS_RNIDF_GEN = 0xdf, /* general topology discovery format */
-};
-
-/*
- * ELS_RNID response.
- */
-struct fc_els_rnid_resp {
- __u8 rnid_cmd; /* response code (LS_ACC) */
- __u8 rnid_resv[3]; /* reserved */
- __u8 rnid_fmt; /* data format */
- __u8 rnid_cid_len; /* common ID data length */
- __u8 rnid_resv2; /* reserved */
- __u8 rnid_sid_len; /* specific ID data length */
-};
-
-struct fc_els_rnid_cid {
- __be64 rnid_wwpn; /* N port name */
- __be64 rnid_wwnn; /* node name */
-};
-
-struct fc_els_rnid_gen {
- __u8 rnid_vend_id[16]; /* vendor-unique ID */
- __be32 rnid_atype; /* associated type (see below) */
- __be32 rnid_phys_port; /* physical port number */
- __be32 rnid_att_nodes; /* number of attached nodes */
- __u8 rnid_node_mgmt; /* node management (see below) */
- __u8 rnid_ip_ver; /* IP version (see below) */
- __be16 rnid_prot_port; /* UDP / TCP port number */
- __be32 rnid_ip_addr[4]; /* IP address */
- __u8 rnid_resvd[2]; /* reserved */
- __be16 rnid_vend_spec; /* vendor-specific field */
-};
-
-enum fc_els_rnid_atype {
- ELS_RNIDA_UNK = 0x01, /* unknown */
- ELS_RNIDA_OTHER = 0x02, /* none of the following */
- ELS_RNIDA_HUB = 0x03,
- ELS_RNIDA_SWITCH = 0x04,
- ELS_RNIDA_GATEWAY = 0x05,
- ELS_RNIDA_CONV = 0x06, /* Obsolete, do not use this value */
- ELS_RNIDA_HBA = 0x07, /* Obsolete, do not use this value */
- ELS_RNIDA_PROXY = 0x08, /* Obsolete, do not use this value */
- ELS_RNIDA_STORAGE = 0x09,
- ELS_RNIDA_HOST = 0x0a,
- ELS_RNIDA_SUBSYS = 0x0b, /* storage subsystem (e.g., RAID) */
- ELS_RNIDA_ACCESS = 0x0e, /* access device (e.g. media changer) */
- ELS_RNIDA_NAS = 0x11, /* NAS server */
- ELS_RNIDA_BRIDGE = 0x12, /* bridge */
- ELS_RNIDA_VIRT = 0x13, /* virtualization device */
- ELS_RNIDA_MF = 0xff, /* multifunction device (bits below) */
- ELS_RNIDA_MF_HUB = 1UL << 31, /* hub */
- ELS_RNIDA_MF_SW = 1UL << 30, /* switch */
- ELS_RNIDA_MF_GW = 1UL << 29, /* gateway */
- ELS_RNIDA_MF_ST = 1UL << 28, /* storage */
- ELS_RNIDA_MF_HOST = 1UL << 27, /* host */
- ELS_RNIDA_MF_SUB = 1UL << 26, /* storage subsystem */
- ELS_RNIDA_MF_ACC = 1UL << 25, /* storage access dev */
- ELS_RNIDA_MF_WDM = 1UL << 24, /* wavelength division mux */
- ELS_RNIDA_MF_NAS = 1UL << 23, /* NAS server */
- ELS_RNIDA_MF_BR = 1UL << 22, /* bridge */
- ELS_RNIDA_MF_VIRT = 1UL << 21, /* virtualization device */
-};
-
-enum fc_els_rnid_mgmt {
- ELS_RNIDM_SNMP = 0,
- ELS_RNIDM_TELNET = 1,
- ELS_RNIDM_HTTP = 2,
- ELS_RNIDM_HTTPS = 3,
- ELS_RNIDM_XML = 4, /* HTTP + XML */
-};
-
-enum fc_els_rnid_ipver {
- ELS_RNIDIP_NONE = 0, /* no IP support or node mgmt. */
- ELS_RNIDIP_V4 = 1, /* IPv4 */
- ELS_RNIDIP_V6 = 2, /* IPv6 */
-};
-
-/*
- * ELS RPL - Read Port List.
- */
-struct fc_els_rpl {
- __u8 rpl_cmd; /* command */
- __u8 rpl_resv[5]; /* reserved - must be zero */
- __be16 rpl_max_size; /* maximum response size or zero */
- __u8 rpl_resv1; /* reserved - must be zero */
- __u8 rpl_index[3]; /* starting index */
-};
-
-/*
- * Port number block in RPL response.
- */
-struct fc_els_pnb {
- __be32 pnb_phys_pn; /* physical port number */
- __u8 pnb_resv; /* reserved */
- __u8 pnb_port_id[3]; /* port ID */
- __be64 pnb_wwpn; /* port name */
-};
-
-/*
- * RPL LS_ACC response.
- */
-struct fc_els_rpl_resp {
- __u8 rpl_cmd; /* ELS_LS_ACC */
- __u8 rpl_resv1; /* reserved - must be zero */
- __be16 rpl_plen; /* payload length */
- __u8 rpl_resv2; /* reserved - must be zero */
- __u8 rpl_llen[3]; /* list length */
- __u8 rpl_resv3; /* reserved - must be zero */
- __u8 rpl_index[3]; /* starting index */
- struct fc_els_pnb rpl_pnb[1]; /* variable number of PNBs */
-};
-
-/*
- * Link Error Status Block.
- */
-struct fc_els_lesb {
- __be32 lesb_link_fail; /* link failure count */
- __be32 lesb_sync_loss; /* loss of synchronization count */
- __be32 lesb_sig_loss; /* loss of signal count */
- __be32 lesb_prim_err; /* primitive sequence error count */
- __be32 lesb_inv_word; /* invalid transmission word count */
- __be32 lesb_inv_crc; /* invalid CRC count */
-};
-
-/*
- * ELS RPS - Read Port Status Block request.
- */
-struct fc_els_rps {
- __u8 rps_cmd; /* command */
- __u8 rps_resv[2]; /* reserved - must be zero */
- __u8 rps_flag; /* flag - see below */
- __be64 rps_port_spec; /* port selection */
-};
-
-enum fc_els_rps_flag {
- FC_ELS_RPS_DID = 0x00, /* port identified by D_ID of req. */
- FC_ELS_RPS_PPN = 0x01, /* port_spec is physical port number */
- FC_ELS_RPS_WWPN = 0x02, /* port_spec is port WWN */
-};
-
-/*
- * ELS RPS LS_ACC response.
- */
-struct fc_els_rps_resp {
- __u8 rps_cmd; /* command - LS_ACC */
- __u8 rps_resv[2]; /* reserved - must be zero */
- __u8 rps_flag; /* flag - see below */
- __u8 rps_resv2[2]; /* reserved */
- __be16 rps_status; /* port status - see below */
- struct fc_els_lesb rps_lesb; /* link error status block */
-};
-
-enum fc_els_rps_resp_flag {
- FC_ELS_RPS_LPEV = 0x01, /* L_port extension valid */
-};
-
-enum fc_els_rps_resp_status {
- FC_ELS_RPS_PTP = 1 << 5, /* point-to-point connection */
- FC_ELS_RPS_LOOP = 1 << 4, /* loop mode */
- FC_ELS_RPS_FAB = 1 << 3, /* fabric present */
- FC_ELS_RPS_NO_SIG = 1 << 2, /* loss of signal */
- FC_ELS_RPS_NO_SYNC = 1 << 1, /* loss of synchronization */
- FC_ELS_RPS_RESET = 1 << 0, /* in link reset protocol */
-};
-
-/*
- * ELS LIRR - Link Incident Record Registration request.
- */
-struct fc_els_lirr {
- __u8 lirr_cmd; /* command */
- __u8 lirr_resv[3]; /* reserved - must be zero */
- __u8 lirr_func; /* registration function */
- __u8 lirr_fmt; /* FC-4 type of RLIR requested */
- __u8 lirr_resv2[2]; /* reserved - must be zero */
-};
-
-enum fc_els_lirr_func {
- ELS_LIRR_SET_COND = 0x01, /* set - conditionally receive */
- ELS_LIRR_SET_UNCOND = 0x02, /* set - unconditionally receive */
- ELS_LIRR_CLEAR = 0xff /* clear registration */
-};
-
-/*
- * ELS SRL - Scan Remote Loop request.
- */
-struct fc_els_srl {
- __u8 srl_cmd; /* command */
- __u8 srl_resv[3]; /* reserved - must be zero */
- __u8 srl_flag; /* flag - see below */
- __u8 srl_flag_param[3]; /* flag parameter */
-};
-
-enum fc_els_srl_flag {
- FC_ELS_SRL_ALL = 0x00, /* scan all FL ports */
- FC_ELS_SRL_ONE = 0x01, /* scan specified loop */
- FC_ELS_SRL_EN_PER = 0x02, /* enable periodic scanning (param) */
- FC_ELS_SRL_DIS_PER = 0x03, /* disable periodic scanning */
-};
-
-/*
- * ELS RLS - Read Link Error Status Block request.
- */
-struct fc_els_rls {
- __u8 rls_cmd; /* command */
- __u8 rls_resv[4]; /* reserved - must be zero */
- __u8 rls_port_id[3]; /* port ID */
-};
-
-/*
- * ELS RLS LS_ACC Response.
- */
-struct fc_els_rls_resp {
- __u8 rls_cmd; /* ELS_LS_ACC */
- __u8 rls_resv[3]; /* reserved - must be zero */
- struct fc_els_lesb rls_lesb; /* link error status block */
-};
-
-/*
- * ELS RLIR - Registered Link Incident Report.
- * This is followed by the CLIR and the CLID, described below.
- */
-struct fc_els_rlir {
- __u8 rlir_cmd; /* command */
- __u8 rlir_resv[3]; /* reserved - must be zero */
- __u8 rlir_fmt; /* format (FC4-type if type specific) */
- __u8 rlir_clr_len; /* common link incident record length */
- __u8 rlir_cld_len; /* common link incident desc. length */
- __u8 rlir_slr_len; /* spec. link incident record length */
-};
-
-/*
- * CLIR - Common Link Incident Record Data. - Sent via RLIR.
- */
-struct fc_els_clir {
- __be64 clir_wwpn; /* incident port name */
- __be64 clir_wwnn; /* incident port node name */
- __u8 clir_port_type; /* incident port type */
- __u8 clir_port_id[3]; /* incident port ID */
-
- __be64 clir_conn_wwpn; /* connected port name */
- __be64 clir_conn_wwnn; /* connected node name */
- __be64 clir_fab_name; /* fabric name */
- __be32 clir_phys_port; /* physical port number */
- __be32 clir_trans_id; /* transaction ID */
- __u8 clir_resv[3]; /* reserved */
- __u8 clir_ts_fmt; /* time stamp format */
- __be64 clir_timestamp; /* time stamp */
-};
-
-/*
- * CLIR clir_ts_fmt - time stamp format values.
- */
-enum fc_els_clir_ts_fmt {
- ELS_CLIR_TS_UNKNOWN = 0, /* time stamp field unknown */
- ELS_CLIR_TS_SEC_FRAC = 1, /* time in seconds and fractions */
- ELS_CLIR_TS_CSU = 2, /* time in clock synch update format */
-};
-
-/*
- * Common Link Incident Descriptor - sent via RLIR.
- */
-struct fc_els_clid {
- __u8 clid_iq; /* incident qualifier flags */
- __u8 clid_ic; /* incident code */
- __be16 clid_epai; /* domain/area of ISL */
-};
-
-/*
- * CLID incident qualifier flags.
- */
-enum fc_els_clid_iq {
- ELS_CLID_SWITCH = 0x20, /* incident port is a switch node */
- ELS_CLID_E_PORT = 0x10, /* incident is an ISL (E) port */
- ELS_CLID_SEV_MASK = 0x0c, /* severity 2-bit field mask */
- ELS_CLID_SEV_INFO = 0x00, /* report is informational */
- ELS_CLID_SEV_INOP = 0x08, /* link not operational */
- ELS_CLID_SEV_DEG = 0x04, /* link degraded but operational */
- ELS_CLID_LASER = 0x02, /* subassembly is a laser */
- ELS_CLID_FRU = 0x01, /* format can identify a FRU */
-};
-
-/*
- * CLID incident code.
- */
-enum fc_els_clid_ic {
- ELS_CLID_IC_IMPL = 1, /* implicit incident */
- ELS_CLID_IC_BER = 2, /* bit-error-rate threshold exceeded */
- ELS_CLID_IC_LOS = 3, /* loss of synch or signal */
- ELS_CLID_IC_NOS = 4, /* non-operational primitive sequence */
- ELS_CLID_IC_PST = 5, /* primitive sequence timeout */
- ELS_CLID_IC_INVAL = 6, /* invalid primitive sequence */
- ELS_CLID_IC_LOOP_TO = 7, /* loop initialization time out */
- ELS_CLID_IC_LIP = 8, /* receiving LIP */
-};
-
-#endif /* _FC_ELS_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/scsi/fc/fc_fs.h b/lib/libc/include/generic-musl/scsi/fc/fc_fs.h
deleted file mode 100644
index c526c2be2cf7c1d22c7354c269ba5f04235299ed..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/scsi/fc/fc_fs.h
+++ /dev/null
@@ -1,351 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
- * Copyright(c) 2007 Intel Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Maintained at www.Open-FCoE.org
- */
-
-#ifndef _FC_FS_H_
-#define _FC_FS_H_
-
-#include
-
-/*
- * Fibre Channel Framing and Signalling definitions.
- * From T11 FC-FS-2 Rev 0.90 - 9 August 2005.
- */
-
-/*
- * Frame header
- */
-struct fc_frame_header {
- __u8 fh_r_ctl; /* routing control */
- __u8 fh_d_id[3]; /* Destination ID */
-
- __u8 fh_cs_ctl; /* class of service control / pri */
- __u8 fh_s_id[3]; /* Source ID */
-
- __u8 fh_type; /* see enum fc_fh_type below */
- __u8 fh_f_ctl[3]; /* frame control */
-
- __u8 fh_seq_id; /* sequence ID */
- __u8 fh_df_ctl; /* data field control */
- __be16 fh_seq_cnt; /* sequence count */
-
- __be16 fh_ox_id; /* originator exchange ID */
- __be16 fh_rx_id; /* responder exchange ID */
- __be32 fh_parm_offset; /* parameter or relative offset */
-};
-
-#define FC_FRAME_HEADER_LEN 24 /* expected length of structure */
-
-#define FC_MAX_PAYLOAD 2112U /* max payload length in bytes */
-#define FC_MIN_MAX_PAYLOAD 256U /* lower limit on max payload */
-
-#define FC_MAX_FRAME (FC_MAX_PAYLOAD + FC_FRAME_HEADER_LEN)
-#define FC_MIN_MAX_FRAME (FC_MIN_MAX_PAYLOAD + FC_FRAME_HEADER_LEN)
-
-/*
- * fh_r_ctl - Routing control definitions.
- */
- /*
- * FC-4 device_data.
- */
-enum fc_rctl {
- FC_RCTL_DD_UNCAT = 0x00, /* uncategorized information */
- FC_RCTL_DD_SOL_DATA = 0x01, /* solicited data */
- FC_RCTL_DD_UNSOL_CTL = 0x02, /* unsolicited control */
- FC_RCTL_DD_SOL_CTL = 0x03, /* solicited control or reply */
- FC_RCTL_DD_UNSOL_DATA = 0x04, /* unsolicited data */
- FC_RCTL_DD_DATA_DESC = 0x05, /* data descriptor */
- FC_RCTL_DD_UNSOL_CMD = 0x06, /* unsolicited command */
- FC_RCTL_DD_CMD_STATUS = 0x07, /* command status */
-
-#define FC_RCTL_ILS_REQ FC_RCTL_DD_UNSOL_CTL /* ILS request */
-#define FC_RCTL_ILS_REP FC_RCTL_DD_SOL_CTL /* ILS reply */
-
- /*
- * Extended Link_Data
- */
- FC_RCTL_ELS_REQ = 0x22, /* extended link services request */
- FC_RCTL_ELS_REP = 0x23, /* extended link services reply */
- FC_RCTL_ELS4_REQ = 0x32, /* FC-4 ELS request */
- FC_RCTL_ELS4_REP = 0x33, /* FC-4 ELS reply */
- /*
- * Optional Extended Headers
- */
- FC_RCTL_VFTH = 0x50, /* virtual fabric tagging header */
- FC_RCTL_IFRH = 0x51, /* inter-fabric routing header */
- FC_RCTL_ENCH = 0x52, /* encapsulation header */
- /*
- * Basic Link Services fh_r_ctl values.
- */
- FC_RCTL_BA_NOP = 0x80, /* basic link service NOP */
- FC_RCTL_BA_ABTS = 0x81, /* basic link service abort */
- FC_RCTL_BA_RMC = 0x82, /* remove connection */
- FC_RCTL_BA_ACC = 0x84, /* basic accept */
- FC_RCTL_BA_RJT = 0x85, /* basic reject */
- FC_RCTL_BA_PRMT = 0x86, /* dedicated connection preempted */
- /*
- * Link Control Information.
- */
- FC_RCTL_ACK_1 = 0xc0, /* acknowledge_1 */
- FC_RCTL_ACK_0 = 0xc1, /* acknowledge_0 */
- FC_RCTL_P_RJT = 0xc2, /* port reject */
- FC_RCTL_F_RJT = 0xc3, /* fabric reject */
- FC_RCTL_P_BSY = 0xc4, /* port busy */
- FC_RCTL_F_BSY = 0xc5, /* fabric busy to data frame */
- FC_RCTL_F_BSYL = 0xc6, /* fabric busy to link control frame */
- FC_RCTL_LCR = 0xc7, /* link credit reset */
- FC_RCTL_END = 0xc9, /* end */
-};
- /* incomplete list of definitions */
-
-/*
- * R_CTL names initializer.
- * Please keep this matching the above definitions.
- */
-#define FC_RCTL_NAMES_INIT { \
- [FC_RCTL_DD_UNCAT] = "uncat", \
- [FC_RCTL_DD_SOL_DATA] = "sol data", \
- [FC_RCTL_DD_UNSOL_CTL] = "unsol ctl", \
- [FC_RCTL_DD_SOL_CTL] = "sol ctl/reply", \
- [FC_RCTL_DD_UNSOL_DATA] = "unsol data", \
- [FC_RCTL_DD_DATA_DESC] = "data desc", \
- [FC_RCTL_DD_UNSOL_CMD] = "unsol cmd", \
- [FC_RCTL_DD_CMD_STATUS] = "cmd status", \
- [FC_RCTL_ELS_REQ] = "ELS req", \
- [FC_RCTL_ELS_REP] = "ELS rep", \
- [FC_RCTL_ELS4_REQ] = "FC-4 ELS req", \
- [FC_RCTL_ELS4_REP] = "FC-4 ELS rep", \
- [FC_RCTL_BA_NOP] = "BLS NOP", \
- [FC_RCTL_BA_ABTS] = "BLS abort", \
- [FC_RCTL_BA_RMC] = "BLS remove connection", \
- [FC_RCTL_BA_ACC] = "BLS accept", \
- [FC_RCTL_BA_RJT] = "BLS reject", \
- [FC_RCTL_BA_PRMT] = "BLS dedicated connection preempted", \
- [FC_RCTL_ACK_1] = "LC ACK_1", \
- [FC_RCTL_ACK_0] = "LC ACK_0", \
- [FC_RCTL_P_RJT] = "LC port reject", \
- [FC_RCTL_F_RJT] = "LC fabric reject", \
- [FC_RCTL_P_BSY] = "LC port busy", \
- [FC_RCTL_F_BSY] = "LC fabric busy to data frame", \
- [FC_RCTL_F_BSYL] = "LC fabric busy to link control frame",\
- [FC_RCTL_LCR] = "LC link credit reset", \
- [FC_RCTL_END] = "LC end", \
-}
-
-/*
- * Well-known fabric addresses.
- */
-enum fc_well_known_fid {
- FC_FID_NONE = 0x000000, /* No destination */
- FC_FID_BCAST = 0xffffff, /* broadcast */
- FC_FID_FLOGI = 0xfffffe, /* fabric login */
- FC_FID_FCTRL = 0xfffffd, /* fabric controller */
- FC_FID_DIR_SERV = 0xfffffc, /* directory server */
- FC_FID_TIME_SERV = 0xfffffb, /* time server */
- FC_FID_MGMT_SERV = 0xfffffa, /* management server */
- FC_FID_QOS = 0xfffff9, /* QoS Facilitator */
- FC_FID_ALIASES = 0xfffff8, /* alias server (FC-PH2) */
- FC_FID_SEC_KEY = 0xfffff7, /* Security key dist. server */
- FC_FID_CLOCK = 0xfffff6, /* clock synch server */
- FC_FID_MCAST_SERV = 0xfffff5, /* multicast server */
-};
-
-#define FC_FID_WELL_KNOWN_MAX 0xffffff /* highest well-known fabric ID */
-#define FC_FID_WELL_KNOWN_BASE 0xfffff5 /* start of well-known fabric ID */
-
-/*
- * Other well-known addresses, outside the above contiguous range.
- */
-#define FC_FID_DOM_MGR 0xfffc00 /* domain manager base */
-
-/*
- * Fabric ID bytes.
- */
-#define FC_FID_DOMAIN 0
-#define FC_FID_PORT 1
-#define FC_FID_LINK 2
-
-/*
- * fh_type codes
- */
-enum fc_fh_type {
- FC_TYPE_BLS = 0x00, /* basic link service */
- FC_TYPE_ELS = 0x01, /* extended link service */
- FC_TYPE_IP = 0x05, /* IP over FC, RFC 4338 */
- FC_TYPE_FCP = 0x08, /* SCSI FCP */
- FC_TYPE_CT = 0x20, /* Fibre Channel Services (FC-CT) */
- FC_TYPE_ILS = 0x22, /* internal link service */
- FC_TYPE_NVME = 0x28, /* FC-NVME */
-};
-
-/*
- * FC_TYPE names initializer.
- * Please keep this matching the above definitions.
- */
-#define FC_TYPE_NAMES_INIT { \
- [FC_TYPE_BLS] = "BLS", \
- [FC_TYPE_ELS] = "ELS", \
- [FC_TYPE_IP] = "IP", \
- [FC_TYPE_FCP] = "FCP", \
- [FC_TYPE_CT] = "CT", \
- [FC_TYPE_ILS] = "ILS", \
- [FC_TYPE_NVME] = "NVME", \
-}
-
-/*
- * Exchange IDs.
- */
-#define FC_XID_UNKNOWN 0xffff /* unknown exchange ID */
-#define FC_XID_MIN 0x0 /* supported min exchange ID */
-#define FC_XID_MAX 0xfffe /* supported max exchange ID */
-
-/*
- * fh_f_ctl - Frame control flags.
- */
-#define FC_FC_EX_CTX (1 << 23) /* sent by responder to exchange */
-#define FC_FC_SEQ_CTX (1 << 22) /* sent by responder to sequence */
-#define FC_FC_FIRST_SEQ (1 << 21) /* first sequence of this exchange */
-#define FC_FC_LAST_SEQ (1 << 20) /* last sequence of this exchange */
-#define FC_FC_END_SEQ (1 << 19) /* last frame of sequence */
-#define FC_FC_END_CONN (1 << 18) /* end of class 1 connection pending */
-#define FC_FC_RES_B17 (1 << 17) /* reserved */
-#define FC_FC_SEQ_INIT (1 << 16) /* transfer of sequence initiative */
-#define FC_FC_X_ID_REASS (1 << 15) /* exchange ID has been changed */
-#define FC_FC_X_ID_INVAL (1 << 14) /* exchange ID invalidated */
-
-#define FC_FC_ACK_1 (1 << 12) /* 13:12 = 1: ACK_1 expected */
-#define FC_FC_ACK_N (2 << 12) /* 13:12 = 2: ACK_N expected */
-#define FC_FC_ACK_0 (3 << 12) /* 13:12 = 3: ACK_0 expected */
-
-#define FC_FC_RES_B11 (1 << 11) /* reserved */
-#define FC_FC_RES_B10 (1 << 10) /* reserved */
-#define FC_FC_RETX_SEQ (1 << 9) /* retransmitted sequence */
-#define FC_FC_UNI_TX (1 << 8) /* unidirectional transmit (class 1) */
-#define FC_FC_CONT_SEQ(i) ((i) << 6)
-#define FC_FC_ABT_SEQ(i) ((i) << 4)
-#define FC_FC_REL_OFF (1 << 3) /* parameter is relative offset */
-#define FC_FC_RES2 (1 << 2) /* reserved */
-#define FC_FC_FILL(i) ((i) & 3) /* 1:0: bytes of trailing fill */
-
-/*
- * BA_ACC payload.
- */
-struct fc_ba_acc {
- __u8 ba_seq_id_val; /* SEQ_ID validity */
-#define FC_BA_SEQ_ID_VAL 0x80
- __u8 ba_seq_id; /* SEQ_ID of seq last deliverable */
- __u8 ba_resvd[2]; /* reserved */
- __be16 ba_ox_id; /* OX_ID for aborted seq or exch */
- __be16 ba_rx_id; /* RX_ID for aborted seq or exch */
- __be16 ba_low_seq_cnt; /* low SEQ_CNT of aborted seq */
- __be16 ba_high_seq_cnt; /* high SEQ_CNT of aborted seq */
-};
-
-/*
- * BA_RJT: Basic Reject payload.
- */
-struct fc_ba_rjt {
- __u8 br_resvd; /* reserved */
- __u8 br_reason; /* reason code */
- __u8 br_explan; /* reason explanation */
- __u8 br_vendor; /* vendor unique code */
-};
-
-/*
- * BA_RJT reason codes.
- * From FS-2.
- */
-enum fc_ba_rjt_reason {
- FC_BA_RJT_NONE = 0, /* in software this means no reject */
- FC_BA_RJT_INVL_CMD = 0x01, /* invalid command code */
- FC_BA_RJT_LOG_ERR = 0x03, /* logical error */
- FC_BA_RJT_LOG_BUSY = 0x05, /* logical busy */
- FC_BA_RJT_PROTO_ERR = 0x07, /* protocol error */
- FC_BA_RJT_UNABLE = 0x09, /* unable to perform request */
- FC_BA_RJT_VENDOR = 0xff, /* vendor-specific (see br_vendor) */
-};
-
-/*
- * BA_RJT reason code explanations.
- */
-enum fc_ba_rjt_explan {
- FC_BA_RJT_EXP_NONE = 0x00, /* no additional expanation */
- FC_BA_RJT_INV_XID = 0x03, /* invalid OX_ID-RX_ID combination */
- FC_BA_RJT_ABT = 0x05, /* sequence aborted, no seq info */
-};
-
-/*
- * P_RJT or F_RJT: Port Reject or Fabric Reject parameter field.
- */
-struct fc_pf_rjt {
- __u8 rj_action; /* reserved */
- __u8 rj_reason; /* reason code */
- __u8 rj_resvd; /* reserved */
- __u8 rj_vendor; /* vendor unique code */
-};
-
-/*
- * P_RJT and F_RJT reject reason codes.
- */
-enum fc_pf_rjt_reason {
- FC_RJT_NONE = 0, /* non-reject (reserved by standard) */
- FC_RJT_INVL_DID = 0x01, /* invalid destination ID */
- FC_RJT_INVL_SID = 0x02, /* invalid source ID */
- FC_RJT_P_UNAV_T = 0x03, /* port unavailable, temporary */
- FC_RJT_P_UNAV = 0x04, /* port unavailable, permanent */
- FC_RJT_CLS_UNSUP = 0x05, /* class not supported */
- FC_RJT_DEL_USAGE = 0x06, /* delimiter usage error */
- FC_RJT_TYPE_UNSUP = 0x07, /* type not supported */
- FC_RJT_LINK_CTL = 0x08, /* invalid link control */
- FC_RJT_R_CTL = 0x09, /* invalid R_CTL field */
- FC_RJT_F_CTL = 0x0a, /* invalid F_CTL field */
- FC_RJT_OX_ID = 0x0b, /* invalid originator exchange ID */
- FC_RJT_RX_ID = 0x0c, /* invalid responder exchange ID */
- FC_RJT_SEQ_ID = 0x0d, /* invalid sequence ID */
- FC_RJT_DF_CTL = 0x0e, /* invalid DF_CTL field */
- FC_RJT_SEQ_CNT = 0x0f, /* invalid SEQ_CNT field */
- FC_RJT_PARAM = 0x10, /* invalid parameter field */
- FC_RJT_EXCH_ERR = 0x11, /* exchange error */
- FC_RJT_PROTO = 0x12, /* protocol error */
- FC_RJT_LEN = 0x13, /* incorrect length */
- FC_RJT_UNEXP_ACK = 0x14, /* unexpected ACK */
- FC_RJT_FAB_CLASS = 0x15, /* class unsupported by fabric entity */
- FC_RJT_LOGI_REQ = 0x16, /* login required */
- FC_RJT_SEQ_XS = 0x17, /* excessive sequences attempted */
- FC_RJT_EXCH_EST = 0x18, /* unable to establish exchange */
- FC_RJT_FAB_UNAV = 0x1a, /* fabric unavailable */
- FC_RJT_VC_ID = 0x1b, /* invalid VC_ID (class 4) */
- FC_RJT_CS_CTL = 0x1c, /* invalid CS_CTL field */
- FC_RJT_INSUF_RES = 0x1d, /* insuff. resources for VC (Class 4) */
- FC_RJT_INVL_CLS = 0x1f, /* invalid class of service */
- FC_RJT_PREEMT_RJT = 0x20, /* preemption request rejected */
- FC_RJT_PREEMT_DIS = 0x21, /* preemption not enabled */
- FC_RJT_MCAST_ERR = 0x22, /* multicast error */
- FC_RJT_MCAST_ET = 0x23, /* multicast error terminate */
- FC_RJT_PRLI_REQ = 0x24, /* process login required */
- FC_RJT_INVL_ATT = 0x25, /* invalid attachment */
- FC_RJT_VENDOR = 0xff, /* vendor specific reject */
-};
-
-/* default timeout values */
-
-#define FC_DEF_E_D_TOV 2000UL
-#define FC_DEF_R_A_TOV 10000UL
-
-#endif /* _FC_FS_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/scsi/fc/fc_gs.h b/lib/libc/include/generic-musl/scsi/fc/fc_gs.h
deleted file mode 100644
index e940586b4c8073eaadd978563bc438a90dc82ff3..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/scsi/fc/fc_gs.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
- * Copyright(c) 2007 Intel Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Maintained at www.Open-FCoE.org
- */
-
-#ifndef _FC_GS_H_
-#define _FC_GS_H_
-
-#include
-
-/*
- * Fibre Channel Services - Common Transport.
- * From T11.org FC-GS-2 Rev 5.3 November 1998.
- */
-
-struct fc_ct_hdr {
- __u8 ct_rev; /* revision */
- __u8 ct_in_id[3]; /* N_Port ID of original requestor */
- __u8 ct_fs_type; /* type of fibre channel service */
- __u8 ct_fs_subtype; /* subtype */
- __u8 ct_options;
- __u8 _ct_resvd1;
- __be16 ct_cmd; /* command / response code */
- __be16 ct_mr_size; /* maximum / residual size */
- __u8 _ct_resvd2;
- __u8 ct_reason; /* reject reason */
- __u8 ct_explan; /* reason code explanation */
- __u8 ct_vendor; /* vendor unique data */
-};
-
-#define FC_CT_HDR_LEN 16 /* expected sizeof (struct fc_ct_hdr) */
-
-enum fc_ct_rev {
- FC_CT_REV = 1 /* common transport revision */
-};
-
-/*
- * ct_fs_type values.
- */
-enum fc_ct_fs_type {
- FC_FST_ALIAS = 0xf8, /* alias service */
- FC_FST_MGMT = 0xfa, /* management service */
- FC_FST_TIME = 0xfb, /* time service */
- FC_FST_DIR = 0xfc, /* directory service */
-};
-
-/*
- * ct_cmd: Command / response codes
- */
-enum fc_ct_cmd {
- FC_FS_RJT = 0x8001, /* reject */
- FC_FS_ACC = 0x8002, /* accept */
-};
-
-/*
- * FS_RJT reason codes.
- */
-enum fc_ct_reason {
- FC_FS_RJT_CMD = 0x01, /* invalid command code */
- FC_FS_RJT_VER = 0x02, /* invalid version level */
- FC_FS_RJT_LOG = 0x03, /* logical error */
- FC_FS_RJT_IUSIZ = 0x04, /* invalid IU size */
- FC_FS_RJT_BSY = 0x05, /* logical busy */
- FC_FS_RJT_PROTO = 0x07, /* protocol error */
- FC_FS_RJT_UNABL = 0x09, /* unable to perform command request */
- FC_FS_RJT_UNSUP = 0x0b, /* command not supported */
-};
-
-/*
- * FS_RJT reason code explanations.
- */
-enum fc_ct_explan {
- FC_FS_EXP_NONE = 0x00, /* no additional explanation */
- FC_FS_EXP_PID = 0x01, /* port ID not registered */
- FC_FS_EXP_PNAM = 0x02, /* port name not registered */
- FC_FS_EXP_NNAM = 0x03, /* node name not registered */
- FC_FS_EXP_COS = 0x04, /* class of service not registered */
- FC_FS_EXP_FTNR = 0x07, /* FC-4 types not registered */
- /* definitions not complete */
-};
-
-#endif /* _FC_GS_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/scsi/fc/fc_ns.h b/lib/libc/include/generic-musl/scsi/fc/fc_ns.h
deleted file mode 100644
index fa1e3fa06ef92cb569458ab5ac86561d764b438e..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/scsi/fc/fc_ns.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
- * Copyright(c) 2007 Intel Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Maintained at www.Open-FCoE.org
- */
-
-#ifndef _FC_NS_H_
-#define _FC_NS_H_
-
-#include
-
-/*
- * Fibre Channel Services - Name Service (dNS)
- * From T11.org FC-GS-2 Rev 5.3 November 1998.
- */
-
-/*
- * Common-transport sub-type for Name Server.
- */
-#define FC_NS_SUBTYPE 2 /* fs_ct_hdr.ct_fs_subtype */
-
-/*
- * Name server Requests.
- * Note: this is an incomplete list, some unused requests are omitted.
- */
-enum fc_ns_req {
- FC_NS_GA_NXT = 0x0100, /* get all next */
- FC_NS_GI_A = 0x0101, /* get identifiers - scope */
- FC_NS_GPN_ID = 0x0112, /* get port name by ID */
- FC_NS_GNN_ID = 0x0113, /* get node name by ID */
- FC_NS_GSPN_ID = 0x0118, /* get symbolic port name */
- FC_NS_GID_PN = 0x0121, /* get ID for port name */
- FC_NS_GID_NN = 0x0131, /* get IDs for node name */
- FC_NS_GID_FT = 0x0171, /* get IDs by FC4 type */
- FC_NS_GPN_FT = 0x0172, /* get port names by FC4 type */
- FC_NS_GID_PT = 0x01a1, /* get IDs by port type */
- FC_NS_RPN_ID = 0x0212, /* reg port name for ID */
- FC_NS_RNN_ID = 0x0213, /* reg node name for ID */
- FC_NS_RFT_ID = 0x0217, /* reg FC4 type for ID */
- FC_NS_RSPN_ID = 0x0218, /* reg symbolic port name */
- FC_NS_RFF_ID = 0x021f, /* reg FC4 Features for ID */
- FC_NS_RSNN_NN = 0x0239, /* reg symbolic node name */
-};
-
-/*
- * Port type values.
- */
-enum fc_ns_pt {
- FC_NS_UNID_PORT = 0x00, /* unidentified */
- FC_NS_N_PORT = 0x01, /* N port */
- FC_NS_NL_PORT = 0x02, /* NL port */
- FC_NS_FNL_PORT = 0x03, /* F/NL port */
- FC_NS_NX_PORT = 0x7f, /* Nx port */
- FC_NS_F_PORT = 0x81, /* F port */
- FC_NS_FL_PORT = 0x82, /* FL port */
- FC_NS_E_PORT = 0x84, /* E port */
- FC_NS_B_PORT = 0x85, /* B port */
-};
-
-/*
- * Port type object.
- */
-struct fc_ns_pt_obj {
- __u8 pt_type;
-};
-
-/*
- * Port ID object
- */
-struct fc_ns_fid {
- __u8 fp_flags; /* flags for responses only */
- __u8 fp_fid[3];
-};
-
-/*
- * fp_flags in port ID object, for responses only.
- */
-#define FC_NS_FID_LAST 0x80 /* last object */
-
-/*
- * FC4-types object.
- */
-#define FC_NS_TYPES 256 /* number of possible FC-4 types */
-#define FC_NS_BPW 32 /* bits per word in bitmap */
-
-struct fc_ns_fts {
- __be32 ff_type_map[FC_NS_TYPES / FC_NS_BPW]; /* bitmap of FC-4 types */
-};
-
-/*
- * FC4-features object.
- */
-struct fc_ns_ff {
- __be32 fd_feat[FC_NS_TYPES * 4 / FC_NS_BPW]; /* 4-bits per FC-type */
-};
-
-/*
- * GID_PT request.
- */
-struct fc_ns_gid_pt {
- __u8 fn_pt_type;
- __u8 fn_domain_id_scope;
- __u8 fn_area_id_scope;
- __u8 fn_resvd;
-};
-
-/*
- * GID_FT or GPN_FT request.
- */
-struct fc_ns_gid_ft {
- __u8 fn_resvd;
- __u8 fn_domain_id_scope;
- __u8 fn_area_id_scope;
- __u8 fn_fc4_type;
-};
-
-/*
- * GPN_FT response.
- */
-struct fc_gpn_ft_resp {
- __u8 fp_flags; /* see fp_flags definitions above */
- __u8 fp_fid[3]; /* port ID */
- __be32 fp_resvd;
- __be64 fp_wwpn; /* port name */
-};
-
-/*
- * GID_PN request
- */
-struct fc_ns_gid_pn {
- __be64 fn_wwpn; /* port name */
-};
-
-/*
- * GID_PN response or GSPN_ID request
- */
-struct fc_gid_pn_resp {
- __u8 fp_resvd;
- __u8 fp_fid[3]; /* port ID */
-};
-
-/*
- * GSPN_ID response
- */
-struct fc_gspn_resp {
- __u8 fp_name_len;
- char fp_name[];
-};
-
-/*
- * RFT_ID request - register FC-4 types for ID.
- */
-struct fc_ns_rft_id {
- struct fc_ns_fid fr_fid; /* port ID object */
- struct fc_ns_fts fr_fts; /* FC-4 types object */
-};
-
-/*
- * RPN_ID request - register port name for ID.
- * RNN_ID request - register node name for ID.
- */
-struct fc_ns_rn_id {
- struct fc_ns_fid fr_fid; /* port ID object */
- __be64 fr_wwn; /* node name or port name */
-} __attribute__((__packed__));
-
-/*
- * RSNN_NN request - register symbolic node name
- */
-struct fc_ns_rsnn {
- __be64 fr_wwn; /* node name */
- __u8 fr_name_len;
- char fr_name[];
-} __attribute__((__packed__));
-
-/*
- * RSPN_ID request - register symbolic port name
- */
-struct fc_ns_rspn {
- struct fc_ns_fid fr_fid; /* port ID object */
- __u8 fr_name_len;
- char fr_name[];
-} __attribute__((__packed__));
-
-/*
- * RFF_ID request - register FC-4 Features for ID.
- */
-struct fc_ns_rff_id {
- struct fc_ns_fid fr_fid; /* port ID object */
- __u8 fr_resvd[2];
- __u8 fr_feat; /* FC-4 Feature bits */
- __u8 fr_type; /* FC-4 type */
-} __attribute__((__packed__));
-
-#endif /* _FC_NS_H_ */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/scsi/scsi_bsg_fc.h b/lib/libc/include/generic-musl/scsi/scsi_bsg_fc.h
deleted file mode 100644
index a426c7ad297686949d45cbaff6a0a5719a887624..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/scsi/scsi_bsg_fc.h
+++ /dev/null
@@ -1,320 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
-/*
- * FC Transport BSG Interface
- *
- * Copyright (C) 2008 James Smart, Emulex Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-#ifndef SCSI_BSG_FC_H
-#define SCSI_BSG_FC_H
-
-/*
- * This file intended to be included by both kernel and user space
- */
-
-/*
- * FC Transport SGIO v4 BSG Message Support
- */
-
-/* Default BSG request timeout (in seconds) */
-#define FC_DEFAULT_BSG_TIMEOUT (10 * HZ)
-
-
-/*
- * Request Message Codes supported by the FC Transport
- */
-
-/* define the class masks for the message codes */
-#define FC_BSG_CLS_MASK 0xF0000000 /* find object class */
-#define FC_BSG_HST_MASK 0x80000000 /* fc host class */
-#define FC_BSG_RPT_MASK 0x40000000 /* fc rport class */
-
- /* fc_host Message Codes */
-#define FC_BSG_HST_ADD_RPORT (FC_BSG_HST_MASK | 0x00000001)
-#define FC_BSG_HST_DEL_RPORT (FC_BSG_HST_MASK | 0x00000002)
-#define FC_BSG_HST_ELS_NOLOGIN (FC_BSG_HST_MASK | 0x00000003)
-#define FC_BSG_HST_CT (FC_BSG_HST_MASK | 0x00000004)
-#define FC_BSG_HST_VENDOR (FC_BSG_HST_MASK | 0x000000FF)
-
- /* fc_rport Message Codes */
-#define FC_BSG_RPT_ELS (FC_BSG_RPT_MASK | 0x00000001)
-#define FC_BSG_RPT_CT (FC_BSG_RPT_MASK | 0x00000002)
-
-
-
-/*
- * FC Address Identifiers in Message Structures :
- *
- * Whenever a command payload contains a FC Address Identifier
- * (aka port_id), the value is effectively in big-endian
- * order, thus the array elements are decoded as follows:
- * element [0] is bits 23:16 of the FC Address Identifier
- * element [1] is bits 15:8 of the FC Address Identifier
- * element [2] is bits 7:0 of the FC Address Identifier
- */
-
-
-/*
- * FC Host Messages
- */
-
-/* FC_BSG_HST_ADDR_PORT : */
-
-/* Request:
- * This message requests the FC host to login to the remote port
- * at the specified N_Port_Id. The remote port is to be enumerated
- * with the transport upon completion of the login.
- */
-struct fc_bsg_host_add_rport {
- uint8_t reserved;
-
- /* FC Address Identier of the remote port to login to */
- uint8_t port_id[3];
-};
-
-/* Response:
- * There is no additional response data - fc_bsg_reply->result is sufficient
- */
-
-
-/* FC_BSG_HST_DEL_RPORT : */
-
-/* Request:
- * This message requests the FC host to remove an enumerated
- * remote port and to terminate the login to it.
- *
- * Note: The driver is free to reject this request if it desires to
- * remain logged in with the remote port.
- */
-struct fc_bsg_host_del_rport {
- uint8_t reserved;
-
- /* FC Address Identier of the remote port to logout of */
- uint8_t port_id[3];
-};
-
-/* Response:
- * There is no additional response data - fc_bsg_reply->result is sufficient
- */
-
-
-/* FC_BSG_HST_ELS_NOLOGIN : */
-
-/* Request:
- * This message requests the FC_Host to send an ELS to a specific
- * N_Port_ID. The host does not need to log into the remote port,
- * nor does it need to enumerate the rport for further traffic
- * (although, the FC host is free to do so if it desires).
- */
-struct fc_bsg_host_els {
- /*
- * ELS Command Code being sent (must be the same as byte 0
- * of the payload)
- */
- uint8_t command_code;
-
- /* FC Address Identier of the remote port to send the ELS to */
- uint8_t port_id[3];
-};
-
-/* Response:
- */
-/* fc_bsg_ctels_reply->status values */
-#define FC_CTELS_STATUS_OK 0x00000000
-#define FC_CTELS_STATUS_REJECT 0x00000001
-#define FC_CTELS_STATUS_P_RJT 0x00000002
-#define FC_CTELS_STATUS_F_RJT 0x00000003
-#define FC_CTELS_STATUS_P_BSY 0x00000004
-#define FC_CTELS_STATUS_F_BSY 0x00000006
-struct fc_bsg_ctels_reply {
- /*
- * Note: An ELS LS_RJT may be reported in 2 ways:
- * a) A status of FC_CTELS_STATUS_OK is returned. The caller
- * is to look into the ELS receive payload to determine
- * LS_ACC or LS_RJT (by contents of word 0). The reject
- * data will be in word 1.
- * b) A status of FC_CTELS_STATUS_REJECT is returned, The
- * rjt_data field will contain valid data.
- *
- * Note: ELS LS_ACC is determined by an FC_CTELS_STATUS_OK, and
- * the receive payload word 0 indicates LS_ACC
- * (e.g. value is 0x02xxxxxx).
- *
- * Note: Similarly, a CT Reject may be reported in 2 ways:
- * a) A status of FC_CTELS_STATUS_OK is returned. The caller
- * is to look into the CT receive payload to determine
- * Accept or Reject (by contents of word 2). The reject
- * data will be in word 3.
- * b) A status of FC_CTELS_STATUS_REJECT is returned, The
- * rjt_data field will contain valid data.
- *
- * Note: x_RJT/BSY status will indicae that the rjt_data field
- * is valid and contains the reason/explanation values.
- */
- uint32_t status; /* See FC_CTELS_STATUS_xxx */
-
- /* valid if status is not FC_CTELS_STATUS_OK */
- struct {
- uint8_t action; /* fragment_id for CT REJECT */
- uint8_t reason_code;
- uint8_t reason_explanation;
- uint8_t vendor_unique;
- } rjt_data;
-};
-
-
-/* FC_BSG_HST_CT : */
-
-/* Request:
- * This message requests that a CT Request be performed with the
- * indicated N_Port_ID. The driver is responsible for logging in with
- * the fabric and/or N_Port_ID, etc as per FC rules. This request does
- * not mandate that the driver must enumerate the destination in the
- * transport. The driver is allowed to decide whether to enumerate it,
- * and whether to tear it down after the request.
- */
-struct fc_bsg_host_ct {
- uint8_t reserved;
-
- /* FC Address Identier of the remote port to send the ELS to */
- uint8_t port_id[3];
-
- /*
- * We need words 0-2 of the generic preamble for the LLD's
- */
- uint32_t preamble_word0; /* revision & IN_ID */
- uint32_t preamble_word1; /* GS_Type, GS_SubType, Options, Rsvd */
- uint32_t preamble_word2; /* Cmd Code, Max Size */
-
-};
-/* Response:
- *
- * The reply structure is an fc_bsg_ctels_reply structure
- */
-
-
-/* FC_BSG_HST_VENDOR : */
-
-/* Request:
- * Note: When specifying vendor_id, be sure to read the Vendor Type and ID
- * formatting requirements specified in scsi_netlink.h
- */
-struct fc_bsg_host_vendor {
- /*
- * Identifies the vendor that the message is formatted for. This
- * should be the recipient of the message.
- */
- uint64_t vendor_id;
-
- /* start of vendor command area */
- uint32_t vendor_cmd[0];
-};
-
-/* Response:
- */
-struct fc_bsg_host_vendor_reply {
- /* start of vendor response area */
- uint32_t vendor_rsp[0];
-};
-
-
-
-/*
- * FC Remote Port Messages
- */
-
-/* FC_BSG_RPT_ELS : */
-
-/* Request:
- * This message requests that an ELS be performed with the rport.
- */
-struct fc_bsg_rport_els {
- /*
- * ELS Command Code being sent (must be the same as
- * byte 0 of the payload)
- */
- uint8_t els_code;
-};
-
-/* Response:
- *
- * The reply structure is an fc_bsg_ctels_reply structure
- */
-
-
-/* FC_BSG_RPT_CT : */
-
-/* Request:
- * This message requests that a CT Request be performed with the rport.
- */
-struct fc_bsg_rport_ct {
- /*
- * We need words 0-2 of the generic preamble for the LLD's
- */
- uint32_t preamble_word0; /* revision & IN_ID */
- uint32_t preamble_word1; /* GS_Type, GS_SubType, Options, Rsvd */
- uint32_t preamble_word2; /* Cmd Code, Max Size */
-};
-/* Response:
- *
- * The reply structure is an fc_bsg_ctels_reply structure
- */
-
-
-
-
-/* request (CDB) structure of the sg_io_v4 */
-struct fc_bsg_request {
- uint32_t msgcode;
- union {
- struct fc_bsg_host_add_rport h_addrport;
- struct fc_bsg_host_del_rport h_delrport;
- struct fc_bsg_host_els h_els;
- struct fc_bsg_host_ct h_ct;
- struct fc_bsg_host_vendor h_vendor;
-
- struct fc_bsg_rport_els r_els;
- struct fc_bsg_rport_ct r_ct;
- } rqst_data;
-} __attribute__((packed));
-
-
-/* response (request sense data) structure of the sg_io_v4 */
-struct fc_bsg_reply {
- /*
- * The completion result. Result exists in two forms:
- * if negative, it is an -Exxx system errno value. There will
- * be no further reply information supplied.
- * else, it's the 4-byte scsi error result, with driver, host,
- * msg and status fields. The per-msgcode reply structure
- * will contain valid data.
- */
- uint32_t result;
-
- /* If there was reply_payload, how much was recevied ? */
- uint32_t reply_payload_rcv_len;
-
- union {
- struct fc_bsg_host_vendor_reply vendor_reply;
-
- struct fc_bsg_ctels_reply ctels_reply;
- } reply_data;
-};
-
-
-#endif /* SCSI_BSG_FC_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/scsi/scsi_netlink.h b/lib/libc/include/generic-musl/scsi/scsi_netlink.h
deleted file mode 100644
index bb277e748f2a99cc8a896fbbbb8222955ae24746..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/scsi/scsi_netlink.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
-/*
- * SCSI Transport Netlink Interface
- * Used for the posting of outbound SCSI transport events
- *
- * Copyright (C) 2006 James Smart, Emulex Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-#ifndef SCSI_NETLINK_H
-#define SCSI_NETLINK_H
-
-#include
-#include
-
-/*
- * This file intended to be included by both kernel and user space
- */
-
-/* Single Netlink Message type to send all SCSI Transport messages */
-#define SCSI_TRANSPORT_MSG NLMSG_MIN_TYPE + 1
-
-/* SCSI Transport Broadcast Groups */
- /* leaving groups 0 and 1 unassigned */
-#define SCSI_NL_GRP_FC_EVENTS (1<<2) /* Group 2 */
-#define SCSI_NL_GRP_CNT 3
-
-
-/* SCSI_TRANSPORT_MSG event message header */
-struct scsi_nl_hdr {
- uint8_t version;
- uint8_t transport;
- uint16_t magic;
- uint16_t msgtype;
- uint16_t msglen;
-} __attribute__((aligned(sizeof(uint64_t))));
-
-/* scsi_nl_hdr->version value */
-#define SCSI_NL_VERSION 1
-
-/* scsi_nl_hdr->magic value */
-#define SCSI_NL_MAGIC 0xA1B2
-
-/* scsi_nl_hdr->transport value */
-#define SCSI_NL_TRANSPORT 0
-#define SCSI_NL_TRANSPORT_FC 1
-#define SCSI_NL_MAX_TRANSPORTS 2
-
-/* Transport-based scsi_nl_hdr->msgtype values are defined in each transport */
-
-/*
- * GENERIC SCSI scsi_nl_hdr->msgtype Values
- */
- /* kernel -> user */
-#define SCSI_NL_SHOST_VENDOR 0x0001
- /* user -> kernel */
-/* SCSI_NL_SHOST_VENDOR msgtype is kernel->user and user->kernel */
-
-
-/*
- * Message Structures :
- */
-
-/* macro to round up message lengths to 8byte boundary */
-#define SCSI_NL_MSGALIGN(len) (((len) + 7) & ~7)
-
-
-/*
- * SCSI HOST Vendor Unique messages :
- * SCSI_NL_SHOST_VENDOR
- *
- * Note: The Vendor Unique message payload will begin directly after
- * this structure, with the length of the payload per vmsg_datalen.
- *
- * Note: When specifying vendor_id, be sure to read the Vendor Type and ID
- * formatting requirements specified below
- */
-struct scsi_nl_host_vendor_msg {
- struct scsi_nl_hdr snlh; /* must be 1st element ! */
- uint64_t vendor_id;
- uint16_t host_no;
- uint16_t vmsg_datalen;
-} __attribute__((aligned(sizeof(uint64_t))));
-
-
-/*
- * Vendor ID:
- * If transports post vendor-unique events, they must pass a well-known
- * 32-bit vendor identifier. This identifier consists of 8 bits indicating
- * the "type" of identifier contained, and 24 bits of id data.
- *
- * Identifiers for each type:
- * PCI : ID data is the 16 bit PCI Registered Vendor ID
- */
-#define SCSI_NL_VID_TYPE_SHIFT 56
-#define SCSI_NL_VID_TYPE_MASK ((__u64)0xFF << SCSI_NL_VID_TYPE_SHIFT)
-#define SCSI_NL_VID_TYPE_PCI ((__u64)0x01 << SCSI_NL_VID_TYPE_SHIFT)
-#define SCSI_NL_VID_ID_MASK (~ SCSI_NL_VID_TYPE_MASK)
-
-
-#define INIT_SCSI_NL_HDR(hdr, t, mtype, mlen) \
- { \
- (hdr)->version = SCSI_NL_VERSION; \
- (hdr)->transport = t; \
- (hdr)->magic = SCSI_NL_MAGIC; \
- (hdr)->msgtype = mtype; \
- (hdr)->msglen = mlen; \
- }
-
-#endif /* SCSI_NETLINK_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/scsi/scsi_netlink_fc.h b/lib/libc/include/generic-musl/scsi/scsi_netlink_fc.h
deleted file mode 100644
index 2ccef41f15d36cff681ed14746b4e83fd2121706..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/scsi/scsi_netlink_fc.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
-/*
- * FC Transport Netlink Interface
- *
- * Copyright (C) 2006 James Smart, Emulex Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-#ifndef SCSI_NETLINK_FC_H
-#define SCSI_NETLINK_FC_H
-
-#include
-
-/*
- * This file intended to be included by both kernel and user space
- */
-
-/*
- * FC Transport Message Types
- */
- /* kernel -> user */
-#define FC_NL_ASYNC_EVENT 0x0100
- /* user -> kernel */
-/* none */
-
-
-/*
- * Message Structures :
- */
-
-/* macro to round up message lengths to 8byte boundary */
-#define FC_NL_MSGALIGN(len) (((len) + 7) & ~7)
-
-
-/*
- * FC Transport Broadcast Event Message :
- * FC_NL_ASYNC_EVENT
- *
- * Note: if Vendor Unique message, &event_data will be start of
- * vendor unique payload, and the length of the payload is
- * per event_datalen
- *
- * Note: When specifying vendor_id, be sure to read the Vendor Type and ID
- * formatting requirements specified in scsi_netlink.h
- */
-struct fc_nl_event {
- struct scsi_nl_hdr snlh; /* must be 1st element ! */
- uint64_t seconds;
- uint64_t vendor_id;
- uint16_t host_no;
- uint16_t event_datalen;
- uint32_t event_num;
- uint32_t event_code;
- uint32_t event_data;
-} __attribute__((aligned(sizeof(uint64_t))));
-
-
-#endif /* SCSI_NETLINK_FC_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/sound/asequencer.h b/lib/libc/include/generic-musl/sound/asequencer.h
deleted file mode 100644
index 3c5554f5c6204d6df96315427759c7e310dbdad4..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/sound/asequencer.h
+++ /dev/null
@@ -1,612 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
-/*
- * Main header file for the ALSA sequencer
- * Copyright (c) 1998-1999 by Frank van de Pol
- * (c) 1998-1999 by Jaroslav Kysela
- *
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-#ifndef __SOUND_ASEQUENCER_H
-#define __SOUND_ASEQUENCER_H
-
-#include
-
-/** version of the sequencer */
-#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 2)
-
-/**
- * definition of sequencer event types
- */
-
-/** system messages
- * event data type = #snd_seq_result
- */
-#define SNDRV_SEQ_EVENT_SYSTEM 0
-#define SNDRV_SEQ_EVENT_RESULT 1
-
-/** note messages (channel specific)
- * event data type = #snd_seq_ev_note
- */
-#define SNDRV_SEQ_EVENT_NOTE 5
-#define SNDRV_SEQ_EVENT_NOTEON 6
-#define SNDRV_SEQ_EVENT_NOTEOFF 7
-#define SNDRV_SEQ_EVENT_KEYPRESS 8
-
-/** control messages (channel specific)
- * event data type = #snd_seq_ev_ctrl
- */
-#define SNDRV_SEQ_EVENT_CONTROLLER 10
-#define SNDRV_SEQ_EVENT_PGMCHANGE 11
-#define SNDRV_SEQ_EVENT_CHANPRESS 12
-#define SNDRV_SEQ_EVENT_PITCHBEND 13 /**< from -8192 to 8191 */
-#define SNDRV_SEQ_EVENT_CONTROL14 14 /**< 14 bit controller value */
-#define SNDRV_SEQ_EVENT_NONREGPARAM 15 /**< 14 bit NRPN address + 14 bit unsigned value */
-#define SNDRV_SEQ_EVENT_REGPARAM 16 /**< 14 bit RPN address + 14 bit unsigned value */
-
-/** synchronisation messages
- * event data type = #snd_seq_ev_ctrl
- */
-#define SNDRV_SEQ_EVENT_SONGPOS 20 /* Song Position Pointer with LSB and MSB values */
-#define SNDRV_SEQ_EVENT_SONGSEL 21 /* Song Select with song ID number */
-#define SNDRV_SEQ_EVENT_QFRAME 22 /* midi time code quarter frame */
-#define SNDRV_SEQ_EVENT_TIMESIGN 23 /* SMF Time Signature event */
-#define SNDRV_SEQ_EVENT_KEYSIGN 24 /* SMF Key Signature event */
-
-/** timer messages
- * event data type = snd_seq_ev_queue_control
- */
-#define SNDRV_SEQ_EVENT_START 30 /* midi Real Time Start message */
-#define SNDRV_SEQ_EVENT_CONTINUE 31 /* midi Real Time Continue message */
-#define SNDRV_SEQ_EVENT_STOP 32 /* midi Real Time Stop message */
-#define SNDRV_SEQ_EVENT_SETPOS_TICK 33 /* set tick queue position */
-#define SNDRV_SEQ_EVENT_SETPOS_TIME 34 /* set realtime queue position */
-#define SNDRV_SEQ_EVENT_TEMPO 35 /* (SMF) Tempo event */
-#define SNDRV_SEQ_EVENT_CLOCK 36 /* midi Real Time Clock message */
-#define SNDRV_SEQ_EVENT_TICK 37 /* midi Real Time Tick message */
-#define SNDRV_SEQ_EVENT_QUEUE_SKEW 38 /* skew queue tempo */
-
-/** others
- * event data type = none
- */
-#define SNDRV_SEQ_EVENT_TUNE_REQUEST 40 /* tune request */
-#define SNDRV_SEQ_EVENT_RESET 41 /* reset to power-on state */
-#define SNDRV_SEQ_EVENT_SENSING 42 /* "active sensing" event */
-
-/** echo back, kernel private messages
- * event data type = any type
- */
-#define SNDRV_SEQ_EVENT_ECHO 50 /* echo event */
-#define SNDRV_SEQ_EVENT_OSS 51 /* OSS raw event */
-
-/** system status messages (broadcast for subscribers)
- * event data type = snd_seq_addr
- */
-#define SNDRV_SEQ_EVENT_CLIENT_START 60 /* new client has connected */
-#define SNDRV_SEQ_EVENT_CLIENT_EXIT 61 /* client has left the system */
-#define SNDRV_SEQ_EVENT_CLIENT_CHANGE 62 /* client status/info has changed */
-#define SNDRV_SEQ_EVENT_PORT_START 63 /* new port was created */
-#define SNDRV_SEQ_EVENT_PORT_EXIT 64 /* port was deleted from system */
-#define SNDRV_SEQ_EVENT_PORT_CHANGE 65 /* port status/info has changed */
-
-/** port connection changes
- * event data type = snd_seq_connect
- */
-#define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED 66 /* ports connected */
-#define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67 /* ports disconnected */
-
-/* 70-89: synthesizer events - obsoleted */
-
-/** user-defined events with fixed length
- * event data type = any
- */
-#define SNDRV_SEQ_EVENT_USR0 90
-#define SNDRV_SEQ_EVENT_USR1 91
-#define SNDRV_SEQ_EVENT_USR2 92
-#define SNDRV_SEQ_EVENT_USR3 93
-#define SNDRV_SEQ_EVENT_USR4 94
-#define SNDRV_SEQ_EVENT_USR5 95
-#define SNDRV_SEQ_EVENT_USR6 96
-#define SNDRV_SEQ_EVENT_USR7 97
-#define SNDRV_SEQ_EVENT_USR8 98
-#define SNDRV_SEQ_EVENT_USR9 99
-
-/* 100-118: instrument layer - obsoleted */
-/* 119-129: reserved */
-
-/* 130-139: variable length events
- * event data type = snd_seq_ev_ext
- * (SNDRV_SEQ_EVENT_LENGTH_VARIABLE must be set)
- */
-#define SNDRV_SEQ_EVENT_SYSEX 130 /* system exclusive data (variable length) */
-#define SNDRV_SEQ_EVENT_BOUNCE 131 /* error event */
-/* 132-134: reserved */
-#define SNDRV_SEQ_EVENT_USR_VAR0 135
-#define SNDRV_SEQ_EVENT_USR_VAR1 136
-#define SNDRV_SEQ_EVENT_USR_VAR2 137
-#define SNDRV_SEQ_EVENT_USR_VAR3 138
-#define SNDRV_SEQ_EVENT_USR_VAR4 139
-
-/* 150-151: kernel events with quote - DO NOT use in user clients */
-#define SNDRV_SEQ_EVENT_KERNEL_ERROR 150
-#define SNDRV_SEQ_EVENT_KERNEL_QUOTE 151 /* obsolete */
-
-/* 152-191: reserved */
-
-/* 192-254: hardware specific events */
-
-/* 255: special event */
-#define SNDRV_SEQ_EVENT_NONE 255
-
-
-typedef unsigned char snd_seq_event_type_t;
-
-/** event address */
-struct snd_seq_addr {
- unsigned char client; /**< Client number: 0..255, 255 = broadcast to all clients */
- unsigned char port; /**< Port within client: 0..255, 255 = broadcast to all ports */
-};
-
-/** port connection */
-struct snd_seq_connect {
- struct snd_seq_addr sender;
- struct snd_seq_addr dest;
-};
-
-
-#define SNDRV_SEQ_ADDRESS_UNKNOWN 253 /* unknown source */
-#define SNDRV_SEQ_ADDRESS_SUBSCRIBERS 254 /* send event to all subscribed ports */
-#define SNDRV_SEQ_ADDRESS_BROADCAST 255 /* send event to all queues/clients/ports/channels */
-#define SNDRV_SEQ_QUEUE_DIRECT 253 /* direct dispatch */
-
- /* event mode flag - NOTE: only 8 bits available! */
-#define SNDRV_SEQ_TIME_STAMP_TICK (0<<0) /* timestamp in clock ticks */
-#define SNDRV_SEQ_TIME_STAMP_REAL (1<<0) /* timestamp in real time */
-#define SNDRV_SEQ_TIME_STAMP_MASK (1<<0)
-
-#define SNDRV_SEQ_TIME_MODE_ABS (0<<1) /* absolute timestamp */
-#define SNDRV_SEQ_TIME_MODE_REL (1<<1) /* relative to current time */
-#define SNDRV_SEQ_TIME_MODE_MASK (1<<1)
-
-#define SNDRV_SEQ_EVENT_LENGTH_FIXED (0<<2) /* fixed event size */
-#define SNDRV_SEQ_EVENT_LENGTH_VARIABLE (1<<2) /* variable event size */
-#define SNDRV_SEQ_EVENT_LENGTH_VARUSR (2<<2) /* variable event size - user memory space */
-#define SNDRV_SEQ_EVENT_LENGTH_MASK (3<<2)
-
-#define SNDRV_SEQ_PRIORITY_NORMAL (0<<4) /* normal priority */
-#define SNDRV_SEQ_PRIORITY_HIGH (1<<4) /* event should be processed before others */
-#define SNDRV_SEQ_PRIORITY_MASK (1<<4)
-
-
- /* note event */
-struct snd_seq_ev_note {
- unsigned char channel;
- unsigned char note;
- unsigned char velocity;
- unsigned char off_velocity; /* only for SNDRV_SEQ_EVENT_NOTE */
- unsigned int duration; /* only for SNDRV_SEQ_EVENT_NOTE */
-};
-
- /* controller event */
-struct snd_seq_ev_ctrl {
- unsigned char channel;
- unsigned char unused1, unused2, unused3; /* pad */
- unsigned int param;
- signed int value;
-};
-
- /* generic set of bytes (12x8 bit) */
-struct snd_seq_ev_raw8 {
- unsigned char d[12]; /* 8 bit value */
-};
-
- /* generic set of integers (3x32 bit) */
-struct snd_seq_ev_raw32 {
- unsigned int d[3]; /* 32 bit value */
-};
-
- /* external stored data */
-struct snd_seq_ev_ext {
- unsigned int len; /* length of data */
- void *ptr; /* pointer to data (note: maybe 64-bit) */
-} __attribute__((packed));
-
-struct snd_seq_result {
- int event; /* processed event type */
- int result;
-};
-
-
-struct snd_seq_real_time {
- unsigned int tv_sec; /* seconds */
- unsigned int tv_nsec; /* nanoseconds */
-};
-
-typedef unsigned int snd_seq_tick_time_t; /* midi ticks */
-
-union snd_seq_timestamp {
- snd_seq_tick_time_t tick;
- struct snd_seq_real_time time;
-};
-
-struct snd_seq_queue_skew {
- unsigned int value;
- unsigned int base;
-};
-
- /* queue timer control */
-struct snd_seq_ev_queue_control {
- unsigned char queue; /* affected queue */
- unsigned char pad[3]; /* reserved */
- union {
- signed int value; /* affected value (e.g. tempo) */
- union snd_seq_timestamp time; /* time */
- unsigned int position; /* sync position */
- struct snd_seq_queue_skew skew;
- unsigned int d32[2];
- unsigned char d8[8];
- } param;
-};
-
- /* quoted event - inside the kernel only */
-struct snd_seq_ev_quote {
- struct snd_seq_addr origin; /* original sender */
- unsigned short value; /* optional data */
- struct snd_seq_event *event; /* quoted event */
-} __attribute__((packed));
-
-
- /* sequencer event */
-struct snd_seq_event {
- snd_seq_event_type_t type; /* event type */
- unsigned char flags; /* event flags */
- char tag;
-
- unsigned char queue; /* schedule queue */
- union snd_seq_timestamp time; /* schedule time */
-
-
- struct snd_seq_addr source; /* source address */
- struct snd_seq_addr dest; /* destination address */
-
- union { /* event data... */
- struct snd_seq_ev_note note;
- struct snd_seq_ev_ctrl control;
- struct snd_seq_ev_raw8 raw8;
- struct snd_seq_ev_raw32 raw32;
- struct snd_seq_ev_ext ext;
- struct snd_seq_ev_queue_control queue;
- union snd_seq_timestamp time;
- struct snd_seq_addr addr;
- struct snd_seq_connect connect;
- struct snd_seq_result result;
- struct snd_seq_ev_quote quote;
- } data;
-};
-
-
-/*
- * bounce event - stored as variable size data
- */
-struct snd_seq_event_bounce {
- int err;
- struct snd_seq_event event;
- /* external data follows here. */
-};
-
-
- /* system information */
-struct snd_seq_system_info {
- int queues; /* maximum queues count */
- int clients; /* maximum clients count */
- int ports; /* maximum ports per client */
- int channels; /* maximum channels per port */
- int cur_clients; /* current clients */
- int cur_queues; /* current queues */
- char reserved[24];
-};
-
-
- /* system running information */
-struct snd_seq_running_info {
- unsigned char client; /* client id */
- unsigned char big_endian; /* 1 = big-endian */
- unsigned char cpu_mode; /* 4 = 32bit, 8 = 64bit */
- unsigned char pad; /* reserved */
- unsigned char reserved[12];
-};
-
-
- /* known client numbers */
-#define SNDRV_SEQ_CLIENT_SYSTEM 0
- /* internal client numbers */
-#define SNDRV_SEQ_CLIENT_DUMMY 14 /* midi through */
-#define SNDRV_SEQ_CLIENT_OSS 15 /* oss sequencer emulator */
-
-
- /* client types */
-typedef int __bitwise snd_seq_client_type_t;
-#define NO_CLIENT ((snd_seq_client_type_t) 0)
-#define USER_CLIENT ((snd_seq_client_type_t) 1)
-#define KERNEL_CLIENT ((snd_seq_client_type_t) 2)
-
- /* event filter flags */
-#define SNDRV_SEQ_FILTER_BROADCAST (1<<0) /* accept broadcast messages */
-#define SNDRV_SEQ_FILTER_MULTICAST (1<<1) /* accept multicast messages */
-#define SNDRV_SEQ_FILTER_BOUNCE (1<<2) /* accept bounce event in error */
-#define SNDRV_SEQ_FILTER_USE_EVENT (1<<31) /* use event filter */
-
-struct snd_seq_client_info {
- int client; /* client number to inquire */
- snd_seq_client_type_t type; /* client type */
- char name[64]; /* client name */
- unsigned int filter; /* filter flags */
- unsigned char multicast_filter[8]; /* multicast filter bitmap */
- unsigned char event_filter[32]; /* event filter bitmap */
- int num_ports; /* RO: number of ports */
- int event_lost; /* number of lost events */
- int card; /* RO: card number[kernel] */
- int pid; /* RO: pid[user] */
- char reserved[56]; /* for future use */
-};
-
-
-/* client pool size */
-struct snd_seq_client_pool {
- int client; /* client number to inquire */
- int output_pool; /* outgoing (write) pool size */
- int input_pool; /* incoming (read) pool size */
- int output_room; /* minimum free pool size for select/blocking mode */
- int output_free; /* unused size */
- int input_free; /* unused size */
- char reserved[64];
-};
-
-
-/* Remove events by specified criteria */
-
-#define SNDRV_SEQ_REMOVE_INPUT (1<<0) /* Flush input queues */
-#define SNDRV_SEQ_REMOVE_OUTPUT (1<<1) /* Flush output queues */
-#define SNDRV_SEQ_REMOVE_DEST (1<<2) /* Restrict by destination q:client:port */
-#define SNDRV_SEQ_REMOVE_DEST_CHANNEL (1<<3) /* Restrict by channel */
-#define SNDRV_SEQ_REMOVE_TIME_BEFORE (1<<4) /* Restrict to before time */
-#define SNDRV_SEQ_REMOVE_TIME_AFTER (1<<5) /* Restrict to time or after */
-#define SNDRV_SEQ_REMOVE_TIME_TICK (1<<6) /* Time is in ticks */
-#define SNDRV_SEQ_REMOVE_EVENT_TYPE (1<<7) /* Restrict to event type */
-#define SNDRV_SEQ_REMOVE_IGNORE_OFF (1<<8) /* Do not flush off events */
-#define SNDRV_SEQ_REMOVE_TAG_MATCH (1<<9) /* Restrict to events with given tag */
-
-struct snd_seq_remove_events {
- unsigned int remove_mode; /* Flags that determine what gets removed */
-
- union snd_seq_timestamp time;
-
- unsigned char queue; /* Queue for REMOVE_DEST */
- struct snd_seq_addr dest; /* Address for REMOVE_DEST */
- unsigned char channel; /* Channel for REMOVE_DEST */
-
- int type; /* For REMOVE_EVENT_TYPE */
- char tag; /* Tag for REMOVE_TAG */
-
- int reserved[10]; /* To allow for future binary compatibility */
-
-};
-
-
- /* known port numbers */
-#define SNDRV_SEQ_PORT_SYSTEM_TIMER 0
-#define SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE 1
-
- /* port capabilities (32 bits) */
-#define SNDRV_SEQ_PORT_CAP_READ (1<<0) /* readable from this port */
-#define SNDRV_SEQ_PORT_CAP_WRITE (1<<1) /* writable to this port */
-
-#define SNDRV_SEQ_PORT_CAP_SYNC_READ (1<<2)
-#define SNDRV_SEQ_PORT_CAP_SYNC_WRITE (1<<3)
-
-#define SNDRV_SEQ_PORT_CAP_DUPLEX (1<<4)
-
-#define SNDRV_SEQ_PORT_CAP_SUBS_READ (1<<5) /* allow read subscription */
-#define SNDRV_SEQ_PORT_CAP_SUBS_WRITE (1<<6) /* allow write subscription */
-#define SNDRV_SEQ_PORT_CAP_NO_EXPORT (1<<7) /* routing not allowed */
-
- /* port type */
-#define SNDRV_SEQ_PORT_TYPE_SPECIFIC (1<<0) /* hardware specific */
-#define SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC (1<<1) /* generic MIDI device */
-#define SNDRV_SEQ_PORT_TYPE_MIDI_GM (1<<2) /* General MIDI compatible device */
-#define SNDRV_SEQ_PORT_TYPE_MIDI_GS (1<<3) /* GS compatible device */
-#define SNDRV_SEQ_PORT_TYPE_MIDI_XG (1<<4) /* XG compatible device */
-#define SNDRV_SEQ_PORT_TYPE_MIDI_MT32 (1<<5) /* MT-32 compatible device */
-#define SNDRV_SEQ_PORT_TYPE_MIDI_GM2 (1<<6) /* General MIDI 2 compatible device */
-
-/* other standards...*/
-#define SNDRV_SEQ_PORT_TYPE_SYNTH (1<<10) /* Synth device (no MIDI compatible - direct wavetable) */
-#define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11) /* Sampling device (support sample download) */
-#define SNDRV_SEQ_PORT_TYPE_SAMPLE (1<<12) /* Sampling device (sample can be downloaded at any time) */
-/*...*/
-#define SNDRV_SEQ_PORT_TYPE_HARDWARE (1<<16) /* driver for a hardware device */
-#define SNDRV_SEQ_PORT_TYPE_SOFTWARE (1<<17) /* implemented in software */
-#define SNDRV_SEQ_PORT_TYPE_SYNTHESIZER (1<<18) /* generates sound */
-#define SNDRV_SEQ_PORT_TYPE_PORT (1<<19) /* connects to other device(s) */
-#define SNDRV_SEQ_PORT_TYPE_APPLICATION (1<<20) /* application (sequencer/editor) */
-
-/* misc. conditioning flags */
-#define SNDRV_SEQ_PORT_FLG_GIVEN_PORT (1<<0)
-#define SNDRV_SEQ_PORT_FLG_TIMESTAMP (1<<1)
-#define SNDRV_SEQ_PORT_FLG_TIME_REAL (1<<2)
-
-struct snd_seq_port_info {
- struct snd_seq_addr addr; /* client/port numbers */
- char name[64]; /* port name */
-
- unsigned int capability; /* port capability bits */
- unsigned int type; /* port type bits */
- int midi_channels; /* channels per MIDI port */
- int midi_voices; /* voices per MIDI port */
- int synth_voices; /* voices per SYNTH port */
-
- int read_use; /* R/O: subscribers for output (from this port) */
- int write_use; /* R/O: subscribers for input (to this port) */
-
- void *kernel; /* reserved for kernel use (must be NULL) */
- unsigned int flags; /* misc. conditioning */
- unsigned char time_queue; /* queue # for timestamping */
- char reserved[59]; /* for future use */
-};
-
-
-/* queue flags */
-#define SNDRV_SEQ_QUEUE_FLG_SYNC (1<<0) /* sync enabled */
-
-/* queue information */
-struct snd_seq_queue_info {
- int queue; /* queue id */
-
- /*
- * security settings, only owner of this queue can start/stop timer
- * etc. if the queue is locked for other clients
- */
- int owner; /* client id for owner of the queue */
- unsigned locked:1; /* timing queue locked for other queues */
- char name[64]; /* name of this queue */
- unsigned int flags; /* flags */
- char reserved[60]; /* for future use */
-
-};
-
-/* queue info/status */
-struct snd_seq_queue_status {
- int queue; /* queue id */
- int events; /* read-only - queue size */
- snd_seq_tick_time_t tick; /* current tick */
- struct snd_seq_real_time time; /* current time */
- int running; /* running state of queue */
- int flags; /* various flags */
- char reserved[64]; /* for the future */
-};
-
-
-/* queue tempo */
-struct snd_seq_queue_tempo {
- int queue; /* sequencer queue */
- unsigned int tempo; /* current tempo, us/tick */
- int ppq; /* time resolution, ticks/quarter */
- unsigned int skew_value; /* queue skew */
- unsigned int skew_base; /* queue skew base */
- char reserved[24]; /* for the future */
-};
-
-
-/* sequencer timer sources */
-#define SNDRV_SEQ_TIMER_ALSA 0 /* ALSA timer */
-#define SNDRV_SEQ_TIMER_MIDI_CLOCK 1 /* Midi Clock (CLOCK event) */
-#define SNDRV_SEQ_TIMER_MIDI_TICK 2 /* Midi Timer Tick (TICK event) */
-
-/* queue timer info */
-struct snd_seq_queue_timer {
- int queue; /* sequencer queue */
- int type; /* source timer type */
- union {
- struct {
- struct snd_timer_id id; /* ALSA's timer ID */
- unsigned int resolution; /* resolution in Hz */
- } alsa;
- } u;
- char reserved[64]; /* for the future use */
-};
-
-
-struct snd_seq_queue_client {
- int queue; /* sequencer queue */
- int client; /* sequencer client */
- int used; /* queue is used with this client
- (must be set for accepting events) */
- /* per client watermarks */
- char reserved[64]; /* for future use */
-};
-
-
-#define SNDRV_SEQ_PORT_SUBS_EXCLUSIVE (1<<0) /* exclusive connection */
-#define SNDRV_SEQ_PORT_SUBS_TIMESTAMP (1<<1)
-#define SNDRV_SEQ_PORT_SUBS_TIME_REAL (1<<2)
-
-struct snd_seq_port_subscribe {
- struct snd_seq_addr sender; /* sender address */
- struct snd_seq_addr dest; /* destination address */
- unsigned int voices; /* number of voices to be allocated (0 = don't care) */
- unsigned int flags; /* modes */
- unsigned char queue; /* input time-stamp queue (optional) */
- unsigned char pad[3]; /* reserved */
- char reserved[64];
-};
-
-/* type of query subscription */
-#define SNDRV_SEQ_QUERY_SUBS_READ 0
-#define SNDRV_SEQ_QUERY_SUBS_WRITE 1
-
-struct snd_seq_query_subs {
- struct snd_seq_addr root; /* client/port id to be searched */
- int type; /* READ or WRITE */
- int index; /* 0..N-1 */
- int num_subs; /* R/O: number of subscriptions on this port */
- struct snd_seq_addr addr; /* R/O: result */
- unsigned char queue; /* R/O: result */
- unsigned int flags; /* R/O: result */
- char reserved[64]; /* for future use */
-};
-
-
-/*
- * IOCTL commands
- */
-
-#define SNDRV_SEQ_IOCTL_PVERSION _IOR ('S', 0x00, int)
-#define SNDRV_SEQ_IOCTL_CLIENT_ID _IOR ('S', 0x01, int)
-#define SNDRV_SEQ_IOCTL_SYSTEM_INFO _IOWR('S', 0x02, struct snd_seq_system_info)
-#define SNDRV_SEQ_IOCTL_RUNNING_MODE _IOWR('S', 0x03, struct snd_seq_running_info)
-
-#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO _IOWR('S', 0x10, struct snd_seq_client_info)
-#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO _IOW ('S', 0x11, struct snd_seq_client_info)
-
-#define SNDRV_SEQ_IOCTL_CREATE_PORT _IOWR('S', 0x20, struct snd_seq_port_info)
-#define SNDRV_SEQ_IOCTL_DELETE_PORT _IOW ('S', 0x21, struct snd_seq_port_info)
-#define SNDRV_SEQ_IOCTL_GET_PORT_INFO _IOWR('S', 0x22, struct snd_seq_port_info)
-#define SNDRV_SEQ_IOCTL_SET_PORT_INFO _IOW ('S', 0x23, struct snd_seq_port_info)
-
-#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT _IOW ('S', 0x30, struct snd_seq_port_subscribe)
-#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW ('S', 0x31, struct snd_seq_port_subscribe)
-
-#define SNDRV_SEQ_IOCTL_CREATE_QUEUE _IOWR('S', 0x32, struct snd_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_DELETE_QUEUE _IOW ('S', 0x33, struct snd_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO _IOWR('S', 0x34, struct snd_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO _IOWR('S', 0x35, struct snd_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE _IOWR('S', 0x36, struct snd_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO _IOWR('S', 0x41, struct snd_seq_queue_tempo)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO _IOW ('S', 0x42, struct snd_seq_queue_tempo)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER _IOWR('S', 0x45, struct snd_seq_queue_timer)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER _IOW ('S', 0x46, struct snd_seq_queue_timer)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT _IOWR('S', 0x49, struct snd_seq_queue_client)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT _IOW ('S', 0x4a, struct snd_seq_queue_client)
-#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL _IOWR('S', 0x4b, struct snd_seq_client_pool)
-#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL _IOW ('S', 0x4c, struct snd_seq_client_pool)
-#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS _IOW ('S', 0x4e, struct snd_seq_remove_events)
-#define SNDRV_SEQ_IOCTL_QUERY_SUBS _IOWR('S', 0x4f, struct snd_seq_query_subs)
-#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION _IOWR('S', 0x50, struct snd_seq_port_subscribe)
-#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT _IOWR('S', 0x51, struct snd_seq_client_info)
-#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT _IOWR('S', 0x52, struct snd_seq_port_info)
-
-#endif /* __SOUND_ASEQUENCER_H */
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/sound/asoc.h b/lib/libc/include/generic-musl/sound/asoc.h
deleted file mode 100644
index 0bc26dbb4db437cc7966677acd1bdfd32750e9fe..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/sound/asoc.h
+++ /dev/null
@@ -1,633 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
- * uapi/sound/asoc.h -- ALSA SoC Firmware Controls and DAPM
- *
- * Copyright (C) 2012 Texas Instruments Inc.
- * Copyright (C) 2015 Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Simple file API to load FW that includes mixers, coefficients, DAPM graphs,
- * algorithms, equalisers, DAIs, widgets etc.
-*/
-
-#ifndef __LINUX_UAPI_SND_ASOC_H
-#define __LINUX_UAPI_SND_ASOC_H
-
-#include
-#include
-
-/*
- * Maximum number of channels topology kcontrol can represent.
- */
-#define SND_SOC_TPLG_MAX_CHAN 8
-
-/*
- * Maximum number of PCM formats capability
- */
-#define SND_SOC_TPLG_MAX_FORMATS 16
-
-/*
- * Maximum number of PCM stream configs
- */
-#define SND_SOC_TPLG_STREAM_CONFIG_MAX 8
-
-/*
- * Maximum number of physical link's hardware configs
- */
-#define SND_SOC_TPLG_HW_CONFIG_MAX 8
-
-/* individual kcontrol info types - can be mixed with other types */
-#define SND_SOC_TPLG_CTL_VOLSW 1
-#define SND_SOC_TPLG_CTL_VOLSW_SX 2
-#define SND_SOC_TPLG_CTL_VOLSW_XR_SX 3
-#define SND_SOC_TPLG_CTL_ENUM 4
-#define SND_SOC_TPLG_CTL_BYTES 5
-#define SND_SOC_TPLG_CTL_ENUM_VALUE 6
-#define SND_SOC_TPLG_CTL_RANGE 7
-#define SND_SOC_TPLG_CTL_STROBE 8
-
-
-/* individual widget kcontrol info types - can be mixed with other types */
-#define SND_SOC_TPLG_DAPM_CTL_VOLSW 64
-#define SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE 65
-#define SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT 66
-#define SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE 67
-#define SND_SOC_TPLG_DAPM_CTL_PIN 68
-
-/* DAPM widget types - add new items to the end */
-#define SND_SOC_TPLG_DAPM_INPUT 0
-#define SND_SOC_TPLG_DAPM_OUTPUT 1
-#define SND_SOC_TPLG_DAPM_MUX 2
-#define SND_SOC_TPLG_DAPM_MIXER 3
-#define SND_SOC_TPLG_DAPM_PGA 4
-#define SND_SOC_TPLG_DAPM_OUT_DRV 5
-#define SND_SOC_TPLG_DAPM_ADC 6
-#define SND_SOC_TPLG_DAPM_DAC 7
-#define SND_SOC_TPLG_DAPM_SWITCH 8
-#define SND_SOC_TPLG_DAPM_PRE 9
-#define SND_SOC_TPLG_DAPM_POST 10
-#define SND_SOC_TPLG_DAPM_AIF_IN 11
-#define SND_SOC_TPLG_DAPM_AIF_OUT 12
-#define SND_SOC_TPLG_DAPM_DAI_IN 13
-#define SND_SOC_TPLG_DAPM_DAI_OUT 14
-#define SND_SOC_TPLG_DAPM_DAI_LINK 15
-#define SND_SOC_TPLG_DAPM_BUFFER 16
-#define SND_SOC_TPLG_DAPM_SCHEDULER 17
-#define SND_SOC_TPLG_DAPM_EFFECT 18
-#define SND_SOC_TPLG_DAPM_SIGGEN 19
-#define SND_SOC_TPLG_DAPM_SRC 20
-#define SND_SOC_TPLG_DAPM_ASRC 21
-#define SND_SOC_TPLG_DAPM_ENCODER 22
-#define SND_SOC_TPLG_DAPM_DECODER 23
-#define SND_SOC_TPLG_DAPM_LAST SND_SOC_TPLG_DAPM_DECODER
-
-/* Header magic number and string sizes */
-#define SND_SOC_TPLG_MAGIC 0x41536F43 /* ASoC */
-
-/* string sizes */
-#define SND_SOC_TPLG_NUM_TEXTS 16
-
-/* ABI version */
-#define SND_SOC_TPLG_ABI_VERSION 0x5 /* current version */
-#define SND_SOC_TPLG_ABI_VERSION_MIN 0x4 /* oldest version supported */
-
-/* Max size of TLV data */
-#define SND_SOC_TPLG_TLV_SIZE 32
-
-/*
- * File and Block header data types.
- * Add new generic and vendor types to end of list.
- * Generic types are handled by the core whilst vendors types are passed
- * to the component drivers for handling.
- */
-#define SND_SOC_TPLG_TYPE_MIXER 1
-#define SND_SOC_TPLG_TYPE_BYTES 2
-#define SND_SOC_TPLG_TYPE_ENUM 3
-#define SND_SOC_TPLG_TYPE_DAPM_GRAPH 4
-#define SND_SOC_TPLG_TYPE_DAPM_WIDGET 5
-#define SND_SOC_TPLG_TYPE_DAI_LINK 6
-#define SND_SOC_TPLG_TYPE_PCM 7
-#define SND_SOC_TPLG_TYPE_MANIFEST 8
-#define SND_SOC_TPLG_TYPE_CODEC_LINK 9
-#define SND_SOC_TPLG_TYPE_BACKEND_LINK 10
-#define SND_SOC_TPLG_TYPE_PDATA 11
-#define SND_SOC_TPLG_TYPE_DAI 12
-#define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_DAI
-
-/* vendor block IDs - please add new vendor types to end */
-#define SND_SOC_TPLG_TYPE_VENDOR_FW 1000
-#define SND_SOC_TPLG_TYPE_VENDOR_CONFIG 1001
-#define SND_SOC_TPLG_TYPE_VENDOR_COEFF 1002
-#define SND_SOC_TPLG_TYPEVENDOR_CODEC 1003
-
-#define SND_SOC_TPLG_STREAM_PLAYBACK 0
-#define SND_SOC_TPLG_STREAM_CAPTURE 1
-
-/* vendor tuple types */
-#define SND_SOC_TPLG_TUPLE_TYPE_UUID 0
-#define SND_SOC_TPLG_TUPLE_TYPE_STRING 1
-#define SND_SOC_TPLG_TUPLE_TYPE_BOOL 2
-#define SND_SOC_TPLG_TUPLE_TYPE_BYTE 3
-#define SND_SOC_TPLG_TUPLE_TYPE_WORD 4
-#define SND_SOC_TPLG_TUPLE_TYPE_SHORT 5
-
-/* DAI flags */
-#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES (1 << 0)
-#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS (1 << 1)
-#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2)
-
-/* DAI clock gating */
-#define SND_SOC_TPLG_DAI_CLK_GATE_UNDEFINED 0
-#define SND_SOC_TPLG_DAI_CLK_GATE_GATED 1
-#define SND_SOC_TPLG_DAI_CLK_GATE_CONT 2
-
-/* DAI mclk_direction */
-#define SND_SOC_TPLG_MCLK_CO 0 /* for codec, mclk is output */
-#define SND_SOC_TPLG_MCLK_CI 1 /* for codec, mclk is input */
-
-/* DAI physical PCM data formats.
- * Add new formats to the end of the list.
- */
-#define SND_SOC_DAI_FORMAT_I2S 1 /* I2S mode */
-#define SND_SOC_DAI_FORMAT_RIGHT_J 2 /* Right Justified mode */
-#define SND_SOC_DAI_FORMAT_LEFT_J 3 /* Left Justified mode */
-#define SND_SOC_DAI_FORMAT_DSP_A 4 /* L data MSB after FRM LRC */
-#define SND_SOC_DAI_FORMAT_DSP_B 5 /* L data MSB during FRM LRC */
-#define SND_SOC_DAI_FORMAT_AC97 6 /* AC97 */
-#define SND_SOC_DAI_FORMAT_PDM 7 /* Pulse density modulation */
-
-/* left and right justified also known as MSB and LSB respectively */
-#define SND_SOC_DAI_FORMAT_MSB SND_SOC_DAI_FORMAT_LEFT_J
-#define SND_SOC_DAI_FORMAT_LSB SND_SOC_DAI_FORMAT_RIGHT_J
-
-/* DAI link flags */
-#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES (1 << 0)
-#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS (1 << 1)
-#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2)
-#define SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP (1 << 3)
-
-/* DAI topology BCLK parameter
- * For the backwards capability, by default codec is bclk master
- */
-#define SND_SOC_TPLG_BCLK_CM 0 /* codec is bclk master */
-#define SND_SOC_TPLG_BCLK_CS 1 /* codec is bclk slave */
-
-/* DAI topology FSYNC parameter
- * For the backwards capability, by default codec is fsync master
- */
-#define SND_SOC_TPLG_FSYNC_CM 0 /* codec is fsync master */
-#define SND_SOC_TPLG_FSYNC_CS 1 /* codec is fsync slave */
-
-/*
- * Block Header.
- * This header precedes all object and object arrays below.
- */
-struct snd_soc_tplg_hdr {
- __le32 magic; /* magic number */
- __le32 abi; /* ABI version */
- __le32 version; /* optional vendor specific version details */
- __le32 type; /* SND_SOC_TPLG_TYPE_ */
- __le32 size; /* size of this structure */
- __le32 vendor_type; /* optional vendor specific type info */
- __le32 payload_size; /* data bytes, excluding this header */
- __le32 index; /* identifier for block */
- __le32 count; /* number of elements in block */
-} __attribute__((packed));
-
-/* vendor tuple for uuid */
-struct snd_soc_tplg_vendor_uuid_elem {
- __le32 token;
- char uuid[16];
-} __attribute__((packed));
-
-/* vendor tuple for a bool/byte/short/word value */
-struct snd_soc_tplg_vendor_value_elem {
- __le32 token;
- __le32 value;
-} __attribute__((packed));
-
-/* vendor tuple for string */
-struct snd_soc_tplg_vendor_string_elem {
- __le32 token;
- char string[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
-} __attribute__((packed));
-
-struct snd_soc_tplg_vendor_array {
- __le32 size; /* size in bytes of the array, including all elements */
- __le32 type; /* SND_SOC_TPLG_TUPLE_TYPE_ */
- __le32 num_elems; /* number of elements in array */
- union {
- struct snd_soc_tplg_vendor_uuid_elem uuid[0];
- struct snd_soc_tplg_vendor_value_elem value[0];
- struct snd_soc_tplg_vendor_string_elem string[0];
- };
-} __attribute__((packed));
-
-/*
- * Private data.
- * All topology objects may have private data that can be used by the driver or
- * firmware. Core will ignore this data.
- */
-struct snd_soc_tplg_private {
- __le32 size; /* in bytes of private data */
- union {
- char data[0];
- struct snd_soc_tplg_vendor_array array[0];
- };
-} __attribute__((packed));
-
-/*
- * Kcontrol TLV data.
- */
-struct snd_soc_tplg_tlv_dbscale {
- __le32 min;
- __le32 step;
- __le32 mute;
-} __attribute__((packed));
-
-struct snd_soc_tplg_ctl_tlv {
- __le32 size; /* in bytes of this structure */
- __le32 type; /* SNDRV_CTL_TLVT_*, type of TLV */
- union {
- __le32 data[SND_SOC_TPLG_TLV_SIZE];
- struct snd_soc_tplg_tlv_dbscale scale;
- };
-} __attribute__((packed));
-
-/*
- * Kcontrol channel data
- */
-struct snd_soc_tplg_channel {
- __le32 size; /* in bytes of this structure */
- __le32 reg;
- __le32 shift;
- __le32 id; /* ID maps to Left, Right, LFE etc */
-} __attribute__((packed));
-
-/*
- * Genericl Operations IDs, for binding Kcontrol or Bytes ext ops
- * Kcontrol ops need get/put/info.
- * Bytes ext ops need get/put.
- */
-struct snd_soc_tplg_io_ops {
- __le32 get;
- __le32 put;
- __le32 info;
-} __attribute__((packed));
-
-/*
- * kcontrol header
- */
-struct snd_soc_tplg_ctl_hdr {
- __le32 size; /* in bytes of this structure */
- __le32 type;
- char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
- __le32 access;
- struct snd_soc_tplg_io_ops ops;
- struct snd_soc_tplg_ctl_tlv tlv;
-} __attribute__((packed));
-
-/*
- * Stream Capabilities
- */
-struct snd_soc_tplg_stream_caps {
- __le32 size; /* in bytes of this structure */
- char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
- __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */
- __le32 rates; /* supported rates SNDRV_PCM_RATE_* */
- __le32 rate_min; /* min rate */
- __le32 rate_max; /* max rate */
- __le32 channels_min; /* min channels */
- __le32 channels_max; /* max channels */
- __le32 periods_min; /* min number of periods */
- __le32 periods_max; /* max number of periods */
- __le32 period_size_min; /* min period size bytes */
- __le32 period_size_max; /* max period size bytes */
- __le32 buffer_size_min; /* min buffer size bytes */
- __le32 buffer_size_max; /* max buffer size bytes */
- __le32 sig_bits; /* number of bits of content */
-} __attribute__((packed));
-
-/*
- * FE or BE Stream configuration supported by SW/FW
- */
-struct snd_soc_tplg_stream {
- __le32 size; /* in bytes of this structure */
- char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* Name of the stream */
- __le64 format; /* SNDRV_PCM_FMTBIT_* */
- __le32 rate; /* SNDRV_PCM_RATE_* */
- __le32 period_bytes; /* size of period in bytes */
- __le32 buffer_bytes; /* size of buffer in bytes */
- __le32 channels; /* channels */
-} __attribute__((packed));
-
-
-/*
- * Describes a physical link's runtime supported hardware config,
- * i.e. hardware audio formats.
- */
-struct snd_soc_tplg_hw_config {
- __le32 size; /* in bytes of this structure */
- __le32 id; /* unique ID - - used to match */
- __le32 fmt; /* SND_SOC_DAI_FORMAT_ format value */
- __u8 clock_gated; /* SND_SOC_TPLG_DAI_CLK_GATE_ value */
- __u8 invert_bclk; /* 1 for inverted BCLK, 0 for normal */
- __u8 invert_fsync; /* 1 for inverted frame clock, 0 for normal */
- __u8 bclk_master; /* SND_SOC_TPLG_BCLK_ value */
- __u8 fsync_master; /* SND_SOC_TPLG_FSYNC_ value */
- __u8 mclk_direction; /* SND_SOC_TPLG_MCLK_ value */
- __le16 reserved; /* for 32bit alignment */
- __le32 mclk_rate; /* MCLK or SYSCLK freqency in Hz */
- __le32 bclk_rate; /* BCLK freqency in Hz */
- __le32 fsync_rate; /* frame clock in Hz */
- __le32 tdm_slots; /* number of TDM slots in use */
- __le32 tdm_slot_width; /* width in bits for each slot */
- __le32 tx_slots; /* bit mask for active Tx slots */
- __le32 rx_slots; /* bit mask for active Rx slots */
- __le32 tx_channels; /* number of Tx channels */
- __le32 tx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */
- __le32 rx_channels; /* number of Rx channels */
- __le32 rx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */
-} __attribute__((packed));
-
-/*
- * Manifest. List totals for each payload type. Not used in parsing, but will
- * be passed to the component driver before any other objects in order for any
- * global component resource allocations.
- *
- * File block representation for manifest :-
- * +-----------------------------------+----+
- * | struct snd_soc_tplg_hdr | 1 |
- * +-----------------------------------+----+
- * | struct snd_soc_tplg_manifest | 1 |
- * +-----------------------------------+----+
- */
-struct snd_soc_tplg_manifest {
- __le32 size; /* in bytes of this structure */
- __le32 control_elems; /* number of control elements */
- __le32 widget_elems; /* number of widget elements */
- __le32 graph_elems; /* number of graph elements */
- __le32 pcm_elems; /* number of PCM elements */
- __le32 dai_link_elems; /* number of DAI link elements */
- __le32 dai_elems; /* number of physical DAI elements */
- __le32 reserved[20]; /* reserved for new ABI element types */
- struct snd_soc_tplg_private priv;
-} __attribute__((packed));
-
-/*
- * Mixer kcontrol.
- *
- * File block representation for mixer kcontrol :-
- * +-----------------------------------+----+
- * | struct snd_soc_tplg_hdr | 1 |
- * +-----------------------------------+----+
- * | struct snd_soc_tplg_mixer_control | N |
- * +-----------------------------------+----+
- */
-struct snd_soc_tplg_mixer_control {
- struct snd_soc_tplg_ctl_hdr hdr;
- __le32 size; /* in bytes of this structure */
- __le32 min;
- __le32 max;
- __le32 platform_max;
- __le32 invert;
- __le32 num_channels;
- struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN];
- struct snd_soc_tplg_private priv;
-} __attribute__((packed));
-
-/*
- * Enumerated kcontrol
- *
- * File block representation for enum kcontrol :-
- * +-----------------------------------+----+
- * | struct snd_soc_tplg_hdr | 1 |
- * +-----------------------------------+----+
- * | struct snd_soc_tplg_enum_control | N |
- * +-----------------------------------+----+
- */
-struct snd_soc_tplg_enum_control {
- struct snd_soc_tplg_ctl_hdr hdr;
- __le32 size; /* in bytes of this structure */
- __le32 num_channels;
- struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN];
- __le32 items;
- __le32 mask;
- __le32 count;
- char texts[SND_SOC_TPLG_NUM_TEXTS][SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
- __le32 values[SND_SOC_TPLG_NUM_TEXTS * SNDRV_CTL_ELEM_ID_NAME_MAXLEN / 4];
- struct snd_soc_tplg_private priv;
-} __attribute__((packed));
-
-/*
- * Bytes kcontrol
- *
- * File block representation for bytes kcontrol :-
- * +-----------------------------------+----+
- * | struct snd_soc_tplg_hdr | 1 |
- * +-----------------------------------+----+
- * | struct snd_soc_tplg_bytes_control | N |
- * +-----------------------------------+----+
- */
-struct snd_soc_tplg_bytes_control {
- struct snd_soc_tplg_ctl_hdr hdr;
- __le32 size; /* in bytes of this structure */
- __le32 max;
- __le32 mask;
- __le32 base;
- __le32 num_regs;
- struct snd_soc_tplg_io_ops ext_ops;
- struct snd_soc_tplg_private priv;
-} __attribute__((packed));
-
-/*
- * DAPM Graph Element
- *
- * File block representation for DAPM graph elements :-
- * +-------------------------------------+----+
- * | struct snd_soc_tplg_hdr | 1 |
- * +-------------------------------------+----+
- * | struct snd_soc_tplg_dapm_graph_elem | N |
- * +-------------------------------------+----+
- */
-struct snd_soc_tplg_dapm_graph_elem {
- char sink[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
- char control[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
- char source[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
-} __attribute__((packed));
-
-/*
- * DAPM Widget.
- *
- * File block representation for DAPM widget :-
- * +-------------------------------------+-----+
- * | struct snd_soc_tplg_hdr | 1 |
- * +-------------------------------------+-----+
- * | struct snd_soc_tplg_dapm_widget | N |
- * +-------------------------------------+-----+
- * | struct snd_soc_tplg_enum_control | 0|1 |
- * | struct snd_soc_tplg_mixer_control | 0|N |
- * +-------------------------------------+-----+
- *
- * Optional enum or mixer control can be appended to the end of each widget
- * in the block.
- */
-struct snd_soc_tplg_dapm_widget {
- __le32 size; /* in bytes of this structure */
- __le32 id; /* SND_SOC_DAPM_CTL */
- char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
- char sname[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
-
- __le32 reg; /* negative reg = no direct dapm */
- __le32 shift; /* bits to shift */
- __le32 mask; /* non-shifted mask */
- __le32 subseq; /* sort within widget type */
- __le32 invert; /* invert the power bit */
- __le32 ignore_suspend; /* kept enabled over suspend */
- __le16 event_flags;
- __le16 event_type;
- __le32 num_kcontrols;
- struct snd_soc_tplg_private priv;
- /*
- * kcontrols that relate to this widget
- * follow here after widget private data
- */
-} __attribute__((packed));
-
-
-/*
- * Describes SW/FW specific features of PCM (FE DAI & DAI link).
- *
- * File block representation for PCM :-
- * +-----------------------------------+-----+
- * | struct snd_soc_tplg_hdr | 1 |
- * +-----------------------------------+-----+
- * | struct snd_soc_tplg_pcm | N |
- * +-----------------------------------+-----+
- */
-struct snd_soc_tplg_pcm {
- __le32 size; /* in bytes of this structure */
- char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
- char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
- __le32 pcm_id; /* unique ID - used to match with DAI link */
- __le32 dai_id; /* unique ID - used to match */
- __le32 playback; /* supports playback mode */
- __le32 capture; /* supports capture mode */
- __le32 compress; /* 1 = compressed; 0 = PCM */
- struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */
- __le32 num_streams; /* number of streams */
- struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */
- __le32 flag_mask; /* bitmask of flags to configure */
- __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */
- struct snd_soc_tplg_private priv;
-} __attribute__((packed));
-
-
-/*
- * Describes the physical link runtime supported configs or params
- *
- * File block representation for physical link config :-
- * +-----------------------------------+-----+
- * | struct snd_soc_tplg_hdr | 1 |
- * +-----------------------------------+-----+
- * | struct snd_soc_tplg_link_config | N |
- * +-----------------------------------+-----+
- */
-struct snd_soc_tplg_link_config {
- __le32 size; /* in bytes of this structure */
- __le32 id; /* unique ID - used to match */
- char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */
- char stream_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* stream name - used to match */
- struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */
- __le32 num_streams; /* number of streams */
- struct snd_soc_tplg_hw_config hw_config[SND_SOC_TPLG_HW_CONFIG_MAX]; /* hw configs */
- __le32 num_hw_configs; /* number of hw configs */
- __le32 default_hw_config_id; /* default hw config ID for init */
- __le32 flag_mask; /* bitmask of flags to configure */
- __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */
- struct snd_soc_tplg_private priv;
-} __attribute__((packed));
-
-/*
- * Describes SW/FW specific features of physical DAI.
- * It can be used to configure backend DAIs for DPCM.
- *
- * File block representation for physical DAI :-
- * +-----------------------------------+-----+
- * | struct snd_soc_tplg_hdr | 1 |
- * +-----------------------------------+-----+
- * | struct snd_soc_tplg_dai | N |
- * +-----------------------------------+-----+
- */
-struct snd_soc_tplg_dai {
- __le32 size; /* in bytes of this structure */
- char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */
- __le32 dai_id; /* unique ID - used to match */
- __le32 playback; /* supports playback mode */
- __le32 capture; /* supports capture mode */
- struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */
- __le32 flag_mask; /* bitmask of flags to configure */
- __le32 flags; /* SND_SOC_TPLG_DAI_FLGBIT_* */
- struct snd_soc_tplg_private priv;
-} __attribute__((packed));
-
-/*
- * Old version of ABI structs, supported for backward compatibility.
- */
-
-/* Manifest v4 */
-struct snd_soc_tplg_manifest_v4 {
- __le32 size; /* in bytes of this structure */
- __le32 control_elems; /* number of control elements */
- __le32 widget_elems; /* number of widget elements */
- __le32 graph_elems; /* number of graph elements */
- __le32 pcm_elems; /* number of PCM elements */
- __le32 dai_link_elems; /* number of DAI link elements */
- struct snd_soc_tplg_private priv;
-} __attribute__((packed));
-
-/* Stream Capabilities v4 */
-struct snd_soc_tplg_stream_caps_v4 {
- __le32 size; /* in bytes of this structure */
- char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
- __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */
- __le32 rates; /* supported rates SNDRV_PCM_RATE_* */
- __le32 rate_min; /* min rate */
- __le32 rate_max; /* max rate */
- __le32 channels_min; /* min channels */
- __le32 channels_max; /* max channels */
- __le32 periods_min; /* min number of periods */
- __le32 periods_max; /* max number of periods */
- __le32 period_size_min; /* min period size bytes */
- __le32 period_size_max; /* max period size bytes */
- __le32 buffer_size_min; /* min buffer size bytes */
- __le32 buffer_size_max; /* max buffer size bytes */
-} __attribute__((packed));
-
-/* PCM v4 */
-struct snd_soc_tplg_pcm_v4 {
- __le32 size; /* in bytes of this structure */
- char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
- char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
- __le32 pcm_id; /* unique ID - used to match with DAI link */
- __le32 dai_id; /* unique ID - used to match */
- __le32 playback; /* supports playback mode */
- __le32 capture; /* supports capture mode */
- __le32 compress; /* 1 = compressed; 0 = PCM */
- struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */
- __le32 num_streams; /* number of streams */
- struct snd_soc_tplg_stream_caps_v4 caps[2]; /* playback and capture for DAI */
-} __attribute__((packed));
-
-/* Physical link config v4 */
-struct snd_soc_tplg_link_config_v4 {
- __le32 size; /* in bytes of this structure */
- __le32 id; /* unique ID - used to match */
- struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */
- __le32 num_streams; /* number of streams */
-} __attribute__((packed));
-
-#endif
\ No newline at end of file
diff --git a/lib/libc/include/generic-musl/sound/asound.h b/lib/libc/include/generic-musl/sound/asound.h
deleted file mode 100644
index 156a3853dc494499c04907d20452dd1c9f2fbc02..0000000000000000000000000000000000000000
--- a/lib/libc/include/generic-musl/sound/asound.h
+++ /dev/null
@@ -1,1035 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
-/*
- * Advanced Linux Sound Architecture - ALSA - Driver
- * Copyright (c) 1994-2003 by Jaroslav Kysela