mirror of
https://github.com/ipxe/ipxe
synced 2026-01-21 09:57:23 +03:00
[legacy] Allocate legacy driver .bss-like segments at probe time
Some legacy drivers use large static allocations for transmit and receive buffers. To avoid bloating the .bss segment, we currently implement these as a single common symbol named "_shared_bss" (which is permissible since only one legacy driver may be active at any one time). Switch to dynamic allocation of these .bss-like segments, to avoid the requirement for using common symbols. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -623,28 +623,6 @@ char __debug_disable(OBJECT) = ( DBGLVL_MAX & ~DBGLVL_DFLT );
|
||||
*/
|
||||
#define inline inline __attribute__ (( no_instrument_function ))
|
||||
|
||||
/**
|
||||
* Shared data.
|
||||
*
|
||||
* To save space in the binary when multiple-driver images are
|
||||
* compiled, uninitialised data areas can be shared between drivers.
|
||||
* This will typically be used to share statically-allocated receive
|
||||
* and transmit buffers between drivers.
|
||||
*
|
||||
* Use as e.g.
|
||||
*
|
||||
* @code
|
||||
*
|
||||
* struct {
|
||||
* char rx_buf[NUM_RX_BUF][RX_BUF_SIZE];
|
||||
* char tx_buf[TX_BUF_SIZE];
|
||||
* } my_static_data __shared;
|
||||
*
|
||||
* @endcode
|
||||
*
|
||||
*/
|
||||
#define __shared __asm__ ( "_shared_bss" ) __aligned
|
||||
|
||||
#endif /* ASSEMBLY */
|
||||
/** @} */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user