Add missing files for objdump --map-global-vars test
Adds necessary files to the testsuite for objdump's --map-global-vars option.
This commit introduces two new files to the Binutils testsuite to properly test the objdump --map-global-vars option. The files objdump-map-global-vars.c and objdump.map-global-vars provide the source code for a test program and the expected output, respectively, ensuring this functionality can be verified.
In Details
The binutils/testsuite/binutils-all/ directory houses tests for various binutils utilities. This change adds objdump-map-global-vars.c and objdump.map-global-vars. The C file defines various global variables (simple types, pointers, enums, structs, unions, arrays, function pointers) to be inspected. The .map-global-vars file contains a regular expression pattern that objdump --map-global-vars is expected to output when processing the compiled C code. This completes the setup for testing the --map-global-vars functionality, which lists global symbols and their properties.
- objdump
- A standard Unix utility that displays information from object files. It can show section contents, symbol tables, disassembly, and more.
- testsuite
- A collection of tests used to verify the correctness of a software project, in this case, the Binutils suite.
- global variables
- Variables declared outside of any function, accessible from any part of the program.
- regular expression
- A sequence of characters that specifies a search pattern. Used here for matching the output of objdump.
- BZ 34577
- Bugzilla ID 34577, referring to a specific issue tracker entry that this commit resolves.