There is no way to do this in a standard compliant way since the C/C++ standard(s) know nothing about .bss or .data or their lengths.
One way is to allocate a respective data buffer on the heap (use malloc) or on the stack (use alloca). The overhead of alloca is less than that of malloc, but alloca'ted memory has only the lifetime of a similar auto variable.
Closest to the requested feature is to "allocate" an array buf[] after .bss like so:
extern char buf[] __asm("__heap_start");
extern char __bss_start[];
extern char __bss_end[];
int main (void)
{
const size_t buf_size = __bss_end - __bss_start;
memset (buf, 0, buf_size); // Clear buf[]
buf[0] = 'A'; // Access buf[]
...
This is not compatible with malloc, which starts allocation at __heap_start. You can cater for that with:
extern char *__malloc_heap_start;
__malloc_heap_start += buf_size;
prior to the first call to malloc et al. (alloca is no issue).