I have a concrete slab right beside my house. It's the top of the cesspool. Now don't panic and start sending me dire warning emails. The water level in this cesspool has never gotten closer than 9 feet below the ground surface, not even in the heavy deluge where we got 13" of rain overnight. I do indeed monitor the water level and it stays far below the surface. So there's no problem of contamination.
My concrete slab had about 1 inch of "soil" atop it when we moved here. It was mostly crushed volcanic cinder. Some assorted weeds and grasses had managed to struggle along. Definitely not garden worthy.
Step one -- smother the weeds with a 2" layer of compost (it was all the compost that I had at that time) and a 6" layer of grass clippings. A couple of months went by before I had the time to flip everything over. Believe it or not, I tilled it up, mixing everything together. It was pretty much impossible. With the little Mantis tiller hopping and jumping like a bucking horse, I ended up with what looked like a layer of compost. When it settled, it wasn't much deeper than the inch that I started with, but it was an improvement. Being an optimist, I sowed radishes. They did poorly. That was a flop, but also a learning experience.
Whenever I had time, I applied more grass clippings, maintaining about a 2" layer. Into this I mixed any kitchen scraps and waste fruits I could gather. That's when I discovered that mango seeds, avocado pits, and macadamia nuts sprout very easily. But when they sprouted, I simply pulled them up and added them to the mix.
The second year of adding things to this layer atop the concrete slab, I saw that I had close to 2" of "soil", so I planted beans. And to my surprise, they grew. I got a small crop of beans out of them. More importantly I learned that fertility was a problem, because the tropical warmth, sun, wind, and rain drove the nutrients out. And the little garden had severe issues with moisture retention. The first couple days after a rain were fine, but then the soil dried out even though I kept a mulch atop it. There simply wasn't enough depth to bank any moisture.
The following year I learned that you could grow potatoes in 2" of "soil". I actually got decent yields. I had also learned to watch the soil moisture level and irrigate as needed. This experiment also prompted me to start learning about how soil is created.
After the potatoes, I focused upon making soil. Every month I tilled in about 2 inches of compost and a few inches of fresh grass clippings. In addition I spread some shovelfuls of coral sand, lava sand, and biochar. Nowadays these ingredients go right into the compost piles as they are being made, but back then I was using them as a top dressing. Sometime along the way I started adding broken up charred bone, broken up tree twigs, a sprinkling of ocean water, and mushroom tops that I collected from the wild. I also kept digging in my kitchen waste, coffee grounds, and waste fruits that I had foraged.
After a year of trying to create soil, I ended up with 6 inches of freshly tilled soil, which settled down to about a 3 to 4 inch layer. I was again ready to plant.....and I did. I don't recall all the crops that I grew, but they all did well. As crops grew, I continued to apply a monthly mulching of fresh grass clippings and kept digging in kitchen waste, waste fruits, coffee grounds. And between crops I tilled in a generous layer of compost. Even as the crops were growing I'd dig trenches between the rows and fill them in with organic waste.
So here we are today. 6 inches (settled) of nice looking garden. I'm still working on this soil, adding more to it.
If you have a compacted area or even just a concrete slab, keep in mind that with effort, time, and input it could become a productive garden spot. Mine did, mainly because I didn't know better when I started out.